8inline hid_t h5p_create(hid_t cls_id) {
9 hid_t plist_id = H5Pcreate(cls_id);
10 if (plist_id == H5I_INVALID_HID) {
11 HDF5ErrMapper::ToException<PropertyException>(
"Failed to create property list");
17#if H5_VERSION_GE(1, 10, 1)
18inline herr_t h5p_set_file_space_strategy(hid_t plist_id,
19 H5F_fspace_strategy_t strategy,
22 herr_t err = H5Pset_file_space_strategy(plist_id, strategy, persist, threshold);
24 HDF5ErrMapper::ToException<PropertyException>(
"Unable to get file space strategy");
30inline herr_t h5p_get_file_space_strategy(hid_t plist_id,
31 H5F_fspace_strategy_t* strategy,
34 herr_t err = H5Pget_file_space_strategy(plist_id, strategy, persist, threshold);
36 HDF5ErrMapper::ToException<PropertyException>(
"Error setting file space strategy.");
42inline herr_t h5p_set_file_space_page_size(hid_t plist_id, hsize_t fsp_size) {
43 herr_t err = H5Pset_file_space_page_size(plist_id, fsp_size);
45 HDF5ErrMapper::ToException<PropertyException>(
"Error setting file space page size.");
51inline herr_t h5p_get_file_space_page_size(hid_t plist_id, hsize_t* fsp_size) {
52 herr_t err = H5Pget_file_space_page_size(plist_id, fsp_size);
54 HDF5ErrMapper::ToException<PropertyException>(
"Unable to get file space page size");
60#ifndef H5_HAVE_PARALLEL
61inline herr_t h5p_get_page_buffer_size(hid_t plist_id,
63 unsigned* min_meta_perc,
64 unsigned* min_raw_perc) {
65 herr_t err = H5Pget_page_buffer_size(plist_id, buf_size, min_meta_perc, min_raw_perc);
68 HDF5ErrMapper::ToException<PropertyException>(
"Error setting page buffer size.");
74inline herr_t h5p_set_page_buffer_size(hid_t plist_id,
76 unsigned min_meta_per,
77 unsigned min_raw_per) {
78 herr_t err = H5Pset_page_buffer_size(plist_id, buf_size, min_meta_per, min_raw_per);
80 HDF5ErrMapper::ToException<PropertyException>(
"Error setting page buffer size.");
88#ifdef H5_HAVE_PARALLEL
89inline herr_t h5p_set_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) {
90 herr_t err = H5Pset_fapl_mpio(fapl_id, comm, info);
92 HDF5ErrMapper::ToException<FileException>(
"Unable to set-up MPIO Driver configuration");
98#if H5_VERSION_GE(1, 10, 0)
99inline herr_t h5p_set_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective) {
100 herr_t err = H5Pset_all_coll_metadata_ops(plist_id, is_collective);
102 HDF5ErrMapper::ToException<FileException>(
"Unable to request collective metadata reads");
108inline herr_t h5p_get_all_coll_metadata_ops(hid_t plist_id, hbool_t* is_collective) {
109 herr_t err = H5Pget_all_coll_metadata_ops(plist_id, is_collective);
111 HDF5ErrMapper::ToException<PropertyException>(
"Error loading MPI metadata read.");
117inline herr_t h5p_set_coll_metadata_write(hid_t plist_id, hbool_t is_collective) {
118 herr_t err = H5Pset_coll_metadata_write(plist_id, is_collective);
121 HDF5ErrMapper::ToException<FileException>(
"Unable to request collective metadata writes");
127inline herr_t h5p_get_coll_metadata_write(hid_t plist_id, hbool_t* is_collective) {
128 herr_t err = H5Pget_coll_metadata_write(plist_id, is_collective);
131 HDF5ErrMapper::ToException<PropertyException>(
"Error loading MPI metadata write.");
139inline herr_t h5p_get_libver_bounds(hid_t plist_id, H5F_libver_t* low, H5F_libver_t* high) {
140 herr_t err = H5Pget_libver_bounds(plist_id, low, high);
142 HDF5ErrMapper::ToException<PropertyException>(
"Unable to access file version bounds");
148inline herr_t h5p_set_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high) {
149 herr_t err = H5Pset_libver_bounds(plist_id, low, high);
152 HDF5ErrMapper::ToException<PropertyException>(
"Error setting file version bounds");
158inline herr_t h5p_get_meta_block_size(hid_t fapl_id, hsize_t* size) {
159 herr_t err = H5Pget_meta_block_size(fapl_id, size);
161 HDF5ErrMapper::ToException<PropertyException>(
"Unable to access file metadata block size");
167inline herr_t h5p_set_meta_block_size(hid_t fapl_id, hsize_t size) {
168 herr_t err = H5Pset_meta_block_size(fapl_id, size);
171 HDF5ErrMapper::ToException<PropertyException>(
"Error setting metadata block size");
177inline herr_t h5p_set_est_link_info(hid_t plist_id,
178 unsigned est_num_entries,
179 unsigned est_name_len) {
180 herr_t err = H5Pset_est_link_info(plist_id, est_num_entries, est_name_len);
182 HDF5ErrMapper::ToException<PropertyException>(
"Error setting estimated link info");
188inline herr_t h5p_get_est_link_info(hid_t plist_id,
189 unsigned* est_num_entries,
190 unsigned* est_name_len) {
191 herr_t err = H5Pget_est_link_info(plist_id, est_num_entries, est_name_len);
194 HDF5ErrMapper::ToException<PropertyException>(
"Unable to access group link size property");
200inline herr_t h5p_set_chunk(hid_t plist_id,
int ndims,
const hsize_t dim[]) {
201 herr_t err = H5Pset_chunk(plist_id, ndims, dim);
204 HDF5ErrMapper::ToException<PropertyException>(
"Error setting chunk property");
210inline int h5p_get_chunk(hid_t plist_id,
int max_ndims, hsize_t dim[]) {
211 int chunk_dims = H5Pget_chunk(plist_id, max_ndims, dim);
212 if (chunk_dims < 0) {
213 HDF5ErrMapper::ToException<PropertyException>(
"Error getting chunk size");
218inline htri_t h5z_filter_avail(H5Z_filter_t
id) {
219 htri_t tri = H5Zfilter_avail(
id);
221 HDF5ErrMapper::ToException<PropertyException>(
"Error checking filter availability");
226inline herr_t h5p_set_deflate(hid_t plist_id,
unsigned level) {
227 herr_t err = H5Pset_deflate(plist_id, level);
229 HDF5ErrMapper::ToException<PropertyException>(
"Error setting deflate property");
234inline herr_t h5p_set_szip(hid_t plist_id,
unsigned options_mask,
unsigned pixels_per_block) {
235 herr_t err = H5Pset_szip(plist_id, options_mask, pixels_per_block);
237 HDF5ErrMapper::ToException<PropertyException>(
"Error setting szip property");
242inline herr_t h5p_set_shuffle(hid_t plist_id) {
243 herr_t err = H5Pset_shuffle(plist_id);
245 HDF5ErrMapper::ToException<PropertyException>(
"Error setting shuffle property");
250inline herr_t h5p_get_alloc_time(hid_t plist_id, H5D_alloc_time_t* alloc_time) {
251 herr_t err = H5Pget_alloc_time(plist_id, alloc_time);
253 HDF5ErrMapper::ToException<PropertyException>(
"Error getting allocation time");
258inline herr_t h5p_set_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) {
259 herr_t err = H5Pset_alloc_time(plist_id, alloc_time);
261 HDF5ErrMapper::ToException<PropertyException>(
"Error setting allocation time");
266inline herr_t h5p_get_chunk_cache(hid_t dapl_id,
270 herr_t err = H5Pget_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
272 HDF5ErrMapper::ToException<PropertyException>(
"Error getting dataset cache parameters");
277inline herr_t h5p_set_chunk_cache(hid_t dapl_id,
281 herr_t err = H5Pset_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
283 HDF5ErrMapper::ToException<PropertyException>(
"Error setting dataset cache parameters");
288inline herr_t h5p_set_create_intermediate_group(hid_t plist_id,
unsigned crt_intmd) {
289 herr_t err = H5Pset_create_intermediate_group(plist_id, crt_intmd);
291 HDF5ErrMapper::ToException<PropertyException>(
292 "Error setting property for create intermediate groups");
297inline herr_t h5p_get_create_intermediate_group(hid_t plist_id,
unsigned* crt_intmd) {
298 herr_t err = H5Pget_create_intermediate_group(plist_id, crt_intmd);
300 HDF5ErrMapper::ToException<PropertyException>(
301 "Error getting property for create intermediate groups");
306#ifdef H5_HAVE_PARALLEL
307inline herr_t h5p_set_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode) {
308 herr_t err = H5Pset_dxpl_mpio(dxpl_id, xfer_mode);
310 HDF5ErrMapper::ToException<PropertyException>(
"Error setting H5Pset_dxpl_mpio.");
315inline herr_t h5p_get_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t* xfer_mode) {
316 herr_t err = H5Pget_dxpl_mpio(dxpl_id, xfer_mode);
318 HDF5ErrMapper::ToException<PropertyException>(
"Error getting H5Pset_dxpl_mpio.");
323inline herr_t h5p_get_mpio_no_collective_cause(hid_t plist_id,
324 uint32_t* local_no_collective_cause,
325 uint32_t* global_no_collective_cause) {
326 herr_t err = H5Pget_mpio_no_collective_cause(plist_id,
327 local_no_collective_cause,
328 global_no_collective_cause);
330 HDF5ErrMapper::ToException<PropertyException>(
"Failed to check mpio_no_collective_cause.");
337inline herr_t h5p_set_link_creation_order(hid_t plist_id,
unsigned crt_order_flags) {
338 herr_t err = H5Pset_link_creation_order(plist_id, crt_order_flags);
340 HDF5ErrMapper::ToException<PropertyException>(
"Error setting LinkCreationOrder.");
345inline herr_t h5p_get_link_creation_order(hid_t plist_id,
unsigned* crt_order_flags) {
346 herr_t err = H5Pget_link_creation_order(plist_id, crt_order_flags);
348 HDF5ErrMapper::ToException<PropertyException>(
349 "Error getting property for link creation order");
354inline herr_t h5p_get_attr_phase_change(hid_t plist_id,
355 unsigned* max_compact,
356 unsigned* min_dense) {
357 herr_t err = H5Pget_attr_phase_change(plist_id, max_compact, min_dense);
359 HDF5ErrMapper::ToException<PropertyException>(
360 "Error getting property for attribute phase change");
365inline herr_t h5p_set_attr_phase_change(hid_t plist_id,
unsigned max_compact,
unsigned min_dense) {
366 herr_t err = H5Pset_attr_phase_change(plist_id, max_compact, min_dense);
368 HDF5ErrMapper::ToException<PropertyException>(
369 "Error getting property for attribute phase change");
Definition assert_compatible_spaces.hpp:15