@@ -287,18 +287,18 @@ void writeFields(
287287 hid_t type_id =
288288 HDF5Traits<typename SliceType::value_type>::type ( &dtype, &precision );
289289
290- filespace_id = H5Screate_simple ( 1 , dimsf, NULL );
290+ filespace_id = H5Screate_simple ( 1 , dimsf, nullptr );
291291
292292 dcpl_id = H5Pcreate ( H5P_DATASET_CREATE );
293293 H5Pset_fill_time ( dcpl_id, H5D_FILL_TIME_NEVER );
294294
295295 dset_id = H5Dcreate ( file_id, slice.label ().c_str (), type_id, filespace_id,
296296 H5P_DEFAULT, dcpl_id, H5P_DEFAULT );
297297
298- H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, NULL , count,
299- NULL );
298+ H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, nullptr , count,
299+ nullptr );
300300
301- memspace_id = H5Screate_simple ( 1 , count, NULL );
301+ memspace_id = H5Screate_simple ( 1 , count, nullptr );
302302
303303 plist_id = H5Pcreate ( H5P_DATASET_XFER );
304304 // Default IO in HDF5 is independent
@@ -371,18 +371,18 @@ void writeFields(
371371 hid_t type_id =
372372 HDF5Traits<typename SliceType::value_type>::type ( &dtype, &precision );
373373
374- filespace_id = H5Screate_simple ( 2 , dimsf, NULL );
374+ filespace_id = H5Screate_simple ( 2 , dimsf, nullptr );
375375
376376 dcpl_id = H5Pcreate ( H5P_DATASET_CREATE );
377377 H5Pset_fill_time ( dcpl_id, H5D_FILL_TIME_NEVER );
378378
379379 dset_id = H5Dcreate ( file_id, slice.label ().c_str (), type_id, filespace_id,
380380 H5P_DEFAULT, dcpl_id, H5P_DEFAULT );
381381
382- H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, NULL , count,
383- NULL );
382+ H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, nullptr , count,
383+ nullptr );
384384
385- memspace_id = H5Screate_simple ( 2 , dimsm, NULL );
385+ memspace_id = H5Screate_simple ( 2 , dimsm, nullptr );
386386 plist_id = H5Pcreate ( H5P_DATASET_XFER );
387387 // Default IO in HDF5 is independent
388388 if ( h5_config.collective )
@@ -458,18 +458,18 @@ void writeFields(
458458 hid_t type_id =
459459 HDF5Traits<typename SliceType::value_type>::type ( &dtype, &precision );
460460
461- filespace_id = H5Screate_simple ( 3 , dimsf, NULL );
461+ filespace_id = H5Screate_simple ( 3 , dimsf, nullptr );
462462
463463 dcpl_id = H5Pcreate ( H5P_DATASET_CREATE );
464464 H5Pset_fill_time ( dcpl_id, H5D_FILL_TIME_NEVER );
465465
466466 dset_id = H5Dcreate ( file_id, slice.label ().c_str (), type_id, filespace_id,
467467 H5P_DEFAULT, dcpl_id, H5P_DEFAULT );
468468
469- H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, NULL , count,
470- NULL );
469+ H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, nullptr , count,
470+ nullptr );
471471
472- memspace_id = H5Screate_simple ( 3 , dimsm, NULL );
472+ memspace_id = H5Screate_simple ( 3 , dimsm, nullptr );
473473 plist_id = H5Pcreate ( H5P_DATASET_XFER );
474474 // Default IO in HDF5 is independent
475475 if ( h5_config.collective )
@@ -575,15 +575,15 @@ void writeTimeStep( HDF5Config h5_config, const std::string& prefix,
575575#if H5_VERSION_GE( 1, 10, 1 )
576576 if ( h5_config.evict_on_close )
577577 {
578- H5Pset_evict_on_close ( plist_id, ( hbool_t ) 1 );
578+ H5Pset_evict_on_close ( plist_id, true );
579579 }
580580#endif
581581
582582#if H5_VERSION_GE( 1, 10, 0 )
583583 if ( h5_config.collective )
584584 {
585- H5Pset_all_coll_metadata_ops ( plist_id, 1 );
586- H5Pset_coll_metadata_write ( plist_id, 1 );
585+ H5Pset_all_coll_metadata_ops ( plist_id, true );
586+ H5Pset_coll_metadata_write ( plist_id, true );
587587 }
588588#endif
589589
@@ -596,8 +596,8 @@ void writeTimeStep( HDF5Config h5_config, const std::string& prefix,
596596 H5FD_subfiling_config_t subfiling_config;
597597 H5FD_ioc_config_t ioc_config;
598598
599- H5FD_subfiling_config_t* subfiling_ptr = NULL ;
600- H5FD_ioc_config_t* ioc_ptr = NULL ;
599+ H5FD_subfiling_config_t* subfiling_ptr = nullptr ;
600+ H5FD_ioc_config_t* ioc_ptr = nullptr ;
601601
602602 // Get the default subfiling configuration parameters
603603 hid_t fapl_id = H5I_INVALID_HID;
@@ -610,38 +610,38 @@ void writeTimeStep( HDF5Config h5_config, const std::string& prefix,
610610 {
611611 subfiling_config.shared_cfg .stripe_size =
612612 h5_config.subfiling_stripe_size ;
613- if ( subfiling_ptr == NULL )
613+ if ( subfiling_ptr == nullptr )
614614 subfiling_ptr = &subfiling_config;
615615 }
616616 if ( h5_config.subfiling_stripe_count !=
617617 subfiling_config.shared_cfg .stripe_count )
618618 {
619619 subfiling_config.shared_cfg .stripe_count =
620620 h5_config.subfiling_stripe_count ;
621- if ( subfiling_ptr == NULL )
621+ if ( subfiling_ptr == nullptr )
622622 subfiling_ptr = &subfiling_config;
623623 }
624624 if ( h5_config.subfiling_ioc_selection !=
625625 (int )subfiling_config.shared_cfg .ioc_selection )
626626 {
627627 subfiling_config.shared_cfg .ioc_selection =
628628 (H5FD_subfiling_ioc_select_t)h5_config.subfiling_ioc_selection ;
629- if ( subfiling_ptr == NULL )
629+ if ( subfiling_ptr == nullptr )
630630 subfiling_ptr = &subfiling_config;
631631 }
632632 if ( h5_config.subfiling_thread_pool_size !=
633633 H5FD_IOC_DEFAULT_THREAD_POOL_SIZE )
634634 {
635635 H5Pget_fapl_ioc ( fapl_id, &ioc_config );
636636 ioc_config.thread_pool_size = h5_config.subfiling_thread_pool_size ;
637- if ( ioc_ptr == NULL )
637+ if ( ioc_ptr == nullptr )
638638 ioc_ptr = &ioc_config;
639639 }
640640 H5Pclose ( fapl_id );
641641
642642 H5Pset_mpi_params ( plist_id, comm, MPI_INFO_NULL );
643643
644- if ( ioc_ptr != NULL )
644+ if ( ioc_ptr != nullptr )
645645 H5Pset_fapl_ioc ( subfiling_config.ioc_fapl_id , ioc_ptr );
646646
647647 H5Pset_fapl_subfiling ( plist_id, subfiling_ptr );
@@ -705,12 +705,12 @@ void writeTimeStep( HDF5Config h5_config, const std::string& prefix,
705705 dimsf[0 ] = n_global;
706706 dimsf[1 ] = 3 ;
707707
708- filespace_id = H5Screate_simple ( 2 , dimsf, NULL );
708+ filespace_id = H5Screate_simple ( 2 , dimsf, nullptr );
709709
710710 count[0 ] = n_local;
711711 count[1 ] = 3 ;
712712
713- memspace_id = H5Screate_simple ( 2 , count, NULL );
713+ memspace_id = H5Screate_simple ( 2 , count, nullptr );
714714
715715 plist_id = H5Pcreate ( H5P_DATASET_XFER );
716716
@@ -729,8 +729,8 @@ void writeTimeStep( HDF5Config h5_config, const std::string& prefix,
729729 dset_id = H5Dcreate ( file_id, coords_slice.label ().c_str (), type_id,
730730 filespace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT );
731731
732- H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, NULL , count,
733- NULL );
732+ H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, nullptr , count,
733+ nullptr );
734734
735735 H5Dwrite ( dset_id, type_id, memspace_id, filespace_id, plist_id,
736736 host_coords.data () );
@@ -876,7 +876,7 @@ void readTimeStep( HDF5Config h5_config, const std::string& prefix,
876876#if H5_VERSION_GE( 1, 10, 0 )
877877 if ( h5_config.collective )
878878 {
879- H5Pset_all_coll_metadata_ops ( plist_id, 1 );
879+ H5Pset_all_coll_metadata_ops ( plist_id, true );
880880 }
881881#endif
882882
@@ -902,7 +902,7 @@ void readTimeStep( HDF5Config h5_config, const std::string& prefix,
902902 ndims = H5Sget_simple_extent_ndims ( filespace_id );
903903
904904 // Get the extents of the file dataspace.
905- H5Sget_simple_extent_dims ( filespace_id, dimsf, NULL );
905+ H5Sget_simple_extent_dims ( filespace_id, dimsf, nullptr );
906906
907907 std::vector<int > all_offsets ( comm_size );
908908 all_offsets[comm_rank] = n_local;
@@ -923,16 +923,16 @@ void readTimeStep( HDF5Config h5_config, const std::string& prefix,
923923 count[1 ] = dimsf[1 ];
924924 count[2 ] = dimsf[2 ];
925925
926- memspace_id = H5Screate_simple ( ndims, count, NULL );
926+ memspace_id = H5Screate_simple ( ndims, count, nullptr );
927927
928928 plist_id = H5Pcreate ( H5P_DATASET_XFER );
929929
930930 // Default IO in HDF5 is independent
931931 if ( h5_config.collective )
932932 H5Pset_dxpl_mpio ( plist_id, H5FD_MPIO_COLLECTIVE );
933933
934- H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, NULL , count,
935- NULL );
934+ H5Sselect_hyperslab ( filespace_id, H5S_SELECT_SET, offset, nullptr , count,
935+ nullptr );
936936
937937 readField ( dset_id, dtype_id, memspace_id, filespace_id, plist_id, n_local,
938938 field );
0 commit comments