@@ -42,7 +42,7 @@ use hdf5_sys::h5p::{
42
42
H5Pset_gc_references , H5Pset_mdc_config , H5Pset_meta_block_size , H5Pset_sieve_buf_size ,
43
43
H5Pset_small_data_block_size ,
44
44
} ;
45
- #[ cfg( h5_have_direct ) ]
45
+ #[ cfg( have_direct ) ]
46
46
use hdf5_sys:: h5p:: { H5Pget_fapl_direct , H5Pset_fapl_direct } ;
47
47
#[ cfg( feature = "mpio" ) ]
48
48
use hdf5_sys:: h5p:: { H5Pget_fapl_mpio , H5Pset_fapl_mpio } ;
@@ -51,7 +51,7 @@ use hdf5_sys::h5p::{H5Pget_fapl_mpio, H5Pset_fapl_mpio};
51
51
use hdf5_sys:: h5ac:: { H5AC_cache_image_config_t , H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE } ;
52
52
#[ cfg( feature = "1.10.2" ) ]
53
53
use hdf5_sys:: h5f:: H5F_libver_t ;
54
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
54
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
55
55
use hdf5_sys:: h5p:: {
56
56
H5Pget_all_coll_metadata_ops , H5Pget_coll_metadata_write , H5Pset_all_coll_metadata_ops ,
57
57
H5Pset_coll_metadata_write ,
@@ -73,7 +73,7 @@ use hdf5_sys::h5p::{
73
73
H5Pset_metadata_read_attempts ,
74
74
} ;
75
75
76
- #[ cfg( h5_have_direct ) ]
76
+ #[ cfg( have_direct ) ]
77
77
use crate :: globals:: H5FD_DIRECT ;
78
78
#[ cfg( feature = "mpio" ) ]
79
79
use crate :: globals:: H5FD_MPIO ;
@@ -131,9 +131,9 @@ impl Debug for FileAccess {
131
131
formatter. field ( "metadata_read_attempts" , & self . metadata_read_attempts ( ) ) ;
132
132
#[ cfg( feature = "1.10.0" ) ]
133
133
formatter. field ( "mdc_log_options" , & self . mdc_log_options ( ) ) ;
134
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
134
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
135
135
formatter. field ( "all_coll_metadata_ops" , & self . all_coll_metadata_ops ( ) ) ;
136
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
136
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
137
137
formatter. field ( "coll_metadata_write" , & self . coll_metadata_write ( ) ) ;
138
138
formatter. field ( "mdc_config" , & self . mdc_config ( ) ) ;
139
139
formatter. field ( "driver" , & self . driver ( ) ) ;
@@ -451,15 +451,15 @@ mod mpio {
451
451
#[ cfg( feature = "mpio" ) ]
452
452
pub use self :: mpio:: * ;
453
453
454
- #[ cfg( h5_have_direct ) ]
454
+ #[ cfg( have_direct ) ]
455
455
#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
456
456
pub struct DirectDriver {
457
457
pub alignment : usize ,
458
458
pub block_size : usize ,
459
459
pub cbuf_size : usize ,
460
460
}
461
461
462
- #[ cfg( h5_have_direct ) ]
462
+ #[ cfg( have_direct ) ]
463
463
impl Default for DirectDriver {
464
464
fn default ( ) -> Self {
465
465
Self { alignment : 4096 , block_size : 4096 , cbuf_size : 16 * 1024 * 1024 }
@@ -477,7 +477,7 @@ pub enum FileDriver {
477
477
Split ( SplitDriver ) ,
478
478
#[ cfg( feature = "mpio" ) ]
479
479
Mpio ( MpioDriver ) ,
480
- #[ cfg( h5_have_direct ) ]
480
+ #[ cfg( have_direct ) ]
481
481
Direct ( DirectDriver ) ,
482
482
}
483
483
@@ -702,8 +702,8 @@ impl Eq for MetadataCacheConfig {}
702
702
703
703
impl Default for MetadataCacheConfig {
704
704
fn default ( ) -> Self {
705
- let min_clean_fraction = if cfg ! ( h5_have_parallel ) { 0.3_f32 } else { 0.01_f32 } ;
706
- let flash_multiple = if cfg ! ( h5_have_parallel ) { 1.0_f32 } else { 1.4_f32 } ;
705
+ let min_clean_fraction = if cfg ! ( have_parallel ) { 0.3_f32 } else { 0.01_f32 } ;
706
+ let flash_multiple = if cfg ! ( have_parallel ) { 1.0_f32 } else { 1.4_f32 } ;
707
707
Self {
708
708
rpt_fcn_enabled : false ,
709
709
open_trace_file : false ,
@@ -971,9 +971,9 @@ pub struct FileAccessBuilder {
971
971
mdc_image_config : Option < CacheImageConfig > ,
972
972
#[ cfg( feature = "1.10.0" ) ]
973
973
mdc_log_options : Option < CacheLogOptions > ,
974
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
974
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
975
975
all_coll_metadata_ops : Option < bool > ,
976
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
976
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
977
977
coll_metadata_write : Option < bool > ,
978
978
gc_references : Option < bool > ,
979
979
small_data_block_size : Option < u64 > ,
@@ -1023,7 +1023,7 @@ impl FileAccessBuilder {
1023
1023
let v = plist. get_mdc_log_options ( ) ?;
1024
1024
builder. mdc_log_options ( v. is_enabled , & v. location , v. start_on_access ) ;
1025
1025
}
1026
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1026
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1027
1027
{
1028
1028
builder. all_coll_metadata_ops ( plist. get_all_coll_metadata_ops ( ) ?) ;
1029
1029
builder. coll_metadata_write ( plist. get_coll_metadata_write ( ) ?) ;
@@ -1118,13 +1118,13 @@ impl FileAccessBuilder {
1118
1118
self
1119
1119
}
1120
1120
1121
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1121
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1122
1122
pub fn all_coll_metadata_ops ( & mut self , is_collective : bool ) -> & mut Self {
1123
1123
self . all_coll_metadata_ops = Some ( is_collective) ;
1124
1124
self
1125
1125
}
1126
1126
1127
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1127
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1128
1128
pub fn coll_metadata_write ( & mut self , is_collective : bool ) -> & mut Self {
1129
1129
self . coll_metadata_write = Some ( is_collective) ;
1130
1130
self
@@ -1251,14 +1251,14 @@ impl FileAccessBuilder {
1251
1251
self . driver ( & FileDriver :: Mpio ( MpioDriver :: try_new ( comm, info) . unwrap ( ) ) )
1252
1252
}
1253
1253
1254
- #[ cfg( h5_have_direct ) ]
1254
+ #[ cfg( have_direct ) ]
1255
1255
pub fn direct_options (
1256
1256
& mut self , alignment : usize , block_size : usize , cbuf_size : usize ,
1257
1257
) -> & mut Self {
1258
1258
self . driver ( & FileDriver :: Direct ( DirectDriver { alignment, block_size, cbuf_size } ) )
1259
1259
}
1260
1260
1261
- #[ cfg( h5_have_direct ) ]
1261
+ #[ cfg( have_direct ) ]
1262
1262
pub fn direct ( & mut self ) -> & mut Self {
1263
1263
self . driver ( & FileDriver :: Direct ( DirectDriver :: default ( ) ) )
1264
1264
}
@@ -1360,7 +1360,7 @@ impl FileAccessBuilder {
1360
1360
Ok ( ( ) )
1361
1361
}
1362
1362
1363
- #[ cfg( h5_have_direct ) ]
1363
+ #[ cfg( have_direct ) ]
1364
1364
fn set_direct ( id : hid_t , drv : & DirectDriver ) -> Result < ( ) > {
1365
1365
h5try ! ( H5Pset_fapl_direct ( id, drv. alignment as _, drv. block_size as _, drv. cbuf_size as _) ) ;
1366
1366
Ok ( ( ) )
@@ -1393,7 +1393,7 @@ impl FileAccessBuilder {
1393
1393
FileDriver :: Mpio ( drv) => {
1394
1394
Self :: set_mpio ( id, drv) ?;
1395
1395
}
1396
- #[ cfg( h5_have_direct ) ]
1396
+ #[ cfg( have_direct ) ]
1397
1397
FileDriver :: Direct ( drv) => {
1398
1398
Self :: set_direct ( id, drv) ?;
1399
1399
}
@@ -1472,7 +1472,7 @@ impl FileAccessBuilder {
1472
1472
) ) ;
1473
1473
}
1474
1474
}
1475
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1475
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1476
1476
{
1477
1477
if let Some ( v) = self . all_coll_metadata_ops {
1478
1478
h5try ! ( H5Pset_all_coll_metadata_ops ( id, v as _) ) ;
@@ -1593,7 +1593,7 @@ impl FileAccess {
1593
1593
}
1594
1594
1595
1595
#[ doc( hidden) ]
1596
- #[ cfg( h5_have_direct ) ]
1596
+ #[ cfg( have_direct ) ]
1597
1597
fn get_direct ( & self ) -> Result < DirectDriver > {
1598
1598
let res = h5get ! ( H5Pget_fapl_direct ( self . id( ) ) : size_t, size_t, size_t) ?;
1599
1599
Ok ( DirectDriver { alignment : res. 0 as _ , block_size : res. 1 as _ , cbuf_size : res. 2 as _ } )
@@ -1608,7 +1608,7 @@ impl FileAccess {
1608
1608
return self . get_mpio ( ) . map ( FileDriver :: Mpio ) ;
1609
1609
}
1610
1610
}
1611
- #[ cfg( h5_have_direct ) ]
1611
+ #[ cfg( have_direct ) ]
1612
1612
{
1613
1613
if drv_id == * H5FD_DIRECT {
1614
1614
return self . get_direct ( ) . map ( FileDriver :: Direct ) ;
@@ -1797,24 +1797,24 @@ impl FileAccess {
1797
1797
self . get_mdc_log_options ( ) . ok ( ) . unwrap_or_default ( )
1798
1798
}
1799
1799
1800
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1800
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1801
1801
#[ doc( hidden) ]
1802
1802
pub fn get_all_coll_metadata_ops ( & self ) -> Result < bool > {
1803
1803
h5get ! ( H5Pget_all_coll_metadata_ops ( self . id( ) ) : hbool_t) . map ( |x| x > 0 )
1804
1804
}
1805
1805
1806
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1806
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1807
1807
pub fn all_coll_metadata_ops ( & self ) -> bool {
1808
1808
self . get_all_coll_metadata_ops ( ) . unwrap_or ( false )
1809
1809
}
1810
1810
1811
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1811
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1812
1812
#[ doc( hidden) ]
1813
1813
pub fn get_coll_metadata_write ( & self ) -> Result < bool > {
1814
1814
h5get ! ( H5Pget_coll_metadata_write ( self . id( ) ) : hbool_t) . map ( |x| x > 0 )
1815
1815
}
1816
1816
1817
- #[ cfg( all( feature = "1.10.0" , h5_have_parallel ) ) ]
1817
+ #[ cfg( all( feature = "1.10.0" , have_parallel ) ) ]
1818
1818
pub fn coll_metadata_write ( & self ) -> bool {
1819
1819
self . get_coll_metadata_write ( ) . unwrap_or ( false )
1820
1820
}
0 commit comments