![]() |
|
|||
File indexing completed on 2025-09-13 09:15:23
0001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 0002 * Copyright by The HDF Group. * 0003 * All rights reserved. * 0004 * * 0005 * This file is part of HDF5. The full HDF5 copyright notice, including * 0006 * terms governing use, modification, and redistribution, is contained in * 0007 * the COPYING file, which can be found at the root of the source code * 0008 * distribution tree, or in https://www.hdfgroup.org/licenses. * 0009 * If you do not have access to either file, you may request a copy from * 0010 * help@hdfgroup.org. * 0011 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 0012 0013 /* 0014 * This file contains function prototypes for each exported function in the 0015 * H5P module. 0016 */ 0017 #ifndef H5Ppublic_H 0018 #define H5Ppublic_H 0019 0020 #include "H5public.h" /* Generic Functions */ 0021 #include "H5ACpublic.h" /* Metadata Cache */ 0022 #include "H5Dpublic.h" /* Datasets */ 0023 #include "H5Fpublic.h" /* Files */ 0024 #include "H5FDpublic.h" /* (Virtual) File Drivers */ 0025 #include "H5Ipublic.h" /* Identifiers */ 0026 #include "H5Lpublic.h" /* Links */ 0027 #include "H5MMpublic.h" /* Memory Management */ 0028 #include "H5Opublic.h" /* Object Headers */ 0029 #include "H5Spublic.h" /* Dataspaces */ 0030 #include "H5Tpublic.h" /* Datatypes */ 0031 #include "H5Zpublic.h" /* Data Filters */ 0032 0033 /*****************/ 0034 /* Public Macros */ 0035 /*****************/ 0036 0037 /* When this header is included from a private HDF5 header, don't make calls to H5open() */ 0038 #undef H5OPEN 0039 #ifndef H5private_H 0040 #define H5OPEN H5open(), 0041 #else /* H5private_H */ 0042 #define H5OPEN 0043 #endif /* H5private_H */ 0044 0045 /* 0046 * The library's property list classes 0047 */ 0048 0049 /** 0050 * Property list class root, is not user-accessible 0051 */ 0052 #define H5P_ROOT (H5OPEN H5P_CLS_ROOT_ID_g) 0053 /** 0054 * Object creation property list class, is not user-accessible 0055 */ 0056 #define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_ID_g) 0057 /** 0058 * File creation property list class 0059 */ 0060 #define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_ID_g) 0061 /** 0062 * File access property list class 0063 */ 0064 #define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_ID_g) 0065 /** 0066 * Dataset creation property list class 0067 */ 0068 #define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_ID_g) 0069 /** 0070 * Dataset access property list class 0071 */ 0072 #define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_ID_g) 0073 /** 0074 * Dataset transfer property list class 0075 */ 0076 #define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_ID_g) 0077 /** 0078 * File mount property list class 0079 */ 0080 #define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_ID_g) 0081 /** 0082 * Group creation property list class 0083 */ 0084 #define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_ID_g) 0085 /** 0086 * Group access property list class 0087 */ 0088 #define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_ID_g) 0089 /** 0090 * Datatype creation property list class 0091 */ 0092 #define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_ID_g) 0093 /** 0094 * Datatype access property list class 0095 */ 0096 #define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g) 0097 /** 0098 * Map creation property list class 0099 */ 0100 #define H5P_MAP_CREATE (H5OPEN H5P_CLS_MAP_CREATE_ID_g) 0101 /** 0102 * Map access property list class 0103 */ 0104 #define H5P_MAP_ACCESS (H5OPEN H5P_CLS_MAP_ACCESS_ID_g) 0105 /** 0106 * String creation property list class, is not user-accessible 0107 */ 0108 #define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g) 0109 /** 0110 * Attribute creation property list class 0111 */ 0112 #define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g) 0113 /** 0114 * Attribute access property list class 0115 */ 0116 #define H5P_ATTRIBUTE_ACCESS (H5OPEN H5P_CLS_ATTRIBUTE_ACCESS_ID_g) 0117 /** 0118 * Object copy property list class 0119 */ 0120 #define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g) 0121 /** 0122 * Link creation property list class 0123 */ 0124 #define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g) 0125 /** 0126 * Link access property list class 0127 */ 0128 #define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g) 0129 /** 0130 * VOL initialization property list class 0131 */ 0132 #define H5P_VOL_INITIALIZE (H5OPEN H5P_CLS_VOL_INITIALIZE_ID_g) 0133 /** 0134 * Reference access property list class 0135 */ 0136 #define H5P_REFERENCE_ACCESS (H5OPEN H5P_CLS_REFERENCE_ACCESS_ID_g) 0137 0138 /* 0139 * The library's default property lists 0140 */ 0141 /** 0142 * File creation default property list 0143 */ 0144 #define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_ID_g) 0145 /** 0146 * File access default property list 0147 */ 0148 #define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_ID_g) 0149 /** 0150 * Dataset creation default property list 0151 */ 0152 #define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_ID_g) 0153 /** 0154 * Dataset access default property list 0155 */ 0156 #define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_ID_g) 0157 /** 0158 * Dataset transfer default property list 0159 */ 0160 #define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_ID_g) 0161 /** 0162 * File mount default property list 0163 */ 0164 #define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_ID_g) 0165 /** 0166 * Group creation default property list 0167 */ 0168 #define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_ID_g) 0169 /** 0170 * Group access default property list 0171 */ 0172 #define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_ID_g) 0173 /** 0174 * Datytype creation default property list 0175 */ 0176 #define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g) 0177 /** 0178 * Datytype access default property list 0179 */ 0180 #define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g) 0181 /** 0182 * Map creation default property list 0183 */ 0184 #define H5P_MAP_CREATE_DEFAULT (H5OPEN H5P_LST_MAP_CREATE_ID_g) 0185 /** 0186 * Map access default property list 0187 */ 0188 #define H5P_MAP_ACCESS_DEFAULT (H5OPEN H5P_LST_MAP_ACCESS_ID_g) 0189 /** 0190 * Attribute creation default property list 0191 */ 0192 #define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g) 0193 /** 0194 * Attribute access default property list 0195 */ 0196 #define H5P_ATTRIBUTE_ACCESS_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_ACCESS_ID_g) 0197 /** 0198 * Object copy default property list 0199 */ 0200 #define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g) 0201 /** 0202 * Link creation default property list 0203 */ 0204 #define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g) 0205 /** 0206 * Link access default property list 0207 */ 0208 #define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g) 0209 /** 0210 * VOL initialization default property list 0211 */ 0212 #define H5P_VOL_INITIALIZE_DEFAULT (H5OPEN H5P_LST_VOL_INITIALIZE_ID_g) 0213 /** 0214 * Reference access default property list 0215 */ 0216 #define H5P_REFERENCE_ACCESS_DEFAULT (H5OPEN H5P_LST_REFERENCE_ACCESS_ID_g) 0217 /** 0218 * Attribute creation order is tracked but not necessarily indexed 0219 */ 0220 #define H5P_CRT_ORDER_TRACKED 0x0001 0221 /** 0222 * Attribute creation order is indexed (requires #H5P_CRT_ORDER_TRACKED) 0223 */ 0224 #define H5P_CRT_ORDER_INDEXED 0x0002 0225 /** 0226 * Default value of type \ref hid_t for all property list classes \since 1.0.0 0227 */ 0228 #define H5P_DEFAULT 0 /* (hid_t) */ 0229 0230 #ifdef __cplusplus 0231 extern "C" { 0232 #endif 0233 0234 /*******************/ 0235 /* Public Typedefs */ 0236 /*******************/ 0237 0238 /* Define property list class callback function pointer types */ 0239 //! <!-- [H5P_cls_create_func_t_snip] --> 0240 /** 0241 * \brief Callback function for H5Pcreate_class() 0242 * 0243 * \param[in] prop_id The identifier of the property list class being created 0244 * \param[in] create_data User pointer to any class creation data required 0245 * \return \herr_t 0246 * 0247 * \details This function is called when a new property list of the class 0248 * with which this function was registered is being created. The 0249 * function is called after any registered parent create function is 0250 * called for each property value. 0251 * 0252 * If the create function returns a negative value, the new list is not 0253 * returned to the user and the property list creation routine returns 0254 * an error value. 0255 * 0256 * \since 1.4.0 0257 * 0258 */ 0259 typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data); 0260 //! <!-- [H5P_cls_create_func_t_snip] --> 0261 0262 //! <!-- [H5P_cls_copy_func_t_snip] --> 0263 /** 0264 * \brief Callback function for H5Pcreate_class() 0265 * 0266 * \param[in] new_prop_id The identifier of the property list copy 0267 * \param[in] old_prop_id The identifier of the property list being copied 0268 * \param[in] copy_data User pointer to any copy data required 0269 * \return \herr_t 0270 * 0271 * \details This function is called when an existing property list of this 0272 * class is copied. The copy callback function is called after any 0273 * registered parent copy callback function is called for each property 0274 * value. 0275 * 0276 * If the copy routine returns a negative value, the new list is not 0277 * returned to the user and the property list copy function returns an 0278 * error value. 0279 * 0280 * \since 1.4.0 0281 * 0282 */ 0283 typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, void *copy_data); 0284 //! <!-- [H5P_cls_copy_func_t_snip] --> 0285 0286 //! <!-- [H5P_cls_close_func_t_snip] --> 0287 /** 0288 * \brief Callback function for H5Pcreate_class() 0289 * 0290 * \param[in] prop_id The identifier of the property list class being closed 0291 * \param[in] close_data User pointer to any close data required 0292 * \return \herr_t 0293 * 0294 * \details This function is called when a property list of the class 0295 * with which this function was registered is being closed. The 0296 * function is called after any registered parent close function is 0297 * called for each property value. 0298 * 0299 * If the close function returns a negative value, the new list is not 0300 * returned to the user and the property list close routine returns 0301 * an error value. 0302 * 0303 * \since 1.4.0 0304 * 0305 */ 0306 typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data); 0307 //! <!-- [H5P_cls_close_func_t_snip] --> 0308 0309 /* Define property list callback function pointer types */ 0310 //! <!-- [H5P_prp_cb1_t_snip] --> 0311 /** 0312 * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1() 0313 * 0314 * \param[in] name The name of the property 0315 * \param[in] size The size of the property in bytes 0316 * \param[in,out] value The value for the property 0317 * \return \herr_t 0318 * 0319 * \details The H5P_prp_cb1_t() function describes the parameters used by the 0320 * property create, copy and close callback functions. 0321 * 0322 * \since 1.8.0 0323 * 0324 */ 0325 typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value); 0326 //! <!-- [H5P_prp_cb1_t_snip] --> 0327 0328 //! <!-- [H5P_prp_cb2_t_snip] --> 0329 /** 0330 * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1() 0331 * 0332 * \plist_id{prop_id} 0333 * \param[in] name The name of the property 0334 * \param[in] size The size of the property in bytes 0335 * \param[in] value The value for the property 0336 * \return \herr_t 0337 * 0338 * \details The H5P_prp_cb2_t() function describes the parameters used by the 0339 * property set, copy and delete callback functions. 0340 * 0341 * \since 1.8.0 0342 * 0343 */ 0344 typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value); 0345 //! <!-- [H5P_prp_cb2_t_snip] --> 0346 0347 typedef H5P_prp_cb1_t H5P_prp_create_func_t; 0348 typedef H5P_prp_cb2_t H5P_prp_set_func_t; 0349 typedef H5P_prp_cb2_t H5P_prp_get_func_t; 0350 //! <!-- [H5P_prp_encode_func_t_snip] --> 0351 /** 0352 * \brief Callback function for encoding property values 0353 * 0354 * \param[in] value The property value to be encoded 0355 * \param[out] buf Pointer to encoding buffer pointer 0356 * \param[out] size The size of \p buf 0357 * \return \herr_t 0358 * 0359 * \note There is currently no public API which exposes a callback of this type. 0360 * 0361 */ 0362 typedef herr_t (*H5P_prp_encode_func_t)(const void *value, void **buf, size_t *size); 0363 //! <!-- [H5P_prp_encode_func_t_snip] --> 0364 //! <!-- [H5P_prp_decode_func_t_snip] --> 0365 /** 0366 * \brief Callback function for decoding property values 0367 * 0368 * \param[in] buf A buffer containing an encoded property value 0369 * \param[out] value The decoded property value 0370 * \return \herr_t 0371 * 0372 * \note There is currently no public API which exposes a callback of this type. 0373 * 0374 */ 0375 typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value); 0376 //! <!-- [H5P_prp_decode_func_t_snip] --> 0377 typedef H5P_prp_cb2_t H5P_prp_delete_func_t; 0378 typedef H5P_prp_cb1_t H5P_prp_copy_func_t; 0379 0380 //! <!-- [H5P_prp_compare_func_t_snip] --> 0381 /** 0382 * \brief Callback function for comparing property values 0383 * 0384 * \param[in] value1 A property value 0385 * \param[in] value2 A property value 0386 * \param[in] size The size of the \p value1 and \p value2 buffers 0387 * \return Returns a positive value if \c value1 is greater than \c value2, a 0388 * negative value if \c value2 is greater than \c value1 and zero if 0389 * \c value1 and \c value2 are equal. 0390 * 0391 * \see H5Pregister(), H5Pinsert() 0392 * 0393 * \since 1.8.0 0394 * 0395 */ 0396 typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size); 0397 //! <!-- [H5P_prp_compare_func_t_snip] --> 0398 0399 typedef H5P_prp_cb1_t H5P_prp_close_func_t; 0400 0401 /* Define property list iteration function type */ 0402 //! <!-- [H5P_iterate_t_snip] --> 0403 /** 0404 * \brief Callback function for H5Piterate() 0405 * 0406 * \param[in] id The identifier of a property list or property list class 0407 * \param[in] name The name of the current property 0408 * \param[in,out] iter_data The user context passed to H5Piterate() 0409 * \return \herr_t_iter 0410 * 0411 * \details This function is called for each property encountered when 0412 * iterating over a property list or property list class 0413 * via H5Piterate(). 0414 * 0415 * \since 1.4.0 0416 * 0417 */ 0418 typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data); 0419 //! <!-- [H5P_iterate_t_snip] --> 0420 0421 //! <!--[H5D_mpio_actual_chunk_opt_mode_t_snip] --> 0422 /** 0423 * Actual IO mode property 0424 * 0425 * \details The default value, #H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all 0426 * I/O operations that do not use chunk optimizations, including 0427 * non-collective I/O and contiguous collective I/O. 0428 */ 0429 typedef enum H5D_mpio_actual_chunk_opt_mode_t { 0430 H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0, 0431 /**< No chunk optimization was performed. Either no collective I/O was 0432 attempted or the dataset wasn't chunked. */ 0433 H5D_MPIO_LINK_CHUNK, 0434 /**< Collective I/O is performed on all chunks simultaneously. */ 0435 H5D_MPIO_MULTI_CHUNK 0436 /**< Each chunk was individually assigned collective or independent I/O based 0437 on what fraction of processes access the chunk. If the fraction is greater 0438 than the multi chunk ratio threshold, collective I/O is performed on that 0439 chunk. The multi chunk ratio threshold can be set using 0440 H5Pset_dxpl_mpio_chunk_opt_ratio(). The default value is 60%. */ 0441 } H5D_mpio_actual_chunk_opt_mode_t; 0442 //! <!--[H5D_mpio_actual_chunk_opt_mode_t_snip] --> 0443 0444 //! <!-- [H5D_mpio_actual_io_mode_t_snip] --> 0445 /** 0446 * The following values are conveniently defined as a bit field so that 0447 * we can switch from the default to independent or collective and then to 0448 * mixed without having to check the original value. 0449 */ 0450 typedef enum H5D_mpio_actual_io_mode_t { 0451 H5D_MPIO_NO_COLLECTIVE = 0x0, 0452 /**< No collective I/O was performed. Collective I/O was not requested or 0453 collective I/O isn't possible on this dataset */ 0454 H5D_MPIO_CHUNK_INDEPENDENT = 0x1, 0455 /**< HDF5 performed one the chunk collective optimization schemes and each 0456 chunk was accessed independently */ 0457 H5D_MPIO_CHUNK_COLLECTIVE = 0x2, 0458 /**< HDF5 performed one the chunk collective optimization schemes and each 0459 chunk was accessed collectively */ 0460 H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2, 0461 /**< HDF5 performed one the chunk collective optimization schemes and some 0462 chunks were accessed independently, some collectively. */ 0463 H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4 0464 /**< Collective I/O was performed on a contiguous dataset */ 0465 } H5D_mpio_actual_io_mode_t; 0466 //! <!-- [H5D_mpio_actual_io_mode_t_snip] --> 0467 0468 //! <!-- [H5D_mpio_no_collective_cause_t_snip] --> 0469 /** 0470 * Broken collective IO property 0471 */ 0472 typedef enum H5D_mpio_no_collective_cause_t { 0473 H5D_MPIO_COLLECTIVE = 0x00, 0474 /**< Collective I/O was performed successfully */ 0475 H5D_MPIO_SET_INDEPENDENT = 0x01, 0476 /**< Collective I/O was not performed because independent I/O was requested */ 0477 H5D_MPIO_DATATYPE_CONVERSION = 0x02, 0478 /**< Collective I/O was not performed because datatype conversions were required and selection I/O was not 0479 possible (see below) */ 0480 H5D_MPIO_DATA_TRANSFORMS = 0x04, 0481 /**< Collective I/O was not performed because data transforms needed to be applied */ 0482 H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08, 0483 /**< Collective I/O was disabled by environment variable (\TText{HDF5_MPI_OPT_TYPES}) */ 0484 H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, 0485 /**< Collective I/O was not performed because one of the dataspaces was neither simple nor scalar */ 0486 H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20, 0487 /**< Collective I/O was not performed because the dataset was neither contiguous nor chunked */ 0488 H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40, 0489 /**< Collective I/O was not performed because parallel filtered writes are disabled */ 0490 H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE = 0x80, 0491 /**< Error */ 0492 H5D_MPIO_NO_SELECTION_IO = 0x100, 0493 /**< Collective I/O would be supported by selection or vector I/O but that feature was disabled 0494 (see causes via H5Pget_no_selection_io_cause()) */ 0495 H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x200 0496 /**< Sentinel */ 0497 } H5D_mpio_no_collective_cause_t; 0498 //! <!-- [H5D_mpio_no_collective_cause_t_snip] --> 0499 0500 /** 0501 * Causes for H5Pget_no_selection_io_cause() property 0502 */ 0503 #define H5D_SEL_IO_DISABLE_BY_API \ 0504 (0x0001u) /**< Selection I/O was not performed because \ 0505 the feature was disabled by the API */ 0506 #define H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET \ 0507 (0x0002u) /**< Selection I/O was not performed because the \ 0508 dataset was neither contiguous nor chunked */ 0509 #define H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER \ 0510 (0x0004u) /**< Selection I/O was not performed because of \ 0511 sieve buffer for contiguous dataset */ 0512 #define H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB \ 0513 (0x0008u) /**< Selection I/O was not performed because the VFD \ 0514 does not have vector or selection I/O callback */ 0515 #define H5D_SEL_IO_PAGE_BUFFER \ 0516 (0x0010u) /**< Selection I/O was not performed because of \ 0517 page buffer */ 0518 #define H5D_SEL_IO_DATASET_FILTER \ 0519 (0x0020u) /**< Selection I/O was not performed because of \ 0520 dataset filters */ 0521 #define H5D_SEL_IO_CHUNK_CACHE \ 0522 (0x0040u) /**< Selection I/O was not performed because of \ 0523 chunk cache */ 0524 #define H5D_SEL_IO_TCONV_BUF_TOO_SMALL \ 0525 (0x0080u) /**< Selection I/O was not performed because the \ 0526 type conversion buffer is too small */ 0527 #define H5D_SEL_IO_BKG_BUF_TOO_SMALL \ 0528 (0x0100u) /**< Selection I/O was not performed because the \ 0529 type conversion background buffer is too small */ 0530 #define H5D_SEL_IO_DEFAULT_OFF \ 0531 (0x0200u) /**< Selection I/O was not performed because the \ 0532 selection I/O mode is DEFAULT and the library \ 0533 chose it to be off for this case */ 0534 0535 /* Causes for H5D_MPIO_NO_SELECTION_IO */ 0536 #define H5D_MPIO_NO_SELECTION_IO_CAUSES \ 0537 (H5D_SEL_IO_DISABLE_BY_API | H5D_SEL_IO_TCONV_BUF_TOO_SMALL | H5D_SEL_IO_BKG_BUF_TOO_SMALL | \ 0538 H5D_SEL_IO_DATASET_FILTER | H5D_SEL_IO_CHUNK_CACHE) 0539 0540 //! <!--[H5D_selection_io_mode_t_snip] --> 0541 /** 0542 * Selection I/O mode property 0543 * 0544 * \details The default value, #H5D_SELECTION_IO_MODE_DEFAULT, 0545 * indicates selection I/O can be ON or OFF as 0546 * determined by library internal. 0547 */ 0548 typedef enum H5D_selection_io_mode_t { 0549 H5D_SELECTION_IO_MODE_DEFAULT = 0, 0550 /**< Default selection I/O mode. */ 0551 H5D_SELECTION_IO_MODE_OFF, 0552 /**< Selection I/O is off. */ 0553 H5D_SELECTION_IO_MODE_ON 0554 /**< Selection I/O is on. */ 0555 } H5D_selection_io_mode_t; 0556 //! <!--[H5D_selection_io_mode_t_snip] --> 0557 0558 /** 0559 * Causes for H5Pget_actual_selection_io_mode() property 0560 */ 0561 #define H5D_SCALAR_IO (0x0001u) /**< Scalar (or legacy MPIO) I/O was performed */ 0562 #define H5D_VECTOR_IO (0x0002u) /**< Vector I/O was performed */ 0563 #define H5D_SELECTION_IO (0x0004u) /**< Selection I/O was performed */ 0564 0565 /********************/ 0566 /* Public Variables */ 0567 /********************/ 0568 0569 /* Property list class IDs */ 0570 /* (Internal to library, do not use! Use macros above) */ 0571 H5_DLLVAR hid_t H5P_CLS_ROOT_ID_g; 0572 H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_ID_g; 0573 H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_ID_g; 0574 H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_ID_g; 0575 H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_ID_g; 0576 H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_ID_g; 0577 H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_ID_g; 0578 H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_ID_g; 0579 H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_ID_g; 0580 H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_ID_g; 0581 H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g; 0582 H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g; 0583 H5_DLLVAR hid_t H5P_CLS_MAP_CREATE_ID_g; 0584 H5_DLLVAR hid_t H5P_CLS_MAP_ACCESS_ID_g; 0585 H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g; 0586 H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g; 0587 H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g; 0588 H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g; 0589 H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g; 0590 H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g; 0591 H5_DLLVAR hid_t H5P_CLS_VOL_INITIALIZE_ID_g; 0592 H5_DLLVAR hid_t H5P_CLS_REFERENCE_ACCESS_ID_g; 0593 0594 /* Default property list IDs */ 0595 /* (Internal to library, do not use! Use macros above) */ 0596 H5_DLLVAR hid_t H5P_LST_FILE_CREATE_ID_g; 0597 H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ID_g; 0598 H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_ID_g; 0599 H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_ID_g; 0600 H5_DLLVAR hid_t H5P_LST_DATASET_XFER_ID_g; 0601 H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_ID_g; 0602 H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_ID_g; 0603 H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g; 0604 H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g; 0605 H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g; 0606 H5_DLLVAR hid_t H5P_LST_MAP_CREATE_ID_g; 0607 H5_DLLVAR hid_t H5P_LST_MAP_ACCESS_ID_g; 0608 H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g; 0609 H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g; 0610 H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g; 0611 H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g; 0612 H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g; 0613 H5_DLLVAR hid_t H5P_LST_VOL_INITIALIZE_ID_g; 0614 H5_DLLVAR hid_t H5P_LST_REFERENCE_ACCESS_ID_g; 0615 0616 /*********************/ 0617 /* Public Prototypes */ 0618 /*********************/ 0619 0620 /* Generic property list routines */ 0621 0622 /** 0623 * \ingroup PLCR 0624 * 0625 * \brief Terminates access to a property list 0626 * 0627 * \plist_id 0628 * 0629 * \return \herr_t 0630 * 0631 * \details H5Pclose() terminates access to a property list. All property 0632 * lists should be closed when the application is finished 0633 * accessing them. This frees resources used by the property 0634 * list. 0635 * 0636 * \since 1.0.0 0637 * 0638 */ 0639 H5_DLL herr_t H5Pclose(hid_t plist_id); 0640 /** 0641 * \ingroup PLCRA 0642 * 0643 * \brief Closes an existing property list class 0644 * 0645 * \plistcls_id{plist_id} 0646 * 0647 * \return \herr_t 0648 * 0649 * \details H5Pclose_class() removes a property list class from the library. 0650 * Existing property lists of this class will continue to exist, 0651 * but new ones are not able to be created. 0652 * 0653 * \since 1.4.0 0654 * 0655 */ 0656 H5_DLL herr_t H5Pclose_class(hid_t plist_id); 0657 /** 0658 * \ingroup PLCR 0659 * 0660 * \brief Copies an existing property list to create a new property list 0661 * 0662 * \plist_id 0663 * 0664 * \return \hid_t{property list} 0665 * 0666 * \details H5Pcopy() copies an existing property list to create a new 0667 * property list. The new property list has the same properties 0668 * and values as the original property list. 0669 * 0670 * \since 1.0.0 0671 * 0672 */ 0673 H5_DLL hid_t H5Pcopy(hid_t plist_id); 0674 /** 0675 * \ingroup PLCRA 0676 * 0677 * \brief Copies a property from one list or class to another 0678 * 0679 * \param[in] dst_id Identifier of the destination property list or class 0680 * \param[in] src_id Identifier of the source property list or class 0681 * \param[in] name Name of the property to copy 0682 * 0683 * \return \herr_t 0684 * 0685 * \details H5Pcopy_prop() copies a property from one property list or 0686 * class to another. 0687 * 0688 * If a property is copied from one class to another, all the 0689 * property information will be first deleted from the destination 0690 * class and then the property information will be copied from the 0691 * source class into the destination class. 0692 * 0693 * If a property is copied from one list to another, the property 0694 * will be first deleted from the destination list (generating a 0695 * call to the close callback for the property, if one exists) 0696 * and then the property is copied from the source list to the 0697 * destination list (generating a call to the copy callback for 0698 * the property, if one exists). 0699 * 0700 * If the property does not exist in the class or list, this 0701 * call is equivalent to calling H5Pregister() or H5Pinsert() (for 0702 * a class or list, as appropriate) and the create callback will 0703 * be called in the case of the property being copied into a list 0704 * (if such a callback exists for the property). 0705 * 0706 * \since 1.6.0 0707 * 0708 */ 0709 H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name); 0710 /** 0711 * \ingroup PLCR 0712 * 0713 * \brief Creates a new property list as an instance of a property list class 0714 * 0715 * \plistcls_id{cls_id} 0716 * 0717 * \return \hid_t{property list} 0718 * 0719 * \details H5Pcreate() creates a new property list as an instance of 0720 * some property list class. The new property list is initialized 0721 * with default values for the specified class. The classes are as 0722 * follows: 0723 * 0724 * <table> 0725 * <tr> 0726 * <th>Class Identifier</th> 0727 * <th>Class Name</th> 0728 * <th>Comments</th> 0729 * </tr> 0730 * <tr> 0731 * <td>#H5P_ATTRIBUTE_CREATE</td> 0732 * <td>attribute create</td> 0733 * <td>Properties for attribute creation</td> 0734 * </tr> 0735 * <tr> 0736 * <td>#H5P_DATASET_ACCESS</td> 0737 * <td>dataset access</td> 0738 * <td>Properties for dataset access</td> 0739 * </tr> 0740 * <tr> 0741 * <td>#H5P_DATASET_CREATE</td> 0742 * <td>dataset create</td> 0743 * <td>Properties for dataset creation</td> 0744 * </tr> 0745 * <tr> 0746 * <td>#H5P_DATASET_XFER</td> 0747 * <td>data transfer</td> 0748 * <td>Properties for raw data transfer</td> 0749 * </tr> 0750 * <tr> 0751 * <td>#H5P_DATATYPE_ACCESS</td> 0752 * <td>datatype access</td> 0753 * <td>Properties for datatype access</td> 0754 * </tr> 0755 * <tr> 0756 * <td>#H5P_DATATYPE_CREATE</td> 0757 * <td>datatype create</td> 0758 * <td>Properties for datatype creation</td> 0759 * </tr> 0760 * <tr> 0761 * <td>#H5P_FILE_ACCESS</td> 0762 * <td>file access</td> 0763 * <td>Properties for file access</td> 0764 * </tr> 0765 * <tr> 0766 * <td>#H5P_FILE_CREATE</td> 0767 * <td>file create</td> 0768 * <td>Properties for file creation</td> 0769 * </tr> 0770 * <tr> 0771 * <td>#H5P_FILE_MOUNT</td> 0772 * <td>file mount</td> 0773 * <td>Properties for file mounting</td> 0774 * </tr> 0775 * <tr valign="top"> 0776 * <td>#H5P_GROUP_ACCESS</td> 0777 * <td>group access</td> 0778 * <td>Properties for group access</td> 0779 * </tr> 0780 * <tr> 0781 * <td>#H5P_GROUP_CREATE</td> 0782 * <td>group create</td> 0783 * <td>Properties for group creation</td> 0784 * </tr> 0785 * <tr> 0786 * <td>#H5P_LINK_ACCESS</td> 0787 * <td>link access</td> 0788 * <td>Properties governing link traversal when accessing objects</td> 0789 * </tr> 0790 * <tr> 0791 * <td>#H5P_LINK_CREATE</td> 0792 * <td>link create</td> 0793 * <td>Properties governing link creation</td> 0794 * </tr> 0795 * <tr> 0796 * <td>#H5P_OBJECT_COPY</td> 0797 * <td>object copy</td> 0798 * <td>Properties governing the object copying process</td> 0799 * </tr> 0800 * <tr> 0801 * <td>#H5P_OBJECT_CREATE</td> 0802 * <td>object create</td> 0803 * <td>Properties for object creation</td> 0804 * </tr> 0805 * <tr> 0806 * <td>#H5P_STRING_CREATE</td> 0807 * <td>string create</td> 0808 * <td>Properties for character encoding when encoding strings or 0809 * object names</td> 0810 * </tr> 0811 * <tr> 0812 * <td>#H5P_VOL_INITIALIZE</td> 0813 * <td>vol initialize</td> 0814 * <td>Properties for VOL initialization</td> 0815 * </tr> 0816 * </table> 0817 * 0818 * This property list must eventually be closed with H5Pclose(); 0819 * otherwise, errors are likely to occur. 0820 * 0821 * \version 1.12.0 The #H5P_VOL_INITIALIZE property list class was added 0822 * \version 1.8.15 For each class, the class name returned by 0823 * H5Pget_class_name() was added. 0824 * The list of possible Fortran values was updated. 0825 * \version 1.8.0 The following property list classes were added at this 0826 * release: #H5P_DATASET_ACCESS, #H5P_GROUP_CREATE, 0827 * #H5P_GROUP_ACCESS, #H5P_DATATYPE_CREATE, 0828 * #H5P_DATATYPE_ACCESS, #H5P_ATTRIBUTE_CREATE 0829 * 0830 * \since 1.0.0 0831 * 0832 */ 0833 H5_DLL hid_t H5Pcreate(hid_t cls_id); 0834 /** 0835 * \ingroup PLCRA 0836 * 0837 * \brief Creates a new property list class 0838 * 0839 * \plistcls_id{parent} 0840 * \param[in] name Name of property list class to register 0841 * \param[in] create Callback routine called when a property list is 0842 * created 0843 * \param[in] create_data Pointer to user-defined class create data, to be 0844 * passed along to class create callback 0845 * \param[in] copy Callback routine called when a property list is 0846 * copied 0847 * \param[in] copy_data Pointer to user-defined class copy data, to be 0848 * passed along to class copy callback 0849 * \param[in] close Callback routine called when a property list is 0850 * being closed 0851 * \param[in] close_data Pointer to user-defined class close data, to be 0852 * passed along to class close callback 0853 * 0854 * \return \hid_t{property list class} 0855 * 0856 * \details H5Pcreate_class() registers a new property list class with the 0857 * library. The new property list class can inherit from an 0858 * existing property list class, \p parent, or may be derived 0859 * from the default “empty” class, NULL. New classes with 0860 * inherited properties from existing classes may not remove 0861 * those existing properties, only add or remove their own class 0862 * properties. Property list classes defined and supported in the 0863 * HDF5 library distribution are listed and briefly described in 0864 * H5Pcreate(). The \p create, \p copy, \p close functions are called 0865 * when a property list of the new class is created, copied, or closed, 0866 * respectively. 0867 * 0868 * H5Pclose_class() must be used to release the property list class 0869 * identifier returned by this function. 0870 * 0871 * \since 1.4.0 0872 * 0873 */ 0874 H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t create, void *create_data, 0875 H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, 0876 void *close_data); 0877 /** 0878 * \ingroup PLCR 0879 * 0880 * \brief Decodes property list received in a binary object buffer and 0881 * returns a new property list identifier 0882 * 0883 * \param[in] buf Buffer holding the encoded property list 0884 * 0885 * \return \hid_ti{object} 0886 * 0887 * \details Given a binary property list description in a buffer, H5Pdecode() 0888 * reconstructs the HDF5 property list and returns an identifier 0889 * for the new property list. The binary description of the property 0890 * list is encoded by H5Pencode(). 0891 * 0892 * The user is responsible for passing in the correct buffer. 0893 * 0894 * The property list identifier returned by this function should be 0895 * released with H5Pclose() when the identifier is no longer needed 0896 * so that resource leaks will not develop. 0897 * 0898 * \note Some properties cannot be encoded and therefore will not be available 0899 * in the decoded property list. These properties are discussed in 0900 * H5Pencode(). 0901 * 0902 * \since 1.10.0 0903 * 0904 */ 0905 H5_DLL hid_t H5Pdecode(const void *buf); 0906 /** 0907 * \ingroup PLCR 0908 * 0909 * \brief Encodes the property values in a property list into a binary 0910 * buffer 0911 * 0912 * \plist_id 0913 * \param[out] buf Buffer into which the property list will be encoded. 0914 * If the provided buffer is NULL, the size of the 0915 * buffer required is returned through \p nalloc; the 0916 * function does nothing more. 0917 * \param[out] nalloc The size of the required buffer 0918 * \fapl_id 0919 * 0920 * \return \herr_t 0921 * 0922 * \details H5Pencode2() encodes the property list \p plist_id into the 0923 * binary buffer \p buf, according to the file format setting 0924 * specified by the file access property list \p fapl_id. 0925 * 0926 * If the required buffer size is unknown, \p buf can be passed 0927 * in as NULL and the function will set the required buffer size 0928 * in \p nalloc. The buffer can then be created and the property 0929 * list encoded with a subsequent H5Pencode2() call. 0930 * 0931 * If the buffer passed in is not big enough to hold the encoded 0932 * properties, the H5Pencode2() call can be expected to fail with 0933 * a segmentation fault. 0934 * 0935 * The file access property list \p fapl_id is used to 0936 * control the encoding via the \a libver_bounds property 0937 * (see H5Pset_libver_bounds()). If the \a libver_bounds 0938 * property is missing, H5Pencode2() proceeds as if the \a 0939 * libver_bounds property were set to (#H5F_LIBVER_EARLIEST, 0940 * #H5F_LIBVER_LATEST). (Functionally, H5Pencode1() is identical to 0941 * H5Pencode2() with \a libver_bounds set to (#H5F_LIBVER_EARLIEST, 0942 * #H5F_LIBVER_LATEST).) 0943 * Properties that do not have encode callbacks will be skipped. 0944 * There is currently no mechanism to register an encode callback for 0945 * a user-defined property, so user-defined properties cannot currently 0946 * be encoded. 0947 * 0948 * Some properties cannot be encoded, particularly properties that are 0949 * reliant on local context. 0950 * 0951 * \b Motivation: 0952 * This function was introduced in HDF5-1.12 as part of the \a H5Sencode 0953 * format change to enable 64-bit selection encodings and a dataspace 0954 * selection that is tied to a file. 0955 * 0956 * \since 1.12.0 0957 * 0958 */ 0959 H5_DLL herr_t H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id); 0960 /** 0961 * \ingroup PLCRA 0962 * 0963 * \brief Compares two property lists or classes for equality 0964 * 0965 * \param[in] id1 First property object to be compared 0966 * \param[in] id2 Second property object to be compared 0967 * 0968 * \return \htri_t 0969 * 0970 * \details H5Pequal() compares two property lists or classes to determine 0971 * whether they are equal to one another. 0972 * 0973 * Either both \p id1 and \p id2 must be property lists or both 0974 * must be classes; comparing a list to a class is an error. 0975 * 0976 * \since 1.4.0 0977 * 0978 */ 0979 H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2); 0980 /** 0981 * \ingroup PLCRA 0982 * 0983 * \brief Queries whether a property name exists in a property list or 0984 * class 0985 * 0986 * \param[in] plist_id Identifier for the property list or class to query 0987 * \param[in] name Name of property to check for 0988 * 0989 * \return \htri_t 0990 * 0991 * \details H5Pexist() determines whether a property exists within a 0992 * property list or class. 0993 * 0994 * \since 1.4.0 0995 * 0996 */ 0997 H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); 0998 /** 0999 * \ingroup PLCRA 1000 * 1001 * \brief Queries the value of a property 1002 * 1003 * \plist_id 1004 * \param[in] name Name of property to query 1005 * \param[out] value Pointer to a location to which to copy the value of 1006 * the property 1007 * 1008 * \return \herr_t 1009 * 1010 * \details H5Pget() retrieves a copy of the value for a property in a 1011 * property list. If there is a \p get callback routine registered 1012 * for this property, the copy of the value of the property will 1013 * first be passed to that routine and any changes to the copy of 1014 * the value will be used when returning the property value from 1015 * this routine. 1016 * 1017 * This routine may be called for zero-sized properties with the 1018 * \p value set to NULL. The \p get routine will be called with 1019 * a NULL value if the callback exists. 1020 * 1021 * The property name must exist or this routine will fail. 1022 * 1023 * If the \p get callback routine returns an error, \p value will 1024 * not be modified. 1025 * 1026 * \since 1.4.0 1027 * 1028 */ 1029 H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value); 1030 /** 1031 * \ingroup PLCR 1032 * 1033 * \brief Returns the property list class identifier for a property list 1034 * 1035 * \plist_id 1036 * 1037 * \return \hid_t{property list class} 1038 * 1039 * \details H5Pget_class() returns the property list class identifier for 1040 * the property list identified by the \p plist_id parameter. 1041 * 1042 * Note that H5Pget_class() returns a value of #hid_t type, an 1043 * internal HDF5 identifier, rather than directly returning a 1044 * property list class. That identifier can then be used with 1045 * either H5Pequal() or H5Pget_class_name() to determine which 1046 * predefined HDF5 property list class H5Pget_class() has returned. 1047 * 1048 * A full list of valid predefined property list classes appears 1049 * in the description of H5Pcreate(). 1050 * 1051 * Determining the HDF5 property list class name with H5Pequal() 1052 * requires a series of H5Pequal() calls in an if-else sequence. 1053 * An iterative sequence of H5Pequal() calls can compare the 1054 * identifier returned by H5Pget_class() to members of the list of 1055 * valid property list class names. A pseudo-code snippet might 1056 * read as follows: 1057 * 1058 * \code 1059 * plist_class_id = H5Pget_class (dsetA_plist); 1060 * 1061 * if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = true; 1062 * [ H5P_OBJECT_CREATE is the property list class ] 1063 * [ returned by H5Pget_class. ] 1064 * 1065 * else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = true; 1066 * [ H5P_DATASET_CREATE is the property list class. ] 1067 * 1068 * else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = true; 1069 * [ H5P_DATASET_XFER is the property list class. ] 1070 * 1071 * . 1072 * . [ Continuing the iteration until a match is found. ] 1073 * . 1074 * \endcode 1075 * 1076 * H5Pget_class_name() returns the property list class name directly 1077 * as a string: 1078 * 1079 * \code 1080 * plist_class_id = H5Pget_class (dsetA_plist); 1081 * plist_class_name = H5Pget_class_name (plist_class_id) 1082 * \endcode 1083 * 1084 * Note that frequent use of H5Pget_class_name() can become a 1085 * performance problem in a high-performance environment. The 1086 * H5Pequal() approach is generally much faster. 1087 * 1088 * \version 1.6.0 Return type changed in this release. 1089 * \since 1.0.0 1090 * 1091 */ 1092 H5_DLL hid_t H5Pget_class(hid_t plist_id); 1093 /** 1094 * \ingroup PLCRA 1095 * 1096 * \brief Retrieves the name of a class 1097 * 1098 * \plistcls_id{pclass_id} 1099 * 1100 * \return Returns a pointer to an allocated string containing the class 1101 * name if successful, and NULL if not successful. 1102 * 1103 * \details H5Pget_class_name() retrieves the name of a generic property 1104 * list class. The pointer to the name must be freed by the user 1105 * with a call to H5free_memory() after each successful call. 1106 * 1107 * <table> 1108 * <tr> 1109 * <th>Class Name (class identifier) Returned</th> 1110 * <th>Property List Class</th> 1111 * <th>Expanded Name of the Property List Class</th> 1112 * <th>The Class Identifier Used with H5Pcreate</th> 1113 * <th>Comments</th> 1114 * </tr> 1115 * <tr> 1116 * <td>attribute create</td> 1117 * <td>acpl</td> 1118 * <td>Attribute Creation Property List</td> 1119 * <td>H5P_ATTRIBUTE_CREATE</td> 1120 * <td> </td> 1121 * </tr> 1122 * <tr> 1123 * <td>dataset access</td> 1124 * <td>dapl</td> 1125 * <td>Dataset Access Property List</td> 1126 * <td>H5P_DATASET_ACCESS</td> 1127 * <td> </td> 1128 * </tr> 1129 * <tr> 1130 * <td>dataset create</td> 1131 * <td>dcpl</td> 1132 * <td>Dataset Creation Property List</td> 1133 * <td>H5P_DATASET_CREATE</td> 1134 * <td> </td> 1135 * </tr> 1136 * <tr> 1137 * <td>data transfer</td> 1138 * <td>dxpl</td> 1139 * <td>Data Transfer Property List</td> 1140 * <td>H5P_DATASET_XFER</td> 1141 * <td> </td> 1142 * </tr> 1143 * <tr> 1144 * <td>datatype access</td> 1145 * <td> </td> 1146 * <td> </td> 1147 * <td>H5P_DATATYPE_ACCESS</td> 1148 * <td>This class can be created, but there are no properties 1149 * in the class currently. 1150 * </td> 1151 * </tr> 1152 * <tr> 1153 * <td>datatype create</td> 1154 * <td> </td> 1155 * <td> </td> 1156 * <td>H5P_DATATYPE_CREATE</td> 1157 * <td>This class can be created, but there 1158 * are no properties in the class currently.</td> 1159 * </tr> 1160 * <tr> 1161 * <td>file access</td> 1162 * <td>fapl</td> 1163 * <td>File Access Property List</td> 1164 * <td>H5P_FILE_ACCESS</td> 1165 * <td> </td> 1166 * </tr> 1167 * <tr> 1168 * <td>file create</td> 1169 * <td>fcpl</td> 1170 * <td>File Creation Property List</td> 1171 * <td>H5P_FILE_CREATE</td> 1172 * <td> </td> 1173 * </tr> 1174 * <tr> 1175 * <td>file mount</td> 1176 * <td>fmpl</td> 1177 * <td>File Mount Property List</td> 1178 * <td>H5P_FILE_MOUNT</td> 1179 * <td> </td> 1180 * </tr> 1181 * <tr> 1182 * <td>group access</td> 1183 * <td> </td> 1184 * <td> </td> 1185 * <td>H5P_GROUP_ACCESS</td> 1186 * <td>This class can be created, but there 1187 * are no properties in the class currently.</td> 1188 * </tr> 1189 * <tr> 1190 * <td>group create</td> 1191 * <td>gcpl</td> 1192 * <td>Group Creation Property List</td> 1193 * <td>H5P_GROUP_CREATE</td> 1194 * <td> </td> 1195 * </tr> 1196 * <tr> 1197 * <td>link access</td> 1198 * <td>lapl</td> 1199 * <td>Link Access Property List</td> 1200 * <td>H5P_LINK_ACCESS</td> 1201 * <td> </td> 1202 * </tr> 1203 * <tr> 1204 * <td>link create</td> 1205 * <td>lcpl</td> 1206 * <td>Link Creation Property List</td> 1207 * <td>H5P_LINK_CREATE</td> 1208 * <td> </td> 1209 * </tr> 1210 * <tr> 1211 * <td>object copy</td> 1212 * <td>ocpypl</td> 1213 * <td>Object Copy Property List</td> 1214 * <td>H5P_OBJECT_COPY</td> 1215 * <td> </td> 1216 * </tr> 1217 * <tr> 1218 * <td>object create</td> 1219 * <td>ocpl</td> 1220 * <td>Object Creation Property List</td> 1221 * <td>H5P_OBJECT_CREATE</td> 1222 * <td> </td> 1223 * </tr> 1224 * <tr> 1225 * <td>string create</td> 1226 * <td>strcpl</td> 1227 * <td>String Creation Property List</td> 1228 * <td>H5P_STRING_CREATE</td> 1229 * <td> </td> 1230 * </tr> 1231 * </table> 1232 * 1233 * \since 1.4.0 1234 * 1235 */ 1236 H5_DLL char *H5Pget_class_name(hid_t pclass_id); 1237 /** 1238 * \ingroup PLCRA 1239 * 1240 * \brief Retrieves the parent class of a property class 1241 * 1242 * \plistcls_id{pclass_id} 1243 * 1244 * \return \hid_t{parent class object} 1245 * 1246 * \details H5Pget_class_parent() retrieves an identifier for the parent 1247 * class of a property class. 1248 * 1249 * \since 1.4.0 1250 * 1251 */ 1252 H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id); 1253 /** 1254 * \ingroup PLCRA 1255 * 1256 * \brief Queries the number of properties in a property list or class 1257 * 1258 * \param[in] id Identifier for property object to query 1259 * \param[out] nprops Number of properties in object 1260 * 1261 * \return \herr_t 1262 * 1263 * \details H5Pget_nprops() retrieves the number of properties in a 1264 * property list or property list class. 1265 * 1266 * If \p id is a property list identifier, the current number of 1267 * properties in the list is returned in \p nprops. 1268 * 1269 * If \p id is a property list class identifier, the number of 1270 * registered properties in the class is returned in \p nprops. 1271 * 1272 * \since 1.4.0 1273 * 1274 */ 1275 H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops); 1276 /** 1277 * \ingroup PLCRA 1278 * 1279 * \brief Queries the size of a property value in bytes 1280 * 1281 * \param[in] id Identifier of property object to query 1282 * \param[in] name Name of property to query 1283 * \param[out] size Size of property in bytes 1284 * 1285 * \return \herr_t 1286 * 1287 * \details H5Pget_size() retrieves the size of a property's value in 1288 * bytes. This function operates on both property lists and 1289 * property classes. 1290 * 1291 * Zero-sized properties are allowed and return 0. 1292 * 1293 * \since 1.4.0 1294 * 1295 */ 1296 H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); 1297 /** 1298 * \ingroup PLCRA 1299 * 1300 * \brief Registers a temporary property with a property list 1301 * 1302 * \plist_id 1303 * \param[in] name Name of property to create 1304 * \param[in] size Size of property in bytes 1305 * \param[in] value Initial value for the property 1306 * \param[in] set Callback routine called before a new value is copied 1307 * into the property's value 1308 * \param[in] get Callback routine called when a property value is 1309 * retrieved from the property 1310 * \param[in] prp_del Callback routine called when a property is deleted 1311 * from a property list 1312 * \param[in] copy Callback routine called when a property is copied 1313 * from an existing property list 1314 * \param[in] compare Callback routine called when a property is compared 1315 * with another property list 1316 * \param[in] close Callback routine called when a property list is 1317 * being closed and the property value will be disposed 1318 * of 1319 * 1320 * \return \herr_t 1321 * 1322 * \details H5Pinsert2() creates a new property in a property 1323 * list. The property will exist only in this property list and 1324 * copies made from it. 1325 * 1326 * The initial property value must be provided in \p value and 1327 * the property value will be set accordingly. 1328 * 1329 * The name of the property must not already exist in this list, 1330 * or this routine will fail. 1331 * 1332 * The \p set and \p get callback routines may be set to NULL 1333 * if they are not needed. 1334 * 1335 * Zero-sized properties are allowed and do not store any data 1336 * in the property list. The default value of a zero-size 1337 * property may be set to NULL. They may be used to indicate the 1338 * presence or absence of a particular piece of information. 1339 * 1340 * The \p set routine is called before a new value is copied 1341 * into the property. The #H5P_prp_set_func_t callback function 1342 * is defined as follows: 1343 * \snippet this H5P_prp_cb2_t_snip 1344 * 1345 * The parameters to the callback function are defined as follows: 1346 * <table> 1347 * <tr> 1348 * <td>\ref hid_t \c prop_id</td> 1349 * <td>IN: The identifier of the property list being 1350 * modified</td> 1351 * </tr> 1352 * <tr> 1353 * <td>\TText{const char * name}</td> 1354 * <td>IN: The name of the property being modified</td> 1355 * </tr> 1356 * <tr> 1357 * <td>\TText{size_t size}</td> 1358 * <td>IN: The size of the property in bytes</td> 1359 * </tr> 1360 * <tr> 1361 * <td>\TText{void * value}</td> 1362 * <td>IN: Pointer to new value pointer for the property 1363 * being modified</td> 1364 * </tr> 1365 * </table> 1366 * 1367 * The \p set routine may modify the value pointer to be set and 1368 * those changes will be used when setting the property's value. 1369 * If the \p set routine returns a negative value, the new property 1370 * value is not copied into the property and the \p set routine 1371 * returns an error value. The \p set routine will be called for 1372 * the initial value. 1373 * 1374 * \b Note: The \p set callback function may be useful to range 1375 * check the value being set for the property or may perform some 1376 * transformation or translation of the value set. The \p get 1377 * callback would then reverse the transformation or translation. 1378 * A single \p get or \p set callback could handle multiple 1379 * properties by performing different actions based on the 1380 * property name or other properties in the property list. 1381 * 1382 * The \p get routine is called when a value is retrieved from 1383 * a property value. The #H5P_prp_get_func_t callback function 1384 * is defined as follows: 1385 * 1386 * \snippet this H5P_prp_cb2_t_snip 1387 * 1388 * The parameters to the above callback function are: 1389 * 1390 * <table> 1391 * <tr> 1392 * <td>\ref hid_t \c prop_id</td> 1393 * <td>IN: The identifier of the property list being queried</td> 1394 * </tr> 1395 * <tr> 1396 * <td>\TText{const char * name}</td> 1397 * <td>IN: The name of the property being queried</td> 1398 * </tr> 1399 * <tr> 1400 * <td>\TText{size_t size}</td> 1401 * <td>IN: The size of the property in bytes</td> 1402 * </tr> 1403 * <tr> 1404 * <td>\TText{void * value}</td> 1405 * <td>IN: The value of the property being returned</td> 1406 * </tr> 1407 * </table> 1408 * 1409 * The \p get routine may modify the value to be returned from 1410 * the query and those changes will be preserved. If the \p get 1411 * routine returns a negative value, the query routine returns 1412 * an error value. 1413 * 1414 * The \p prp_del routine is called when a property is being 1415 * deleted from a property list. The #H5P_prp_delete_func_t 1416 * callback function is defined as follows: 1417 * 1418 * \snippet this H5P_prp_cb2_t_snip 1419 * 1420 * The parameters to the above callback function are: 1421 * 1422 * <table> 1423 * <tr> 1424 * <td>\ref hid_t \c prop_id</td> 1425 * <td>IN: The identifier of the property list the property is 1426 * being deleted from</td> 1427 * </tr> 1428 * <tr> 1429 * <td>\TText{const char * name}</td> 1430 * <td>IN: The name of the property in the list</td> 1431 * </tr> 1432 * <tr> 1433 * <td>\TText{size_t size}</td> 1434 * <td>IN: The size of the property in bytes</td> 1435 * </tr> 1436 * <tr> 1437 * <td>\TText{void * value}</td> 1438 * <td>IN: The value for the property being deleted</td> 1439 * </tr> 1440 * </table> 1441 * 1442 * The \p prp_del routine may modify the value passed in, but the 1443 * value is not used by the library when the \p prp_del routine 1444 * returns. If the \p prp_del routine returns a negative value, 1445 * the property list \p prp_del routine returns an error value but 1446 * the property is still deleted. 1447 * 1448 * The \p copy routine is called when a new property list with 1449 * this property is being created through a \p copy operation. 1450 * 1451 * The #H5P_prp_copy_func_t callback function is defined as follows: 1452 * 1453 * \snippet this H5P_prp_cb1_t_snip 1454 * 1455 * The parameters to the above callback function are: 1456 * <table> 1457 * <tr> 1458 * <td>\TText{const char * name}</td> 1459 * <td>IN: The name of the property being copied</td> 1460 * </tr> 1461 * <tr> 1462 * <td>\TText{size_t size}</td> 1463 * <td>IN: The size of the property in bytes</td> 1464 * </tr> 1465 * <tr> 1466 * <td>\TText{void * value}</td> 1467 * <td>IN/OUT: The value for the property being copied</td> 1468 * </tr> 1469 * </table> 1470 * 1471 * The \p copy routine may modify the value to be set and those 1472 * changes will be stored as the new value of the property. If the 1473 * \p copy routine returns a negative value, the new property value 1474 * is not copied into the property and the copy routine returns an 1475 * error value. 1476 * 1477 * The \p compare routine is called when a property list with this 1478 * property is compared to another property list with the same 1479 * property. 1480 * 1481 * The #H5P_prp_compare_func_t callback function is defined as 1482 * follows: 1483 * 1484 * \snippet this H5P_prp_compare_func_t_snip 1485 * 1486 * The parameters to the callback function are defined as follows: 1487 * 1488 * <table> 1489 * <tr> 1490 * <td>\TText{const void * value1}</td> 1491 * <td>IN: The value of the first property to compare</td> 1492 * </tr> 1493 * <tr> 1494 * <td>\TText{const void * value2}</td> 1495 * <td>IN: The value of the second property to compare</td> 1496 * </tr> 1497 * <tr> 1498 * <td>\TText{size_t size}</td> 1499 * <td>IN: The size of the property in bytes</td> 1500 * </tr> 1501 * </table> 1502 * 1503 * The \p compare routine may not modify the values. The \p compare 1504 * routine should return a positive value if \p value1 is greater 1505 * than \p value2, a negative value if \p value2 is greater than 1506 * \p value1 and zero if \p value1 and \p value2 are equal. 1507 * 1508 * The \p close routine is called when a property list with this 1509 * property is being closed. 1510 * 1511 * The #H5P_prp_close_func_t callback function is defined as follows: 1512 * \snippet this H5P_prp_cb1_t_snip 1513 * 1514 * The parameters to the callback function are defined as follows: 1515 * 1516 * <table> 1517 * <tr> 1518 * <td>\TText{const char * name}</td> 1519 * <td>IN: The name of the property in the list</td> 1520 * </tr> 1521 * <tr> 1522 * <td>\TText{size_t size}</td> 1523 * <td>IN: The size of the property in bytes</td> 1524 * </tr> 1525 * <tr> 1526 * <td>\TText{void * value}</td> 1527 * <td>IN: The value for the property being closed</td> 1528 * </tr> 1529 * </table> 1530 * 1531 * The \p close routine may modify the value passed in, the 1532 * value is not used by the library when the close routine 1533 * returns. If the \p close routine returns a negative value, 1534 * the property list \p close routine returns an error value 1535 * but the property list is still closed. 1536 * 1537 * \b Note: There is no \p create callback routine for temporary 1538 * property list objects; the initial value is assumed to 1539 * have any necessary setup already performed on it. 1540 * 1541 * \since 1.8.0 1542 * 1543 */ 1544 H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t set, 1545 H5P_prp_get_func_t get, H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy, 1546 H5P_prp_compare_func_t compare, H5P_prp_close_func_t close); 1547 /** 1548 * \ingroup PLCRA 1549 * 1550 * \brief Determines whether a property list is a member of a class 1551 * 1552 * \plist_id 1553 * \plistcls_id{pclass_id} 1554 * 1555 * \return \htri_t 1556 * 1557 * \details H5Pisa_class() checks to determine whether the property list 1558 * \p plist_id is a member of the property list class 1559 * \p pclass_id. 1560 * 1561 * \see H5Pcreate() 1562 * 1563 * \since 1.6.0 1564 * 1565 */ 1566 H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id); 1567 /** 1568 * \ingroup PLCRA 1569 * 1570 * \brief Iterates over properties in a property class or list 1571 * 1572 * \param[in] id Identifier of property object to iterate over 1573 * \param[in,out] idx Index of the property to begin with 1574 * \param[in] iter_func Function pointer to function to be called 1575 * with each property iterated over 1576 * \param[in,out] iter_data Pointer to iteration data from user 1577 * 1578 * \return On success: the return value of the last call to \p iter_func if 1579 * it was non-zero; zero if all properties have been processed. 1580 * On Failure, a negative value 1581 * 1582 * \details H5Piterate() iterates over the properties in the property 1583 * object specified in \p id, which may be either a property 1584 * list or a property class, performing a specified operation 1585 * on each property in turn. 1586 * 1587 * For each property in the object, \p iter_func and the 1588 * additional information specified below are passed to the 1589 * #H5P_iterate_t operator function. 1590 * 1591 * The iteration begins with the \p idx-th property in the 1592 * object; the next element to be processed by the operator 1593 * is returned in \p idx. If \p idx is NULL, the iterator 1594 * starts at the first property; since no stopping point is 1595 * returned in this case, the iterator cannot be restarted if 1596 * one of the calls to its operator returns non-zero. 1597 * 1598 * The operation \p iter_func receives the property list or class 1599 * identifier for the object being iterated over, \p id, the 1600 * name of the current property within the object, \p name, 1601 * and the pointer to the operator data passed in to H5Piterate(), 1602 * \p iter_data. 1603 * 1604 * \warning H5Piterate() assumes that the properties in the object 1605 * identified by \p id remain unchanged through the iteration. 1606 * If the membership changes during the iteration, the function's 1607 * behavior is undefined. 1608 * 1609 * \since 1.4.0 1610 * 1611 */ 1612 H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data); 1613 /** 1614 * \ingroup PLCRA 1615 * 1616 * \brief Registers a permanent property with a property list class 1617 * 1618 * \plistcls_id{cls_id} 1619 * \param[in] name Name of property to register 1620 * \param[in] size Size of property in bytes 1621 * \param[in] def_value Default value for property in newly created 1622 * property lists 1623 * \param[in] create Callback routine called when a property list is 1624 * being created and the property value will be 1625 * initialized 1626 * \param[in] set Callback routine called before a new value is 1627 * copied into the property's value 1628 * \param[in] get Callback routine called when a property value is 1629 * retrieved from the property 1630 * \param[in] prp_del Callback routine called when a property is deleted 1631 * from a property list 1632 * \param[in] copy Callback routine called when a property is copied 1633 * from a property list 1634 * \param[in] compare Callback routine called when a property is compared 1635 * with another property list 1636 * \param[in] close Callback routine called when a property list is 1637 * being closed and the property value will be 1638 * disposed of 1639 * 1640 * \return \herr_t 1641 * 1642 * \details H5Pregister2() registers a new property with a property list 1643 * class. The \p cls_id identifier can be obtained by calling 1644 * H5Pcreate_class(). The property will exist in all property 1645 * list objects of \p cl_id created after this routine finishes. The 1646 * name of the property must not already exist, or this routine 1647 * will fail. The default property value must be provided and all 1648 * new property lists created with this property will have the 1649 * property value set to the default value. Any of the callback 1650 * routines may be set to NULL if they are not needed. 1651 * 1652 * Zero-sized properties are allowed and do not store any data in 1653 * the property list. These may be used as flags to indicate the 1654 * presence or absence of a particular piece of information. The 1655 * default pointer for a zero-sized property may be set to NULL. 1656 * The property \p create and \p close callbacks are called for 1657 * zero-sized properties, but the \p set and \p get callbacks are 1658 * never called. 1659 * 1660 * The \p create routine is called when a new property list with 1661 * this property is being created. The #H5P_prp_create_func_t 1662 * callback function is defined as follows: 1663 * 1664 * \snippet this H5P_prp_cb1_t_snip 1665 * 1666 * The parameters to this callback function are defined as follows: 1667 * 1668 * <table> 1669 * <tr> 1670 * <td>\TText{const char * name}</td> 1671 * <td>IN: The name of the property being modified</td> 1672 * </tr> 1673 * <tr> 1674 * <td>\TText{size_t size}</td> 1675 * <td>IN: The size of the property in bytes</td> 1676 * </tr> 1677 * <tr> 1678 * <td>\TText{void * value}</td> 1679 * <td>IN/OUT: The default value for the property being created, 1680 * which will be passed to H5Pregister2()</td> 1681 * </tr> 1682 * </table> 1683 * 1684 * The \p create routine may modify the value to be set and those 1685 * changes will be stored as the initial value of the property. 1686 * If the \p create routine returns a negative value, the new 1687 * property value is not copied into the property and the 1688 * \p create routine returns an error value. 1689 * 1690 * The \p set routine is called before a new value is copied into 1691 * the property. The #H5P_prp_set_func_t callback function is defined 1692 * as follows: 1693 * 1694 * \snippet this H5P_prp_cb2_t_snip 1695 * 1696 * The parameters to this callback function are defined as follows: 1697 * 1698 * <table> 1699 * <tr> 1700 * <td>\ref hid_t \c prop_id</td> 1701 * <td>IN: The identifier of the property list being modified</td> 1702 * </tr> 1703 * <tr> 1704 * <td>\TText{const char * name}</td> 1705 * <td>IN: The name of the property being modified</td> 1706 * </tr> 1707 * <tr> 1708 * <td>\TText{size_t size}</td> 1709 * <td>IN: The size of the property in bytes</td> 1710 * </tr> 1711 * <tr> 1712 * <td>\TText{void *value}</td> 1713 * <td>IN/OUT: Pointer to new value pointer for the property 1714 * being modified</td> 1715 * </tr> 1716 * </table> 1717 * 1718 * The \p set routine may modify the value pointer to be set and 1719 * those changes will be used when setting the property's value. 1720 * If the \p set routine returns a negative value, the new property 1721 * value is not copied into the property and the \p set routine 1722 * returns an error value. The \p set routine will not be called 1723 * for the initial value; only the \p create routine will be called. 1724 * 1725 * \b Note: The \p set callback function may be useful to range 1726 * check the value being set for the property or may perform some 1727 * transformation or translation of the value set. The \p get 1728 * callback would then reverse the transformation or translation. 1729 * A single \p get or \p set callback could handle multiple 1730 * properties by performing different actions based on the property 1731 * name or other properties in the property list. 1732 * 1733 * The \p get routine is called when a value is retrieved from a 1734 * property value. The #H5P_prp_get_func_t callback function is 1735 * defined as follows: 1736 * 1737 * \snippet this H5P_prp_cb2_t_snip 1738 * 1739 * The parameters to the callback function are defined as follows: 1740 * 1741 * <table> 1742 * <tr> 1743 * <td>\ref hid_t \c prop_id</td> 1744 * <td>IN: The identifier of the property list being 1745 * queried</td> 1746 * </tr> 1747 * <tr> 1748 * <td>\TText{const char * name}</td> 1749 * <td>IN: The name of the property being queried</td> 1750 * </tr> 1751 * <tr> 1752 * <td>\TText{size_t size}</td> 1753 * <td>IN: The size of the property in bytes</td> 1754 * </tr> 1755 * <tr> 1756 * <td>\TText{void * value}</td> 1757 * <td>IN/OUT: The value of the property being returned</td> 1758 * </tr> 1759 * </table> 1760 * 1761 * The \p get routine may modify the value to be returned from the 1762 * query and those changes will be returned to the calling routine. 1763 * If the \p set routine returns a negative value, the query 1764 * routine returns an error value. 1765 * 1766 * The \p prp_del routine is called when a property is being 1767 * deleted from a property list. The #H5P_prp_delete_func_t 1768 * callback function is defined as follows: 1769 * 1770 * \snippet this H5P_prp_cb2_t_snip 1771 * 1772 * The parameters to the callback function are defined as follows: 1773 * 1774 * <table> 1775 * <tr> 1776 * <td>\ref hid_t \c prop_id</td> 1777 * <td>IN: The identifier of the property list the property is 1778 * being deleted from</td> 1779 * </tr> 1780 * <tr> 1781 * <td>\TText{const char * name}</td> 1782 * <td>IN: The name of the property in the list</td> 1783 * </tr> 1784 * <tr> 1785 * <td>\TText{size_t size}</td> 1786 * <td>IN: The size of the property in bytes</td> 1787 * </tr> 1788 * <tr> 1789 * <td>\TText{void * value}</td> 1790 * <td>IN: The value for the property being deleted</td> 1791 * </tr> 1792 * </table> 1793 * 1794 * The \p prp_del routine may modify the value passed in, but the 1795 * value is not used by the library when the \p prp_del routine 1796 * returns. If the \p prp_del routine returns a negative value, 1797 * the property list delete routine returns an error value but 1798 * the property is still deleted. 1799 * 1800 * The \p copy routine is called when a new property list with 1801 * this property is being created through a \p copy operation. 1802 * The #H5P_prp_copy_func_t callback function is defined as follows: 1803 * 1804 * \snippet this H5P_prp_cb1_t_snip 1805 * 1806 * The parameters to the callback function are defined as follows: 1807 * 1808 * <table> 1809 * <tr> 1810 * <td>\TText{const char * name}</td> 1811 * <td>IN: The name of the property being copied</td> 1812 * </tr> 1813 * <tr> 1814 * <td>\TText{size_t size}</td> 1815 * <td>IN: The size of the property in bytes</td> 1816 * </tr> 1817 * <tr> 1818 * <td>\TText{void * value}</td> 1819 * <td>IN/OUT: The value for the property being copied</td> 1820 * </tr> 1821 * </table> 1822 * 1823 * The \p copy routine may modify the value to be set and those 1824 * changes will be stored as the new value of the property. If 1825 * the \p copy routine returns a negative value, the new 1826 * property value is not copied into the property and the \p copy 1827 * routine returns an error value. 1828 * 1829 * The \p compare routine is called when a property list with this 1830 * property is compared to another property list with the same 1831 * property. The #H5P_prp_compare_func_t callback function is 1832 * defined as follows: 1833 * 1834 * \snippet this H5P_prp_compare_func_t_snip 1835 * 1836 * The parameters to the callback function are defined as follows: 1837 * 1838 * <table> 1839 * <tr> 1840 * <td>\TText{const void * value1}</td> 1841 * <td>IN: The value of the first property to compare</td> 1842 * </tr> 1843 * <tr> 1844 * <td>\TText{const void * value2}</td> 1845 * <td>IN: The value of the second property to compare</td> 1846 * </tr> 1847 * <tr> 1848 * <td>\TText{size_t size}</td> 1849 * <td>IN: The size of the property in bytes</td> 1850 * </tr> 1851 * </table> 1852 * 1853 * The \p compare routine may not modify the values. The \p compare 1854 * routine should return a positive value if \p value1 is greater 1855 * than \p value2, a negative value if \p value2 is greater than 1856 * \p value1 and zero if \p value1 and \p value2 are equal. 1857 * 1858 * The \p close routine is called when a property list with this 1859 * property is being closed. The #H5P_prp_close_func_t callback 1860 * function is defined as follows: 1861 * 1862 * \snippet this H5P_prp_cb1_t_snip 1863 * 1864 * The parameters to the callback function are defined as follows: 1865 * 1866 * <table> 1867 * <tr> 1868 * <td>\TText{const char * name}</td> 1869 * <td>IN: The name of the property in the list</td> 1870 * </tr> 1871 * <tr> 1872 * <td>\TText{size_t size}</td> 1873 * <td>IN: The size of the property in bytes</td> 1874 * </tr> 1875 * <tr> 1876 * <td>\TText{void * value}</td> 1877 * <td>IN: The value for the property being closed</td> 1878 * </tr> 1879 * </table> 1880 * 1881 * The \p close routine may modify the value passed in, but the 1882 * value is not used by the library when the \p close routine returns. 1883 * If the \p close routine returns a negative value, the property 1884 * list close routine returns an error value but the property list is 1885 * still closed. 1886 * 1887 * \since 1.8.0 1888 * 1889 */ 1890 H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, 1891 H5P_prp_create_func_t create, H5P_prp_set_func_t set, H5P_prp_get_func_t get, 1892 H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy, 1893 H5P_prp_compare_func_t compare, H5P_prp_close_func_t close); 1894 /** 1895 * \ingroup PLCRA 1896 * 1897 * \brief Removes a property from a property list 1898 * 1899 * \plist_id 1900 * \param[in] name Name of property to remove 1901 * 1902 * \return \herr_t 1903 * 1904 * \details H5Premove() removes a property from a property list. Both 1905 * properties which were in existence when the property list was 1906 * created (i.e. properties registered with H5Pregister()) and 1907 * properties added to the list after it was created (i.e. added 1908 * with H5Pinsert1() may be removed from a property list. 1909 * Properties do not need to be removed from a property list 1910 * before the list itself is closed; they will be released 1911 * automatically when H5Pclose() is called. 1912 * 1913 * If a \p close callback exists for the removed property, it 1914 * will be called before the property is released. 1915 * 1916 * \since 1.4.0 1917 * 1918 */ 1919 H5_DLL herr_t H5Premove(hid_t plist_id, const char *name); 1920 /** 1921 * \ingroup PLCRA 1922 * 1923 * \brief Sets a property list value 1924 * 1925 * \plist_id 1926 * \param[in] name Name of property to modify 1927 * \param[in] value Pointer to value to set the property to 1928 * 1929 * \return \herr_t 1930 * 1931 * \details H5Pset() sets a new value for a property in a property list. 1932 * If there is a \p set callback routine registered for this 1933 * property, the \p value will be passed to that routine and any 1934 * changes to the \p value will be used when setting the property 1935 * value. The information pointed to by the \p value pointer 1936 * (possibly modified by the \p set callback) is copied into the 1937 * property list value and may be changed by the application 1938 * making the H5Pset() call without affecting the property value. 1939 * 1940 * The property name must exist or this routine will fail. 1941 * 1942 * If the \p set callback routine returns an error, the property 1943 * value will not be modified. 1944 * 1945 * This routine may not be called for zero-sized properties and 1946 * will return an error in that case. 1947 * 1948 * \since 1.4.0 1949 * 1950 */ 1951 H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value); 1952 /** 1953 * \ingroup PLCRA 1954 * 1955 * \brief Removes a property from a property list class 1956 * 1957 * \plistcls_id{pclass_id} 1958 * \param[in] name Name of property to remove 1959 * 1960 * \return \herr_t 1961 * 1962 * \details H5Punregister() removes a property from a property list class. 1963 * Future property lists created of that class will not contain 1964 * this property; existing property lists containing this property 1965 * are not affected. 1966 * 1967 * \since 1.4.0 1968 * 1969 */ 1970 H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name); 1971 1972 /** 1973 * \ingroup DCPL 1974 * 1975 * \brief Verifies that all required filters are available 1976 * 1977 * \plist_id 1978 * 1979 * \return \htri_t 1980 * 1981 * \details H5Pall_filters_avail() verifies that all of the filters set in 1982 * the dataset or group creation property list \p plist_id are 1983 * currently available. 1984 * 1985 * \version 1.8.5 Function extended to work with group creation property 1986 * lists. 1987 * \since 1.6.0 1988 * 1989 */ 1990 H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); 1991 1992 /* Object creation property list (OCPL) routines */ 1993 1994 /** 1995 * \ingroup OCPL 1996 * 1997 * \brief Retrieves tracking and indexing settings for attribute creation 1998 * order 1999 * 2000 * \plist_id 2001 * \param[out] crt_order_flags Flags specifying whether to track and 2002 * index attribute creation order 2003 * 2004 * \return \herr_t 2005 * 2006 * \details H5Pget_attr_creation_order() retrieves the settings for 2007 * tracking and indexing attribute creation order on an object. 2008 * 2009 * \p plist_id is an object creation property list (\p ocpl), 2010 * as it can be a dataset or group creation property list 2011 * identifier. The term \p ocpl is used when different types 2012 * of objects may be involved. 2013 * 2014 * \p crt_order_flags returns flags with the following meanings: 2015 * 2016 * <table> 2017 * <tr> 2018 * <td>#H5P_CRT_ORDER_TRACKED</td> 2019 * <td>Attribute creation order is tracked but not necessarily 2020 * indexed.</td> 2021 * </tr> 2022 * <tr> 2023 * <td>#H5P_CRT_ORDER_INDEXED </td> 2024 * <td>Attribute creation order is indexed (requires 2025 * #H5P_CRT_ORDER_TRACKED).</td> 2026 * </tr> 2027 * </table> 2028 * 2029 * If \p crt_order_flags is returned with a value of 0 (zero), 2030 * attribute creation order is neither tracked nor indexed. 2031 * 2032 * \since 1.8.0 2033 * 2034 */ 2035 H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); 2036 /** 2037 * \ingroup OCPL 2038 * 2039 * \brief Retrieves attribute storage phase change thresholds 2040 * 2041 * \plist_id 2042 * \param[out] max_compact Maximum number of attributes to be stored in 2043 * compact storage (Default: 8) 2044 * \param[out] min_dense Minimum number of attributes to be stored in 2045 * dense storage (Default: 6) 2046 * 2047 * \return \herr_t 2048 * 2049 * \details H5Pget_attr_phase_change() retrieves threshold values for 2050 * attribute storage on an object. These thresholds determine the 2051 * point at which attribute storage changes from compact storage 2052 * (i.e., storage in the object header) to dense storage (i.e., 2053 * storage in a heap and indexed with a B-tree). 2054 * 2055 * In the general case, attributes are initially kept in compact 2056 * storage. When the number of attributes exceeds \p max_compact, 2057 * attribute storage switches to dense storage. If the number of 2058 * attributes subsequently falls below \p min_dense, the 2059 * attributes are returned to compact storage. 2060 * 2061 * If \p max_compact is set to 0 (zero), dense storage always used. 2062 * 2063 * \p plist_id is an object creation property list (\p ocpl), as it 2064 * can be a dataset or group creation property list identifier. 2065 * The term \p ocpl is used when different types of objects may be 2066 * involved. 2067 * 2068 * \since 1.8.0 2069 * 2070 */ 2071 H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); 2072 /** 2073 * \ingroup OCPL 2074 * 2075 * \brief Returns information about a filter in a pipeline 2076 * 2077 * \ocpl_id{plist_id} 2078 * \param[in] idx Sequence number within the filter pipeline of the filter 2079 * for which information is sought 2080 * \param[out] flags Bit vector specifying certain general properties of the 2081 * filter 2082 * \param[in,out] cd_nelmts Number of elements in \p cd_values 2083 * \param[out] cd_values Auxiliary data for the filter 2084 * \param[in] namelen Anticipated number of characters in \p name 2085 * \param[out] name Name of the filter 2086 * \param[out] filter_config Bit field, as described in H5Zget_filter_info() 2087 * 2088 * \return Returns a negative value on failure, and the filter identifier 2089 * if successful (see #H5Z_filter_t): 2090 * - #H5Z_FILTER_DEFLATE Data compression filter, 2091 * employing the gzip algorithm 2092 * - #H5Z_FILTER_SHUFFLE Data shuffling filter 2093 * - #H5Z_FILTER_FLETCHER32 Error detection filter, employing the 2094 * Fletcher32 checksum algorithm 2095 * - #H5Z_FILTER_SZIP Data compression filter, employing the 2096 * SZIP algorithm 2097 * - #H5Z_FILTER_NBIT Data compression filter, employing the 2098 * N-bit algorithm 2099 * - #H5Z_FILTER_SCALEOFFSET Data compression filter, employing the 2100 * scale-offset algorithm 2101 * 2102 * \details H5Pget_filter2() returns information about a filter specified by 2103 * its filter number, in a filter pipeline specified by the property 2104 * list with which it is associated. 2105 * 2106 * \p plist_id must be a dataset or group creation property list. 2107 * 2108 * \p idx is a value between zero and N-1, as described in 2109 * H5Pget_nfilters(). The function will return a negative value if 2110 * the filter number is out of range. 2111 * 2112 * The structure of the \p flags argument is discussed in 2113 * H5Pset_filter(). 2114 * 2115 * On input, \p cd_nelmts indicates the number of entries in the 2116 * \p cd_values array, as allocated by the caller; on return, 2117 * \p cd_nelmts contains the number of values defined by the filter. 2118 * 2119 * If \p name is a pointer to an array of at least \p namelen bytes, 2120 * the filter name will be copied into that array. The name will be 2121 * null terminated if \p namelen is large enough. The filter name 2122 * returned will be the name appearing in the file, the name 2123 * registered for the filter, or an empty string. 2124 * 2125 * \p filter_config is the bit field described in 2126 * H5Zget_filter_info(). 2127 * 2128 * \version 1.8.5 Function extended to work with group creation property 2129 * lists. 2130 * \since 1.8.0 2131 * 2132 */ 2133 H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, 2134 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 2135 char name[], unsigned *filter_config /*out*/); 2136 /** 2137 * \ingroup OCPL 2138 * 2139 * \brief Returns information about the specified filter 2140 * 2141 * \ocpl_id{plist_id} 2142 * \param[in] filter_id Filter identifier 2143 * \param[out] flags Bit vector specifying certain general 2144 * properties of the filter 2145 * \param[in,out] cd_nelmts Number of elements in \p cd_values 2146 * \param[out] cd_values[] Auxiliary data for the filter 2147 * \param[in] namelen Length of filter name and number of 2148 * elements in \p name 2149 * \param[out] name[] Name of filter 2150 * \param[out] filter_config Bit field, as described in 2151 * H5Zget_filter_info() 2152 * 2153 * \return \herr_t 2154 * 2155 * \details H5Pget_filter_by_id2() returns information about the filter 2156 * specified in \p filter_id, a filter identifier. 2157 * 2158 * \p plist_id must be a dataset or group creation property list 2159 * and \p filter_id must be in the associated filter pipeline. 2160 * 2161 * The \p filter_id and \p flags parameters are used in the same 2162 * manner as described in the discussion of H5Pset_filter(). 2163 * 2164 * Aside from the fact that they are used for output, the 2165 * parameters \p cd_nelmts and \p cd_values[] are used in the same 2166 * manner as described in the discussion of H5Pset_filter(). On 2167 * input, the \p cd_nelmts parameter indicates the number of 2168 * entries in the \p cd_values[] array allocated by the calling 2169 * program; on exit it contains the number of values defined by 2170 * the filter. 2171 * 2172 * On input, the \p namelen parameter indicates the number of 2173 * characters allocated for the filter name by the calling program 2174 * in the array \p name[]. On exit \p name[] contains the name of the 2175 * filter with one character of the name in each element of the 2176 * array. 2177 * 2178 * \p filter_config is the bit field described in 2179 * H5Zget_filter_info(). 2180 * 2181 * If the filter specified in \p filter_id is not set for the 2182 * property list, an error will be returned and 2183 * H5Pget_filter_by_id2() will fail. 2184 * 2185 * \version 1.8.5 Function extended to work with group creation property 2186 * lists. 2187 * 2188 * \since 1.8.0 2189 * 2190 */ 2191 H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t filter_id, unsigned int *flags /*out*/, 2192 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 2193 char name[] /*out*/, unsigned *filter_config /*out*/); 2194 /** 2195 * \ingroup OCPL 2196 * 2197 * \brief Returns the number of filters in the pipeline 2198 * 2199 * \ocpl_id{plist_id} 2200 * 2201 * \return Returns the number of filters in the pipeline if successful; 2202 * otherwise returns a negative value. 2203 * 2204 * \details H5Pget_nfilters() returns the number of filters defined in the 2205 * filter pipeline associated with the property list \p plist_id. 2206 * 2207 * In each pipeline, the filters are numbered from 0 through \TText{N-1}, 2208 * where \c N is the value returned by this function. During output to 2209 * the file, the filters are applied in increasing order; during 2210 * input from the file, they are applied in decreasing order. 2211 * 2212 * H5Pget_nfilters() returns the number of filters in the pipeline, 2213 * including zero (0) if there are none. 2214 * 2215 * \since 1.0.0 2216 * 2217 */ 2218 H5_DLL int H5Pget_nfilters(hid_t plist_id); 2219 /** 2220 * \ingroup OCPL 2221 * 2222 * \brief Determines whether times associated with an object 2223 * are being recorded 2224 * 2225 * \plist_id 2226 * \param[out] track_times Boolean value, 1 (true) or 0 (false), 2227 * specifying whether object times are being recorded 2228 * 2229 * \return \herr_t 2230 * 2231 * \details H5Pget_obj_track_times() queries the object creation property 2232 * list, \p plist_id, to determine whether object times are being 2233 * recorded. 2234 * 2235 * If \p track_times is returned as 1, times are being recorded; 2236 * if \p track_times is returned as 0, times are not being 2237 * recorded. 2238 * 2239 * Time data can be retrieved with H5Oget_info(), which will return 2240 * it in the #H5O_info_t struct. 2241 * 2242 * If times are not tracked, they will be reported as follows 2243 * when queried: 12:00 AM UDT, Jan. 1, 1970 2244 * 2245 * See H5Pset_obj_track_times() for further discussion. 2246 * 2247 * \since 1.8.0 2248 * 2249 */ 2250 H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); 2251 /** 2252 * \ingroup OCPL 2253 * 2254 * \brief Modifies a filter in the filter pipeline 2255 * 2256 * \ocpl_id{plist_id} 2257 * \param[in] filter Filter to be modified 2258 * \param[in] flags Bit vector specifying certain general properties 2259 * of the filter 2260 * \param[in] cd_nelmts Number of elements in \p cd_values 2261 * \param[in] cd_values[] Auxiliary data for the filter 2262 * 2263 * \return \herr_t 2264 * 2265 * \details H5Pmodify_filter() modifies the specified \p filter in the 2266 * filter pipeline. \p plist_id must be a dataset or group 2267 * creation property list. 2268 * 2269 * The \p filter, \p flags \p cd_nelmts[], and \p cd_values 2270 * parameters are used in the same manner and accept the same 2271 * values as described in the discussion of H5Pset_filter(). 2272 * 2273 * \version 1.8.5 Function extended to work with group creation property 2274 * lists. 2275 * \since 1.6.0 2276 * 2277 */ 2278 H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, 2279 const unsigned int cd_values[/*cd_nelmts*/]); 2280 /** 2281 * \ingroup OCPL 2282 * 2283 * \brief Delete one or more filters in the filter pipeline 2284 * 2285 * \ocpl_id{plist_id} 2286 * \param[in] filter Filter to be deleted 2287 * 2288 * \return \herr_t 2289 * 2290 * \details H5Premove_filter() removes the specified \p filter from the 2291 * filter pipeline in the dataset or group creation property 2292 * list \p plist_id. 2293 * 2294 * The \p filter parameter specifies the filter to be removed. 2295 * Valid values for use in \p filter are as follows: 2296 * 2297 * <table> 2298 * <tr> 2299 * <td>#H5Z_FILTER_ALL</td> 2300 * <td>Removes all filters from the filter pipeline</td> 2301 * </tr> 2302 * <tr> 2303 * <td>#H5Z_FILTER_DEFLATE</td> 2304 * <td>Data compression filter, employing the gzip 2305 * algorithm</td> 2306 * </tr> 2307 * <tr> 2308 * <td>#H5Z_FILTER_SHUFFLE</td> 2309 * <td>Data shuffling filter</td> 2310 * </tr> 2311 * <tr> 2312 * <td>#H5Z_FILTER_FLETCHER32</td> 2313 * <td>Error detection filter, employing the Fletcher32 2314 * checksum algorithm</td> 2315 * </tr> 2316 * <tr> 2317 * <td>#H5Z_FILTER_SZIP</td> 2318 * <td>Data compression filter, employing the SZIP 2319 * algorithm</td> 2320 * </tr> 2321 * <tr> 2322 * <td>#H5Z_FILTER_NBIT</td> 2323 * <td>Data compression filter, employing the N-Bit 2324 * algorithm</td> 2325 * </tr> 2326 * <tr> 2327 * <td>#H5Z_FILTER_SCALEOFFSET</td> 2328 * <td>Data compression filter, employing the scale-offset 2329 * algorithm</td> 2330 * </tr> 2331 * </table> 2332 * 2333 * Additionally, user-defined filters can be removed with this 2334 * routine by passing the filter identifier with which they were 2335 * registered with the HDF5 library. 2336 * 2337 * Attempting to remove a filter that is not in the filter 2338 * pipeline is an error. 2339 * 2340 * \version 1.8.5 Function extended to work with group creation property 2341 * lists. 2342 * \since 1.6.3 2343 * 2344 */ 2345 H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); 2346 /** 2347 * \ingroup OCPL 2348 * 2349 * \brief Sets tracking and indexing of attribute creation order 2350 * 2351 * \plist_id 2352 * \param[in] crt_order_flags Flags specifying whether to track and index 2353 * attribute creation order. \em Default: No 2354 * flag set; attribute creation order is neither 2355 * tracked not indexed 2356 * 2357 * \return \herr_t 2358 * 2359 * \details H5Pset_attr_creation_order() sets flags for tracking and 2360 * indexing attribute creation order on an object. 2361 * 2362 * \p plist_id is a dataset or group creation property list 2363 * identifier. 2364 * 2365 * \p crt_order_flags contains flags with the following meanings: 2366 * 2367 * <table> 2368 * <tr> 2369 * <td>#H5P_CRT_ORDER_TRACKED</td> 2370 * <td>Attribute creation order is tracked but not necessarily 2371 * indexed.</td> 2372 * </tr> 2373 * <tr> 2374 * <td>#H5P_CRT_ORDER_INDEXED </td> 2375 * <td>Attribute creation order is indexed (requires 2376 * #H5P_CRT_ORDER_TRACKED).</td> 2377 * </tr> 2378 * </table> 2379 * 2380 * Default behavior is that attribute creation order is neither 2381 * tracked nor indexed. 2382 * 2383 * H5Pset_attr_creation_order() can be used to set attribute 2384 * creation order tracking, or to set attribute creation order 2385 * tracking and indexing. 2386 * 2387 * \note If a creation order index is to be built, it must be specified in 2388 * the object creation property list. HDF5 currently provides no 2389 * mechanism to turn on attribute creation order tracking at object 2390 * creation time and to build the index later. 2391 * 2392 * \since 1.8.0 2393 * 2394 */ 2395 H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); 2396 /** 2397 * \ingroup OCPL 2398 * 2399 * \brief Sets attribute storage phase change thresholds 2400 * 2401 * \plist_id 2402 * \param[in] max_compact Maximum number of attributes to be stored in 2403 * compact storage (\em Default: 8); must be greater 2404 * than or equal to \p min_dense 2405 * 2406 * \param[in] min_dense Minimum number of attributes to be stored in 2407 * dense storage (\em Default: 6) 2408 * 2409 * \return \herr_t 2410 * 2411 * \details H5Pset_attr_phase_change() sets threshold values for attribute 2412 * storage on an object. These thresholds determine the point at 2413 * which attribute storage changes from compact storage (i.e., 2414 * storage in the object header) to dense storage (i.e., storage 2415 * in a heap and indexed with a B-tree). 2416 * 2417 * In the general case, attributes are initially kept in compact 2418 * storage. When the number of attributes exceeds \p max_compact, 2419 * attribute storage switches to dense storage. If the number of 2420 * attributes subsequently falls below \p min_dense, the attributes 2421 * are returned to compact storage. 2422 * 2423 * If \p max_compact is set to 0 (zero), dense storage is always 2424 * used. \p min_dense must be set to 0 (zero) when \p max_compact 2425 * is 0 (zero). 2426 * 2427 * \p plist_id is a dataset or group creation property list 2428 * identifier. 2429 * 2430 * \since 1.8.0 2431 * 2432 */ 2433 H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); 2434 /** 2435 * \ingroup DCPL 2436 * 2437 * \brief Sets deflate (GNU gzip) compression method and compression level 2438 * 2439 * \ocpl_id{plist_id} 2440 * \param[in] level Compression level 2441 * 2442 * \return \herr_t 2443 * 2444 * \par_compr_note 2445 * 2446 * \details H5Pset_deflate() sets the deflate compression method and the 2447 * compression level, \p level, for a dataset or group creation 2448 * property list, \p plist_id. 2449 * 2450 * The filter identifier set in the property list is 2451 * #H5Z_FILTER_DEFLATE. 2452 * 2453 * The compression level, \p level, is a value from zero to nine, 2454 * inclusive. A compression level of 0 (zero) indicates no 2455 * compression; compression improves but speed slows progressively 2456 * from levels 1 through 9: 2457 * 2458 * <table> 2459 * <tr> 2460 * <th>Compression Level</th> 2461 * <th>Gzip Action</th> 2462 * </tr> 2463 * <tr> 2464 * <td>0</td> 2465 * <td>No compression</td> 2466 * </tr> 2467 * <tr> 2468 * <td>1</td> 2469 * <td>Best compression speed; least compression</td> 2470 * </tr> 2471 * <tr> 2472 * <td>2 through 8</td> 2473 * <td>Compression improves; speed degrades</td> 2474 * </tr> 2475 * <tr> 2476 * <td>9</td> 2477 * <td>Best compression ratio; slowest speed</td> 2478 * </tr> 2479 * </table> 2480 * 2481 * Note that setting the compression level to 0 (zero) does not turn 2482 * off use of the gzip filter; it simply sets the filter to perform 2483 * no compression as it processes the data. 2484 * 2485 * HDF5 relies on GNU gzip for this compression. 2486 * 2487 * \version 1.8.5 Function extended to work with group creation property lists. 2488 * \since 1.0.0 2489 * 2490 */ 2491 H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned level); 2492 /** 2493 * \ingroup OCPL 2494 * 2495 * \brief Adds a filter to the filter pipeline 2496 * 2497 * \ocpl_id{plist_id} 2498 * \param[in] filter Filter identifier for the filter to be added to the 2499 * pipeline 2500 * \param[in] flags Bit vector specifying certain general properties of 2501 * the filter 2502 * \param[in] cd_nelmts Number of elements in \p cd_values 2503 * \param[in] cd_values Auxiliary data for the filter 2504 * 2505 * \return \herr_t 2506 * 2507 * \details H5Pset_filter() adds the specified \p filter identifier and 2508 * corresponding properties to the end of an output filter 2509 * pipeline. 2510 * 2511 * \p plist_id must be either a dataset creation property list or 2512 * group creation property list identifier. If \p plist_id is a 2513 * dataset creation property list identifier, the filter is added 2514 * to the raw data filter pipeline. 2515 * 2516 * If \p plist_id is a group creation property list identifier, 2517 * the filter is added to the link filter pipeline, which filters 2518 * the fractal heap used to store most of the link metadata in 2519 * certain types of groups. The only predefined filters that can 2520 * be set in a group creation property list are the gzip filter 2521 * (#H5Z_FILTER_DEFLATE) and the Fletcher32 error detection filter 2522 * (#H5Z_FILTER_FLETCHER32). 2523 * 2524 * The array \p cd_values contains \p cd_nelmts unsigned integers 2525 * which are auxiliary data for the filter. The values are typically 2526 * used as parameters to control the filter. In a filter's 2527 * \p set_local method (called from \p H5Dcreate), the values are 2528 * interpreted and possibly modified before they are used to control 2529 * the filter. These, possibly modified values, are then stored in 2530 * the dataset object header as auxiliary data for the filter. 2531 * 2532 * The \p flags argument is a bit vector with the following 2533 * fields specifying certain general properties of the filter: 2534 * 2535 * <table> 2536 * <tr> 2537 * <td>#H5Z_FLAG_OPTIONAL</td> 2538 * <td>If this bit is set then the filter is optional. If the 2539 * filter fails (see below) during an H5Dwrite() operation 2540 * then the filter is just excluded from the pipeline for 2541 * the chunk for which it failed; the filter will not 2542 * participate in the pipeline during an H5Dread() of the 2543 * chunk. This is commonly used for compression filters: 2544 * if the filter result would be larger than the input, 2545 * then the compression filter returns failure and the 2546 * uncompressed data is stored in the file.<br /><br /> 2547 * This flag should not be set for the Fletcher32 checksum 2548 * filter as it will bypass the checksum filter without 2549 * reporting checksum errors to an application.</td> 2550 * </tr> 2551 * <tr> 2552 * <td>#H5Z_FLAG_MANDATORY</td> 2553 * <td>If the filter is required, that is, set to mandatory, 2554 * and the filter fails, the library's behavior depends 2555 * on whether the chunk cache is in use: 2556 * \li If the chunk cache is enabled, data chunks will 2557 * be flushed to the file during H5Dclose() and the 2558 * library will return the failure in H5Dclose(). 2559 * \li When the chunk cache is disabled or not big enough, 2560 * or the chunk is being evicted from the cache, the 2561 * failure will happen during H5Dwrite(). 2562 * 2563 * In each case, the library will still write to the file 2564 * all data chunks that were processed by the filter 2565 * before the failure occurred.<br /><br /> 2566 * For example, assume that an application creates a 2567 * dataset of four chunks, the chunk cache is enabled and 2568 * is big enough to hold all four chunks, and the filter 2569 * fails when it tries to write the fourth chunk. The 2570 * actual flush of the chunks will happen during 2571 * H5Dclose(), not H5Dwrite(). By the time H5Dclose() 2572 * fails, the first three chunks will have been written 2573 * to the file. Even though H5Dclose() fails, all the 2574 * resources will be released and the file can be closed 2575 * properly. <br /><br /> 2576 * If, however, the filter fails on the second chunk, only 2577 * the first chunk will be written to the file as nothing 2578 * further can be written once the filter fails.</td> 2579 * </tr> 2580 * </table> 2581 * The \p filter parameter specifies the filter to be set. Valid 2582 * pre-defined filter identifiers are as follows: 2583 * 2584 * <table> 2585 * <tr> 2586 * <td>#H5Z_FILTER_DEFLATE</td> 2587 * <td>Data compression filter, employing the gzip 2588 * algorithm</td> 2589 * </tr> 2590 * <tr> 2591 * <td>#H5Z_FILTER_SHUFFLE</td> 2592 * <td>Data shuffling filter</td> 2593 * </tr> 2594 * <tr> 2595 * <td>#H5Z_FILTER_FLETCHER32</td> 2596 * <td>Error detection filter, employing the Fletcher32 2597 * checksum algorithm</td> 2598 * </tr> 2599 * <tr> 2600 * <td>#H5Z_FILTER_SZIP</td> 2601 * <td>Data compression filter, employing the SZIP 2602 * algorithm</td> 2603 * </tr> 2604 * <tr> 2605 * <td>#H5Z_FILTER_NBIT</td> 2606 * <td>Data compression filter, employing the N-Bit 2607 * algorithm</td> 2608 * </tr> 2609 * <tr> 2610 * <td>#H5Z_FILTER_SCALEOFFSET</td> 2611 * <td>Data compression filter, employing the scale-offset 2612 * algorithm</td> 2613 * </tr> 2614 * </table> 2615 * Also see H5Pset_edc_check() and H5Pset_filter_callback(). 2616 * 2617 * \note When a non-empty filter pipeline is used with a group creation 2618 * property list, the group will be created with the new group file 2619 * format. The filters will come into play only when dense storage 2620 * is used (see H5Pset_link_phase_change()) and will be applied to 2621 * the group's fractal heap. The fractal heap will contain most of 2622 * the group's link metadata, including link names. 2623 * 2624 * \note When working with group creation property lists, if you are 2625 * adding a filter that is not in HDF5's set of predefined filters, 2626 * i.e., a user-defined or third-party filter, you must first 2627 * determine that the filter will work for a group. See the 2628 * discussion of the set local and can apply callback functions 2629 * in H5Zregister(). 2630 * 2631 * \note If multiple filters are set for a property list, they will be 2632 * applied to each chunk of raw data for datasets or each block 2633 * of the fractal heap for groups in the order in which they were 2634 * set. 2635 * 2636 * \note Filters can be applied only to chunked datasets; they cannot be 2637 * used with other dataset storage methods, such as contiguous, 2638 * compact, or external datasets. 2639 * 2640 * \note Dataset elements of variable-length and dataset region 2641 * reference datatypes are stored in separate structures in the 2642 * file called heaps. Filters cannot currently be applied to 2643 * these heaps. 2644 * 2645 * \note <b>Filter Behavior in HDF5:</b><br /> 2646 * Filters can be inserted into the HDF5 pipeline to perform 2647 * functions such as compression and conversion. As such, they are 2648 * a very flexible aspect of HDF5; for example, a user-defined 2649 * filter could provide encryption for an HDF5 dataset. 2650 * 2651 * \note A filter can be declared as either required or optional. 2652 * Required is the default status; optional status must be 2653 * explicitly declared. 2654 * 2655 * \note A required filter that fails or is not defined causes an 2656 * entire output operation to fail; if it was applied when the 2657 * data was written, such a filter will cause an input operation 2658 * to fail. 2659 * 2660 * \note The following table summarizes required filter behavior. 2661 * <table> 2662 * <tr> 2663 * <th></th> 2664 * <th>Required FILTER_X not available</th> 2665 * <th>FILTER_X available</th> 2666 * </tr> 2667 * <tr> 2668 * <td>H5Pset_<FILTER_X></td> 2669 * <td>Will fail.</td> 2670 * <td>Will succeed.</td> 2671 * </tr> 2672 * <tr> 2673 * <td>H5Dwrite with FILTER_X set</td> 2674 * <td>Will fail.</td> 2675 * <td>Will succeed; FILTER_X will be applied to 2676 * the data.</td> 2677 * </tr> 2678 * <tr> 2679 * <td>H5Dread with FILTER_X set</td> 2680 * <td>Will fail.</td> 2681 * <td>Will succeed.</td> 2682 * </tr> 2683 * </table> 2684 * \note An optional filter can be set for an HDF5 dataset even when 2685 * the filter is not available. Such a filter can then be 2686 * applied to the dataset when it becomes available on the 2687 * original system or when the file containing the dataset is 2688 * processed on a system on which it is available. 2689 * 2690 * \note A filter can be declared as optional through the use of the 2691 * #H5Z_FLAG_OPTIONAL flag with H5Pset_filter(). 2692 * 2693 * \note Consider a situation where one is creating files that will 2694 * normally be used only on systems where the optional (and 2695 * fictional) filter FILTER_Z is routinely available. One can 2696 * create those files on system A, which lacks FILTER_Z, create 2697 * chunked datasets in the files with FILTER_Z defined in the 2698 * dataset creation property list, and even write data to those 2699 * datasets. The dataset object header will indicate that FILTER_Z 2700 * has been associated with this dataset. But since system A does 2701 * not have FILTER_Z, dataset chunks will be written without it 2702 * being applied. 2703 * 2704 * \note HDF5 has a mechanism for determining whether chunks are 2705 * actually written with the filters specified in the object 2706 * header, so while the filter remains unavailable, system A will 2707 * be able to read the data. Once the file is moved to system B, 2708 * where FILTER_Z is available, HDF5 will apply FILTER_Z to any 2709 * data rewritten or new data written in these datasets. Dataset 2710 * chunks that have been written on system B will then be 2711 * unreadable on system A; chunks that have not been re-written 2712 * since being written on system A will remain readable on system 2713 * A. All chunks will be readable on system B. 2714 * 2715 * \note The following table summarizes optional filter behavior. 2716 * <table> 2717 * <tr> 2718 * <th></th> 2719 * <th>FILTER_Z not available</th> 2720 * <th>FILTER_Z available<br /> with encode and decode</th> 2721 * <th>FILTER_Z available decode only</th> 2722 * </tr> 2723 * <tr> 2724 * <td>H5Pset_<FILTER_Z></td> 2725 * <td>Will succeed.</td> 2726 * <td>Will succeed.</td> 2727 * <td>Will succeed.</td> 2728 * </tr> 2729 * <tr> 2730 * <td>H5Dread with FILTER_Z set</td> 2731 * <td>Will succeed if FILTER_Z has not actually<br /> 2732 * been applied to data.</td> 2733 * <td>Will succeed.</td> 2734 * <td>Will succeed.</td> 2735 * </tr> 2736 * <tr> 2737 * <td>H5Dwrite with FILTER_Z set</td> 2738 * <td>Will succeed;<br /> 2739 * FILTER_Z will not be applied to the data.</td> 2740 * <td>Will succeed;<br /> 2741 * FILTER_Z will be applied to the data.</td> 2742 * <td>Will succeed;<br /> 2743 * FILTER_Z will not be applied to the data.</td> 2744 * </tr> 2745 * </table> 2746 * \note The above principles apply generally in the use of HDF5 2747 * optional filters insofar as HDF5 does as much as possible to 2748 * complete an operation when an optional filter is unavailable. 2749 * (The SZIP filter is an exception to this rule; see H5Pset_szip() 2750 * for details.) 2751 * 2752 * \see \ref_filter_pipe, \ref_group_impls 2753 * 2754 * \version 1.8.5 Function applied to group creation property lists. 2755 * \since 1.6.0 2756 * 2757 */ 2758 H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, 2759 const unsigned int cd_values[]); 2760 /** 2761 * \ingroup OCPL 2762 * 2763 * \brief Sets up use of the Fletcher32 checksum filter 2764 * 2765 * \ocpl_id{plist_id} 2766 * 2767 * \return \herr_t 2768 * 2769 * \details H5Pset_fletcher32() sets the Fletcher32 checksum filter in the 2770 * dataset or group creation property list \p plist_id. 2771 * 2772 * \attention The Fletcher32 EDC checksum filter was added in HDF5 Release 2773 * 1.6.0. In the original implementation, however, the checksum 2774 * value was calculated incorrectly on little-endian systems. 2775 * The error was fixed in HDF5 Release 1.6.3. 2776 * 2777 * \attention As a result of this fix, an HDF5 library of Release 1.6.0 2778 * through Release 1.6.2 cannot read a dataset created or written 2779 * with Release 1.6.3 or later if the dataset was created with 2780 * the checksum filter and the filter is enabled in the reading 2781 * library. (Libraries of Release 1.6.3 and later understand the 2782 * earlier error and compensate appropriately.) 2783 * 2784 * \attention \b Work-around: An HDF5 library of Release 1.6.2 or earlier 2785 * will be able to read a dataset created or written with the 2786 * checksum filter by an HDF5 library of Release 1.6.3 or later 2787 * if the checksum filter is disabled for the read operation. 2788 * This can be accomplished via a call to H5Pset_edc_check() 2789 * with the value #H5Z_DISABLE_EDC in the second parameter. 2790 * This has the obvious drawback that the application will be 2791 * unable to verify the checksum, but the data does remain 2792 * accessible. 2793 * 2794 * \version 1.8.5 Function extended to work with group creation property 2795 * lists. 2796 * \version 1.6.3 Error in checksum calculation on little-endian systems 2797 * corrected in this release. 2798 * \since 1.6.0 2799 * 2800 */ 2801 H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); 2802 /** 2803 * \ingroup OCPL 2804 * 2805 * \brief Sets the recording of times associated with an object 2806 * 2807 * \param[in] plist_id Object creation property list identifier 2808 * \param[in] track_times Boolean value, 1 or 0, specifying whether object 2809 * times are to be tracked 2810 * 2811 * \return \herr_t 2812 * 2813 * \details H5Pset_obj_track_times() sets a property in the object creation 2814 * property list, \p plist_id, that governs the recording of times 2815 * associated with an object. 2816 * 2817 * If \p track_times is set to 1, time data will be recorded. If 2818 * \p track_times is set to 0, time data will not be recorded. 2819 * 2820 * Time data can be retrieved with H5Oget_info(), which will 2821 * return it in the #H5O_info_t struct. 2822 * 2823 * If times are not tracked, they will be reported as follows when queried: 2824 * \TText{ 12:00 AM UDT, Jan. 1, 1970} 2825 * 2826 * That date and time are commonly used to represent the beginning of the UNIX epoch. 2827 * 2828 * \since 1.8.0 2829 * 2830 */ 2831 H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); 2832 2833 /* File creation property list (FCPL) routines */ 2834 /** 2835 * \ingroup FCPL 2836 * 2837 * \brief Retrieves the file space page size for a file creation property 2838 * list 2839 * 2840 * \fcpl_id{plist_id} 2841 * \param[out] fsp_size File space page size 2842 * 2843 * \return \herr_t 2844 * 2845 * \details H5Pget_file_space_page_size() retrieves the file space page 2846 * size for paged aggregation in the parameter \p fsp_size. 2847 * 2848 * The library default is 4KB (4096) if \p fsp_size is not 2849 * previously set via a call to H5Pset_file_space_page_size(). 2850 * 2851 * \since 1.10.1 2852 * 2853 */ 2854 H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size); 2855 /** 2856 * \ingroup FCPL 2857 * 2858 * \brief Retrieves the file space handling strategy, persisting free-space 2859 * condition and threshold value for a file creation property list 2860 * 2861 * \fcpl_id{plist_id} 2862 * \param[out] strategy The file space handling strategy 2863 * \param[out] persist The boolean value indicating whether free space is 2864 * persistent or not 2865 * \param[out] threshold The free-space section size threshold value 2866 * 2867 * \return \herr_t 2868 * 2869 * \details H5Pget_file_space_strategy() retrieves the file space handling 2870 * strategy, the persisting free-space condition and the threshold 2871 * value in the parameters \p strategy, \p persist and 2872 * \p threshold respectively. 2873 * 2874 * The library default values returned when 2875 * H5Pset_file_space_strategy() has not been called are: 2876 * 2877 * \li \p strategy - #H5F_FSPACE_STRATEGY_FSM_AGGR 2878 * \li \p persist - 0 2879 * \li \p threshold - 1 2880 * 2881 * \since 1.10.1 2882 * 2883 */ 2884 H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist, 2885 hsize_t *threshold); 2886 /** 2887 * \ingroup FCPL 2888 * 2889 * \brief Queries the 1/2 rank of an indexed storage B-tree 2890 * 2891 * \fcpl_id{plist_id} 2892 * \param[out] ik Pointer to location to return the chunked storage B-tree 2893 * 1/2 rank (<em>Default value of B-tree 1/2 rank: 32</em>) 2894 * 2895 * \return \herr_t 2896 * 2897 * \details H5Pget_istore_k() queries the 1/2 rank of an indexed storage 2898 * B-tree. 2899 * 2900 * The argument \p ik may be the null pointer (NULL). 2901 * This function is valid only for file creation property lists. 2902 * 2903 * \see H5Pset_istore_k() 2904 * 2905 * \version 1.6.4 \p ik parameter type changed to \em unsigned. 2906 * \since 1.0.0 2907 * 2908 */ 2909 H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/); 2910 /** 2911 * \ingroup FCPL 2912 * 2913 * \brief Retrieves the configuration settings for a shared message index 2914 * 2915 * \fcpl_id{plist_id} 2916 * \param[in] index_num Index being configured 2917 * \param[out] mesg_type_flags Types of messages that may be stored in 2918 * this index 2919 * \param[out] min_mesg_size Minimum message size 2920 * 2921 * \return \herr_t 2922 * 2923 * \details H5Pget_shared_mesg_index() retrieves the message type and 2924 * minimum message size settings from the file creation property 2925 * list \p plist_id for the shared object header message index 2926 * specified by \p index_num. 2927 * 2928 * \p index_num specifies the index. \p index_num is zero-indexed, 2929 * so in a file with three indexes, they will be numbered 0, 1, 2930 * and 2. 2931 * 2932 * \p mesg_type_flags and \p min_mesg_size will contain, 2933 * respectively, the types of messages and the minimum size, in 2934 * bytes, of messages that can be stored in this index. 2935 * 2936 * Valid message types are described in H5Pset_shared_mesg_index(). 2937 * 2938 * \since 1.8.0 2939 * 2940 */ 2941 H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, 2942 unsigned *min_mesg_size); 2943 /** 2944 * \ingroup FCPL 2945 * 2946 * \brief Retrieves the number of shared object header message indexes in file 2947 * creation property list 2948 * 2949 * \fcpl_id{plist_id} 2950 * \param[out] nindexes Number of shared object header message indexes 2951 * available in files created with this property list 2952 * 2953 * \return \herr_t 2954 * 2955 * \details H5Pget_shared_mesg_nindexes() retrieves the number of shared 2956 * object header message indexes in the specified file creation 2957 * property list \p plist_id. 2958 * 2959 * If the value of \p nindexes is 0 (zero), shared object header 2960 * messages are disabled in files created with this property list. 2961 * 2962 * \since 1.8.0 2963 * 2964 */ 2965 H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes); 2966 /** 2967 * \ingroup FCPL 2968 * 2969 * \brief Retrieves shared object header message phase change information 2970 * 2971 * \fcpl_id{plist_id} 2972 * \param[out] max_list Threshold above which storage of a shared object 2973 * header message index shifts from list to B-tree 2974 * \param[out] min_btree Threshold below which storage of a shared object 2975 * header message index reverts to list format 2976 * 2977 * \return \herr_t 2978 * 2979 * \details H5Pget_shared_mesg_phase_change() retrieves the threshold values 2980 * for storage of shared object header message indexes in a file. 2981 * These phase change thresholds determine the point at which the 2982 * index storage mechanism changes from a more compact list format 2983 * to a more performance-oriented B-tree format, and vice-versa. 2984 * 2985 * By default, a shared object header message index is initially 2986 * stored as a compact list. When the number of messages in an 2987 * index exceeds the specified \p max_list threshold, storage 2988 * switches to a B-tree format for improved performance. If the 2989 * number of messages subsequently falls below the \p min_btree 2990 * threshold, the index will revert to the list format. 2991 * 2992 * If \p max_list is set to 0 (zero), shared object header message 2993 * indexes in the file will always be stored as B-trees. 2994 * 2995 * \p plist_id specifies the file creation property list. 2996 * 2997 * \since 1.8.0 2998 * 2999 */ 3000 H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree); 3001 /** 3002 * \ingroup FCPL 3003 * 3004 * \brief Retrieves the size of the offsets and lengths used in an HDF5 3005 * file 3006 * 3007 * \fcpl_id{plist_id} 3008 * \param[out] sizeof_addr Pointer to location to return offset size in 3009 * bytes 3010 * \param[out] sizeof_size Pointer to location to return length size in 3011 * bytes 3012 * 3013 * \return \herr_t 3014 * 3015 * \details H5Pget_sizes() retrieves the size of the offsets and lengths 3016 * used in an HDF5 file. This function is only valid for file 3017 * creation property lists. 3018 * 3019 * \since 1.0.0 3020 * 3021 */ 3022 H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*out*/); 3023 /** 3024 * \ingroup FCPL 3025 * 3026 * \brief Retrieves the size of the symbol table B-tree 1/2 rank and the 3027 * symbol table leaf node 1/2 size 3028 * 3029 * \fcpl_id{plist_id} 3030 * \param[out] ik Pointer to location to return the symbol table's B-tree 3031 * 1/2 rank (<em>Default value of B-tree 1/2 rank: 16</em>) 3032 * \param[out] lk Pointer to location to return the symbol table's leaf 3033 * node 1/2 size (<em>Default value of leaf node 1/2 3034 * size: 4</em>) 3035 * 3036 * \return \herr_t 3037 * 3038 * \details H5Pget_sym_k() retrieves the size of the symbol table B-tree 3039 * 1/2 rank and the symbol table leaf node 1/2 size. 3040 * 3041 * This function is valid only for file creation property lists. 3042 * 3043 * If a parameter value is set to NULL, that parameter is not 3044 * retrieved. 3045 * 3046 * \see H5Pset_sym_k() 3047 * 3048 * \version 1.6.4 \p ik parameter type changed to \em unsigned 3049 * \version 1.6.0 The \p ik parameter has changed from type int to 3050 * \em unsigned 3051 * 3052 * \since 1.0.0 3053 * 3054 */ 3055 H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/); 3056 /** 3057 * \ingroup FCPL 3058 * 3059 * \brief Retrieves the size of a user block 3060 * 3061 * \fcpl_id{plist_id} 3062 * \param[out] size Pointer to location to return user-block size 3063 * 3064 * \return \herr_t 3065 * 3066 * \details H5Pget_userblock() retrieves the size of a user block in a 3067 * file creation property list. 3068 * 3069 * \since 1.0.0 3070 * 3071 */ 3072 H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size); 3073 /** 3074 * \ingroup FCPL 3075 * 3076 * \brief Sets the file space page size for a file creation property list 3077 * 3078 * \fcpl_id{plist_id} 3079 * \param[in] fsp_size File space page size 3080 * 3081 * \return \herr_t 3082 * 3083 * \details H5Pset_file_space_page_size() sets the file space page size 3084 * \p fsp_size used in paged aggregation and paged buffering. 3085 * 3086 * \p fsp_size has a minimum size of 512. Setting a value less 3087 * than 512 will return an error. The library default size for 3088 * the file space page size when not set is 4096. 3089 * 3090 * The size set via this routine may not be changed for the life 3091 * of the file. 3092 * 3093 * \since 1.10.1 3094 * 3095 */ 3096 H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size); 3097 /** 3098 * \ingroup FCPL 3099 * 3100 * \brief Sets the file space handling strategy and persisting free-space 3101 * values for a file creation property list 3102 * 3103 * \fcpl_id{plist_id} 3104 * \param[in] strategy The file space handling strategy to be used. See: 3105 * #H5F_fspace_strategy_t 3106 * \param[in] persist A boolean value to indicate whether free space 3107 * should be persistent or not 3108 * \param[in] threshold The smallest free-space section size that the free 3109 * space manager will track 3110 * 3111 * \return \herr_t 3112 * 3113 * \details H5Pset_file_space_strategy() sets the file space handling 3114 * \p strategy, specifies persisting free-space or not (\p persist), 3115 * and sets the free-space section size \p threshold in the file 3116 * creation property list \p plist_id. 3117 * 3118 * #H5F_fspace_strategy_t is a struct defined in H5Fpublic.h as 3119 * follows: 3120 * 3121 * \snippet H5Fpublic.h H5F_fspace_strategy_t_snip 3122 * 3123 * This setting cannot be changed for the life of the file. 3124 * 3125 * As the #H5F_FSPACE_STRATEGY_AGGR and #H5F_FSPACE_STRATEGY_NONE 3126 * strategies do not use the free-space managers, the \p persist 3127 * and \p threshold settings will be ignored for those strategies. 3128 * 3129 * \since 1.10.1 3130 * 3131 */ 3132 H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist, 3133 hsize_t threshold); 3134 /** 3135 * \ingroup FCPL 3136 * 3137 * \brief Sets the size of the parameter used to control the B-trees for 3138 * indexing chunked datasets 3139 * 3140 * \fcpl_id{plist_id} 3141 * \param[in] ik 1/2 rank of chunked storage B-tree 3142 * 3143 * \return \herr_t 3144 * 3145 * \details H5Pset_istore_k() sets the size of the parameter used to 3146 * control the B-trees for indexing chunked datasets. This 3147 * function is valid only for file creation property lists. 3148 * 3149 * \p ik is one half the rank of a tree that stores chunked 3150 * raw data. On average, such a tree will be 75% full, or have 3151 * an average rank of 1.5 times the value of \p ik. 3152 * 3153 * The HDF5 library uses (\p ik*2) as the maximum # of entries 3154 * before splitting a B-tree node. Since only 2 bytes are used 3155 * in storing # of entries for a B-tree node in an HDF5 file, 3156 * (\p ik*2) cannot exceed 65536. The default value for 3157 * \p ik is 32. 3158 * 3159 * \version 1.6.4 \p ik parameter type changed to \p unsigned. 3160 * \since 1.0.0 3161 * 3162 */ 3163 H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik); 3164 /** 3165 * \ingroup FCPL 3166 * 3167 * \brief Configures the specified shared object header message index 3168 * 3169 * \fcpl_id{plist_id} 3170 * \param[in] index_num Index being configured 3171 * \param[in] mesg_type_flags Types of messages that should be stored in 3172 * this index 3173 * \param[in] min_mesg_size Minimum message size 3174 * 3175 * \return \herr_t 3176 * 3177 * \details H5Pset_shared_mesg_index() is used to configure the specified 3178 * shared object header message index, setting the types of 3179 * messages that may be stored in the index and the minimum size 3180 * of each message. 3181 * 3182 * \p plist_id specifies the file creation property list. 3183 * 3184 * \p index_num specifies the index to be configured. 3185 * \p index_num is zero-indexed, so in a file with three indexes, 3186 * they will be numbered 0, 1, and 2. 3187 * 3188 * \p mesg_type_flags and \p min_mesg_size specify, respectively, 3189 * the types and minimum size of messages that can be stored in 3190 * this index. 3191 * 3192 * Valid message types are as follows: 3193 * 3194 * <table> 3195 * <tr> 3196 * <td>#H5O_SHMESG_NONE_FLAG</td> 3197 * <td>No shared messages</td> 3198 * </tr> 3199 * <tr> 3200 * <td>#H5O_SHMESG_SDSPACE_FLAG</td> 3201 * <td>Simple dataspace message</td> 3202 * </tr> 3203 * <tr> 3204 * <td>#H5O_SHMESG_DTYPE_FLAG</td> 3205 * <td>Datatype message</td> 3206 * </tr> 3207 * <tr> 3208 * <td>#H5O_SHMESG_FILL_FLAG</td> 3209 * <td>Fill value message</td> 3210 * </tr> 3211 * <tr> 3212 * <td>#H5O_SHMESG_PLINE_FLAG</td> 3213 * <td>Filter pipeline message</td> 3214 * </tr> 3215 * <tr> 3216 * <td>#H5O_SHMESG_ATTR_FLAG</td> 3217 * <td>Attribute message</td> 3218 * </tr> 3219 * <tr> 3220 * <td>#H5O_SHMESG_ALL_FLAG</td> 3221 * <td>All message types; i.e., equivalent to the following: 3222 * (#H5O_SHMESG_SDSPACE_FLAG | #H5O_SHMESG_DTYPE_FLAG | 3223 * #H5O_SHMESG_FILL_FLAG | #H5O_SHMESG_PLINE_FLAG | 3224 * #H5O_SHMESG_ATTR_FLAG)</td> 3225 * </tr> 3226 * </table> 3227 * 3228 * \since 1.8.0 3229 * 3230 */ 3231 H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, 3232 unsigned min_mesg_size); 3233 /** 3234 * \ingroup FCPL 3235 * 3236 * \brief Sets number of shared object header message indexes 3237 * 3238 * \fcpl_id{plist_id} 3239 * \param[in] nindexes Number of shared object header message indexes to be 3240 * available in files created with this property list 3241 * (\p nindexes must be <= #H5O_SHMESG_MAX_NINDEXES (8)) 3242 * 3243 * \return \herr_t 3244 * 3245 * \details H5Pset_shared_mesg_nindexes() sets the number of shared object 3246 * header message indexes in the specified file creation property 3247 * list. 3248 * 3249 * This setting determines the number of shared object header 3250 * message indexes, \p nindexes, that will be available in files 3251 * created with this property list. These indexes can then be 3252 * configured with H5Pset_shared_mesg_index(). 3253 * 3254 * If \p nindexes is set to 0 (zero), shared object header messages 3255 * are disabled in files created with this property list. 3256 * 3257 * There is a limit of #H5O_SHMESG_MAX_NINDEXES (8) that can be set 3258 * with H5Pset_shared_mesg_nindexes(). An error will occur if 3259 * specifying a value of \p nindexes that is greater than this value. 3260 * 3261 * \since 1.8.0 3262 * 3263 */ 3264 H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes); 3265 /** 3266 * \ingroup FCPL 3267 * 3268 * \brief Sets shared object header message storage phase change thresholds 3269 * 3270 * \fcpl_id{plist_id} 3271 * \param[in] max_list Threshold above which storage of a shared object 3272 * header message index shifts from list to B-tree 3273 * \param[in] min_btree Threshold below which storage of a shared object 3274 * header message index reverts to list format 3275 * 3276 * \return \herr_t 3277 * 3278 * \details H5Pset_shared_mesg_phase_change() sets threshold values for 3279 * storage of shared object header message indexes in a file. 3280 * These phase change thresholds determine the point at which the 3281 * index storage mechanism changes from a more compact list format 3282 * to a more performance-oriented B-tree format, and vice-versa. 3283 * 3284 * By default, a shared object header message index is initially 3285 * stored as a compact list. When the number of messages in an 3286 * index exceeds the threshold value of \p max_list, storage 3287 * switches to a B-tree for improved performance. If the number 3288 * of messages subsequently falls below the \p min_btree threshold, 3289 * the index will revert to the list format. 3290 * 3291 * If \p max_list is set to 0 (zero), shared object header message 3292 * indexes in the file will be created as B-trees and will never 3293 * revert to lists. 3294 * 3295 * \p plist_id specifies the file creation property list. 3296 * 3297 * \since 1.8.0 3298 * 3299 */ 3300 H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree); 3301 /** 3302 * \ingroup FCPL 3303 * 3304 * \brief Sets the byte size of the offsets and lengths used to address 3305 * objects in an HDF5 file 3306 * 3307 * \fcpl_id{plist_id} 3308 * \param[in] sizeof_addr Size of an object offset in bytes 3309 * \param[in] sizeof_size Size of an object length in bytes 3310 * 3311 * \return \herr_t 3312 * 3313 * \details H5Pset_sizes() sets the byte size of the offsets and lengths 3314 * used to address objects in an HDF5 file. This function is only 3315 * valid for file creation property lists. Passing in a value 3316 * of 0 for one of the parameters retains the current value. The 3317 * default value for both values is the same as sizeof(hsize_t) 3318 * in the library (normally 8 bytes). Valid values currently 3319 * are 2, 4, 8 and 16. 3320 * 3321 * \since 1.0.0 3322 * 3323 */ 3324 H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size); 3325 /** 3326 * \ingroup FCPL 3327 * 3328 * \brief 3329 * 3330 * \fcpl_id{plist_id} 3331 * \param[in] ik Symbol table tree rank 3332 * \param[in] lk Symbol table node size 3333 * 3334 * \return \herr_t 3335 * 3336 * \details H5Pset_sym_k() sets the size of parameters used to control the 3337 * symbol table nodes. 3338 * 3339 * This function is valid only for file creation property lists. 3340 * Passing in a value of zero (0) for one of the parameters retains 3341 * the current value. 3342 * 3343 * \p ik is one half the rank of a B-tree that stores a symbol 3344 * table for a group. Internal nodes of the symbol table are on 3345 * average 75% full. That is, the average rank of the tree is 3346 * 1.5 times the value of \p ik. The HDF5 library uses (\p ik*2) as 3347 * the maximum # of entries before splitting a B-tree node. Since 3348 * only 2 bytes are used in storing # of entries for a B-tree node 3349 * in an HDF5 file, (\p ik*2) cannot exceed 65536. The default value 3350 * for \p ik is 16. 3351 * 3352 * \p lk is one half of the number of symbols that can be stored in 3353 * a symbol table node. A symbol table node is the leaf of a symbol 3354 * table tree which is used to store a group. When symbols are 3355 * inserted randomly into a group, the group's symbol table nodes are 3356 * 75% full on average. That is, they contain 1.5 times the number of 3357 * symbols specified by \p lk. The default value for \p lk is 4. 3358 * 3359 * \version 1.6.4 \p ik parameter type changed to \em unsigned. 3360 * \version 1.6.0 The \p ik parameter has changed from type int to 3361 * \em unsigned. 3362 * 3363 * \since 1.0.0 3364 * 3365 */ 3366 H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk); 3367 /** 3368 * \ingroup FCPL 3369 * 3370 * \brief Sets user block size 3371 * 3372 * \fcpl_id{plist_id} 3373 * \param[in] size Size of the user-block in bytes 3374 * 3375 * \return \herr_t 3376 * 3377 * \details H5Pset_userblock() sets the user block size of a file creation 3378 * property list. The default user block size is 0; it may be set 3379 * to any power of 2 equal to 512 or greater (512, 1024, 2048, etc.). 3380 * 3381 * \since 1.0.0 3382 * 3383 */ 3384 H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); 3385 3386 /* File access property list (FAPL) routines */ 3387 /** 3388 * \ingroup FAPL 3389 * 3390 * \brief Retrieves the current settings for alignment properties from a 3391 * file access property list 3392 * 3393 * \fapl_id 3394 * \param[out] threshold Pointer to location of return threshold value 3395 * \param[out] alignment Pointer to location of return alignment value 3396 * 3397 * \return \herr_t 3398 * 3399 * \details H5Pget_alignment() retrieves the current settings for 3400 * alignment properties from a file access property list. The 3401 * \p threshold and/or \p alignment pointers may be null 3402 * pointers (NULL). 3403 * 3404 * \since 1.0.0 3405 * 3406 */ 3407 H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /*out*/); 3408 /** 3409 * \ingroup FAPL 3410 * 3411 * \brief Queries the raw data chunk cache parameters 3412 * 3413 * \fapl_id{plist_id} 3414 * \param[in,out] mdc_nelmts <i>No longer used</i> 3415 * \param[in,out] rdcc_nslots Number of elements (objects) in the raw data 3416 * chunk cache 3417 * \param[in,out] rdcc_nbytes Total size of the raw data chunk cache, in 3418 * bytes 3419 * \param[in,out] rdcc_w0 Preemption policy 3420 * 3421 * \return \herr_t 3422 * 3423 * \details H5Pget_cache() retrieves the maximum possible number of 3424 * elements in the raw data chunk cache, the maximum possible 3425 * number of bytes in the raw data chunk cache, and the 3426 * preemption policy value. 3427 * 3428 * Any (or all) arguments may be null pointers, in which case 3429 * the corresponding datum is not returned. 3430 * 3431 * Note that the \p mdc_nelmts parameter is no longer used. 3432 * 3433 * \version 1.8.0 Use of the \p mdc_nelmts parameter discontinued. 3434 * Metadata cache configuration is managed with 3435 * H5Pset_mdc_config() and H5Pget_mdc_config() 3436 * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nslots parameters changed 3437 * from type int to size_t. 3438 * 3439 * \since 1.0.0 3440 * 3441 */ 3442 H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* out */ 3443 size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, double *rdcc_w0); 3444 /** 3445 * \ingroup FAPL 3446 * 3447 * \brief Gets information about the write tracking feature used by 3448 * the core VFD 3449 * 3450 * \fapl_id 3451 * \param[out] is_enabled Whether the feature is enabled 3452 * \param[out] page_size Size, in bytes, of write aggregation pages 3453 * 3454 * \return \herr_t 3455 * 3456 * \details H5Pget_core_write_tracking() retrieves information about the 3457 * write tracking feature used by the core VFD. 3458 * 3459 * When a file is created or opened for writing using the core 3460 * virtual file driver (VFD) with the backing store option turned 3461 * on, the VFD can be configured to track changes to the file 3462 * and only write out the modified bytes. To avoid a large number 3463 * of small writes, the changes can be aggregated into pages of 3464 * a user-specified size. The core VFD is also known as the 3465 * memory VFD. The driver identifier is #H5FD_CORE. 3466 * 3467 * \note This function is only for use with the core VFD and must be used 3468 * after the call to H5Pset_fapl_core(). It is an error to use this 3469 * function with any other VFD. 3470 * 3471 * \note This function only applies to the backing store write operation, 3472 * which typically occurs when the file is flushed or closed. This 3473 * function has no relationship to the increment parameter passed 3474 * to H5Pset_fapl_core(). 3475 * 3476 * \note For optimum performance, the \p page_size parameter should be 3477 * a power of two. 3478 * 3479 * \since 1.8.13 3480 * 3481 */ 3482 H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); 3483 /** 3484 * \ingroup FAPL 3485 * 3486 * \brief Returns low-lever driver identifier 3487 * 3488 * \plist_id 3489 * 3490 * \return \hid_t{low level driver} 3491 * 3492 * \details H5Pget_driver() returns the identifier of the low-level file 3493 * driver associated with the file access property list or 3494 * data transfer property list \p plist_id. 3495 * 3496 * Valid driver identifiers distributed with HDF5 are listed and 3497 * described in the following table. 3498 * <div> 3499 * \snippet{doc} tables/fileDriverLists.dox supported_file_driver_table 3500 * </div> 3501 * 3502 * This list does not include custom drivers that might be 3503 * defined and registered by a user. 3504 * 3505 * The returned driver identifier is only valid as long as the 3506 * file driver remains registered. 3507 * 3508 * 3509 * \since 1.2.0 3510 * 3511 */ 3512 H5_DLL hid_t H5Pget_driver(hid_t plist_id); 3513 /** 3514 * \ingroup FAPL 3515 * 3516 * \brief Returns a pointer to file driver information 3517 * 3518 * \param[in] plist_id File access or data transfer property list 3519 * identifier 3520 * 3521 * \return Returns a pointer to a struct containing low-level driver 3522 * information. Otherwise returns NULL. NULL is also returned if 3523 * no driver-specific properties have been registered. No error 3524 * is pushed on the stack in this case. 3525 * 3526 * \details H5Pget_driver_info() returns a pointer to file driver-specific 3527 * information for the low-level driver associated with the file 3528 * access or data transfer property list \p plist_id. 3529 * 3530 * The pointer returned by this function points to an “uncopied” 3531 * struct. Driver-specific versions of that struct are defined 3532 * for each low-level driver in the relevant source code file 3533 * H5FD*.c. For example, the struct used for the MULTI driver is 3534 * \c H5FD_multi_fapl_t defined in H5FDmulti.c. 3535 * 3536 * If no driver-specific properties have been registered, 3537 * H5Pget_driver_info() returns NULL. 3538 * 3539 * \note H5Pget_driver_info() and H5Pset_driver() are used only when 3540 * creating a virtual file driver (VFD) in the virtual file 3541 * layer (VFL). 3542 * 3543 * \version 1.10.1 Return value was changed from \em void * to 3544 * \em const \em void *. 3545 * \version 1.8.2 Function publicized in this release; previous releases 3546 * described this function only in the virtual file driver 3547 * documentation. 3548 * 3549 * \since 1.4.0 3550 * 3551 */ 3552 H5_DLL const void *H5Pget_driver_info(hid_t plist_id); 3553 /** 3554 * \ingroup FAPL 3555 * 3556 * \brief Retrieves a string representation of the configuration for 3557 * the driver set on the given FAPL. The returned string can 3558 * be used to configure the same driver in an identical way. 3559 * 3560 * \fapl_id 3561 * \param[out] config_buf Driver configuration string output buffer 3562 * \param[in] buf_size Size of driver configuration string output buffer 3563 * 3564 * \return Returns the length of the driver configuration string on 3565 * success (not including the NUL terminator). Returns negative 3566 * on failure. 3567 * 3568 * \details H5Pget_driver_config_str() retrieves a string representation 3569 * of the configuration for the driver set on the given FAPL. The 3570 * returned string can be used to configure the same driver in 3571 * an identical way. 3572 * 3573 * If \p config_buf is NULL, the length of the driver configuration 3574 * string is simply returned. The caller can then allocate a buffer 3575 * of the appropriate size and call this routine again. 3576 * 3577 * \since 1.14.0 3578 * 3579 */ 3580 H5_DLL ssize_t H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size); 3581 /** 3582 * \ingroup FAPL 3583 * 3584 * \brief Retrieves the size of the external link open file cache 3585 * 3586 * \fapl_id{plist_id} 3587 * \param[out] efc_size External link open file cache size in number of files 3588 * 3589 * \return \herr_t 3590 * 3591 * \details H5Pget_elink_file_cache_size() retrieves the number of files that 3592 * can be held open in an external link open file cache. 3593 * 3594 * \since 1.8.7 3595 * 3596 */ 3597 H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size); 3598 /** 3599 * \ingroup FAPL 3600 * 3601 * \brief Retrieves the file access property list setting that determines 3602 * whether an HDF5 object will be evicted from the library's metadata 3603 * cache when it is closed 3604 * 3605 * \fapl_id 3606 * \param[out] evict_on_close Pointer to a variable that will indicate if 3607 * the object will be evicted on close 3608 * 3609 * \return \herr_t 3610 * 3611 * \details The library's metadata cache is fairly conservative about holding on 3612 * to HDF5 object metadata (object headers, chunk index structures, 3613 * etc.), which can cause the cache size to grow, resulting in memory 3614 * pressure on an application or system. When enabled, the "evict on 3615 * close" property will cause all metadata for an object to be 3616 * immediately evicted from the cache as long as it is not referenced 3617 * by any other open object. 3618 * 3619 * See H5Pset_evict_on_close() for additional notes on behavior. 3620 * 3621 * \since 1.10.1 3622 * 3623 */ 3624 H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); 3625 /** 3626 * \ingroup FAPL 3627 * 3628 * \brief Retrieves a data offset from the file access property list 3629 * 3630 * \fapl_id 3631 * \param[out] offset Offset in bytes within the HDF5 file 3632 * 3633 * \return \herr_t 3634 * 3635 * \details H5Pget_family_offset() retrieves the value of offset from the 3636 * file access property list \p fapl_id so that the user 3637 * application can retrieve a file handle for low-level access to 3638 * a particular member of a family of files. The file handle is 3639 * retrieved with a separate call to H5Fget_vfd_handle() (or, 3640 * in special circumstances, to H5FDget_vfd_handle(), see \ref VFLTN). 3641 * 3642 * \since 1.6.0 3643 * 3644 */ 3645 H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset); 3646 /** 3647 * \ingroup FAPL 3648 * 3649 * \brief Returns the file close degree 3650 * 3651 * \fapl_id 3652 * \param[out] degree Pointer to a location to which to return the file 3653 * close degree property, the value of \p degree 3654 * 3655 * \return \herr_t 3656 * 3657 * \details H5Pget_fclose_degree() returns the current setting of the file 3658 * close degree property \p degree in the file access property 3659 * list \p fapl_id. The value of \p degree determines how 3660 * aggressively H5Fclose() deals with objects within a file that 3661 * remain open when H5Fclose() is called to close that file. 3662 * 3663 * \since 1.6.0 3664 * 3665 */ 3666 H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree); 3667 /** 3668 * \ingroup FAPL 3669 * 3670 * \brief Retrieves a copy of the file image designated as the initial content 3671 * and structure of a file 3672 * 3673 * \fapl_id 3674 * \param[in,out] buf_ptr_ptr On input, \c NULL or a pointer to a 3675 * pointer to a buffer that contains the 3676 * file image.\n On successful return, if \p buf_ptr_ptr is not 3677 * \c NULL, \TText{*buf_ptr_ptr} will contain a pointer to a copy 3678 * of the initial image provided in the last call to 3679 * H5Pset_file_image() for the supplied \p fapl_id. If no initial 3680 * image has been set, \TText{*buf_ptr_ptr} will be \c NULL. 3681 * \param[in,out] buf_len_ptr On input, \c NULL or a pointer to a buffer 3682 * specifying the required size of the buffer to hold the file 3683 * image.\n On successful return, if \p buf_len_ptr was not 3684 * passed in as \c NULL, \p buf_len_ptr will return the required 3685 * size in bytes of the buffer to hold the initial file image in 3686 * the supplied file access property list, \p fapl_id. If no 3687 * initial image is set, the value of \TText{*buf_len_ptr} will be 3688 * set to 0 (zero) 3689 * \return \herr_t 3690 * 3691 * \details H5Pget_file_image() allows an application to retrieve a copy of the 3692 * file image designated for a VFD to use as the initial contents of a file. 3693 * 3694 * If file image callbacks are defined, H5Pget_file_image() will use 3695 * them when allocating and loading the buffer to return to the 3696 * application (see H5Pset_file_image_callbacks()). If file image 3697 * callbacks are not defined, the function will use \c malloc and \c 3698 * memcpy. When \c malloc and \c memcpy are used, it is the caller's 3699 * responsibility to discard the returned buffer with a call to \c 3700 * free. 3701 * 3702 * It is the responsibility of the calling application to free the 3703 * buffer whose address is returned in \p buf_ptr_ptr. This can be 3704 * accomplished with \c free if file image callbacks have not been set 3705 * (see H5Pset_file_image_callbacks()) or with the appropriate method 3706 * if file image callbacks have been set. 3707 * 3708 * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(), 3709 * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(), 3710 * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t, 3711 * \ref H5FIM_UG. 3712 * 3713 * 3714 * \since 1.8.9 3715 * 3716 */ 3717 H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr); 3718 /** 3719 * \ingroup FAPL 3720 * 3721 * \brief Retrieves callback routines for working with file images 3722 * 3723 * \fapl_id 3724 * \param[in,out] callbacks_ptr Pointer to the instance of the 3725 * #H5FD_file_image_callbacks_t struct in which the callback 3726 * routines are to be returned\n 3727 * Struct fields must be initialized to NULL before the call 3728 * is made.\n 3729 * Struct field contents upon return will match those passed in 3730 * in the last H5Pset_file_image_callbacks() call for the file 3731 * access property list \p fapl_id. 3732 * \return \herr_t 3733 * 3734 * \details H5Pget_file_image_callbacks() retrieves the callback routines set for 3735 * working with file images opened with the file access property list 3736 * \p fapl_id. 3737 * 3738 * The callbacks must have been previously set with 3739 * H5Pset_file_image_callbacks() in the file access property list. 3740 * 3741 * Upon the successful return of H5Pset_file_image_callbacks(), the 3742 * fields in the instance of the #H5FD_file_image_callbacks_t struct 3743 * pointed to by \p callbacks_ptr will contain the same values as were 3744 * passed in the most recent H5Pset_file_image_callbacks() call for the 3745 * file access property list \p fapl_id. 3746 * 3747 * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(), 3748 * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(), 3749 * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t, 3750 * \ref H5FIM_UG. 3751 * 3752 * \since 1.8.9 3753 * 3754 */ 3755 H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); 3756 /** 3757 * \ingroup FAPL 3758 * 3759 * \brief Retrieves the file locking property values 3760 * 3761 * \fapl_id 3762 * \param[out] use_file_locking File locking flag 3763 * \param[out] ignore_when_disabled Ignore when disabled flag 3764 * \return \herr_t 3765 * 3766 * \details H5Pget_file_locking() retrieves the file locking property values for 3767 * the file access property list specified by \p fapl_id. 3768 * 3769 * \since 1.10.7 3770 * 3771 */ 3772 H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); 3773 /** 3774 * \ingroup FAPL 3775 * 3776 * \brief Returns garbage collecting references setting 3777 * 3778 * \fapl_id 3779 * \param[out] gc_ref Flag returning the state of reference garbage 3780 * collection. A returned value of 1 indicates that 3781 * garbage collection is on while 0 indicates that 3782 * garbage collection is off. 3783 * 3784 * \return \herr_t 3785 * 3786 * \details H5Pget_gc_references() returns the current setting for the 3787 * garbage collection references property from the specified 3788 * file access property list. The garbage collection references 3789 * property is set by H5Pset_gc_references(). 3790 * 3791 * \since 1.2.0 3792 * 3793 */ 3794 H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/); 3795 /** 3796 * \ingroup FAPL 3797 * 3798 * \brief Retrieves library version bounds settings that indirectly control 3799 * the format versions used when creating objects 3800 * 3801 * \fapl_id{plist_id} 3802 * \param[out] low The earliest version of the library that will be used 3803 * for writing objects 3804 * \param[out] high The latest version of the library that will be used for 3805 * writing objects 3806 * 3807 * \return \herr_t 3808 * 3809 * \details H5Pget_libver_bounds() retrieves the lower and upper bounds on 3810 * the HDF5 library release versions that indirectly determine the 3811 * object format versions used when creating objects in the file. 3812 * 3813 * This property is retrieved from the file access property list 3814 * specified by the parameter \p fapl_id. 3815 * 3816 * The value returned in the parameters \p low and \p high is one 3817 * of the enumerated values in the #H5F_libver_t struct, which is 3818 * defined in H5Fpublic.h. 3819 * 3820 * \version 1.10.2 Add #H5F_LIBVER_V18 to the enumerated defines in 3821 * #H5F_libver_t 3822 * \since 1.8.0 3823 * 3824 */ 3825 H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); 3826 /** 3827 * \ingroup FAPL 3828 * 3829 * \brief Get the current initial metadata cache configuration from the 3830 * provided file access property list 3831 * 3832 * \fapl_id{plist_id} 3833 * \param[in,out] config_ptr Pointer to the instance of #H5AC_cache_config_t 3834 * in which the current metadata cache configuration is to be 3835 * reported 3836 * \return \herr_t 3837 * 3838 * \note The \c in direction applies only to the \ref H5AC_cache_config_t.version 3839 * field. All other fields are \c out parameters. 3840 * 3841 * \details The fields of the #H5AC_cache_config_t structure are shown 3842 * below: 3843 * \snippet H5ACpublic.h H5AC_cache_config_t_snip 3844 * \click4more 3845 * 3846 * H5Pget_mdc_config() gets the initial metadata cache configuration 3847 * contained in a file access property list and loads it into the 3848 * instance of #H5AC_cache_config_t pointed to by the \p config_ptr 3849 * parameter. This configuration is used when the file is opened. 3850 * 3851 * Note that the version field of \TText{*config_ptr} must be 3852 * initialized; this allows the library to support earlier versions of 3853 * the #H5AC_cache_config_t structure. 3854 * 3855 * See the overview of the metadata cache in the special topics section 3856 * of the user guide for details on the configuration data returned. If 3857 * you haven't read and understood that documentation, the results of 3858 * this call will not make much sense. 3859 * 3860 * \since 1.8.0 3861 * 3862 */ 3863 H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); /* out */ 3864 /** 3865 * \ingroup FAPL 3866 * 3867 * \brief Retrieves the metadata cache image configuration values for a file 3868 * access property list 3869 * 3870 * \fapl_id{plist_id} 3871 * \param[out] config_ptr Pointer to metadata cache image configuration values 3872 * \return \herr_t 3873 * 3874 * \details H5Pget_mdc_image_config() retrieves the metadata cache image values 3875 * into \p config_ptr for the file access property list specified in \p 3876 * plist_id. 3877 * 3878 * #H5AC_cache_image_config_t is defined as follows: 3879 * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip 3880 * \click4more 3881 * 3882 * \since 1.10.1 3883 */ 3884 H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); 3885 /** 3886 * \ingroup FAPL 3887 * 3888 * \brief Gets metadata cache logging options 3889 * 3890 * \fapl_id{plist_id} 3891 * \param[out] is_enabled Flag whether logging is enabled 3892 * \param[out] location Location of log in UTF-8/ASCII (file path/name) (On 3893 * Windows, this must be ASCII) 3894 * \param[out] location_size Size in bytes of the location string 3895 * \param[out] start_on_access Whether the logging begins as soon as the file is 3896 * opened or created 3897 * \return \herr_t 3898 * 3899 * \details The metadata cache is a central part of the HDF5 library through 3900 * which all file metadata reads and writes take place. File metadata 3901 * is normally invisible to the user and is used by the library for 3902 * purposes such as locating and indexing data. File metadata should 3903 * not be confused with user metadata, which consists of attributes 3904 * created by users and attached to HDF5 objects such as datasets via 3905 * \ref H5A API calls. 3906 * 3907 * Due to the complexity of the cache, a trace/logging feature has been 3908 * created that can be used by HDF5 developers for debugging and 3909 * performance analysis. The functions that control this functionality 3910 * will normally be of use to a very limited number of developers 3911 * outside of The HDF Group. The functions have been documented to help 3912 * users create logs that can be sent with bug reports. 3913 * 3914 * Control of the log functionality is straightforward. Logging is 3915 * enabled via the H5Pset_mdc_log_options() function, which will modify 3916 * the file access property list used to open or create a file. This 3917 * function has a flag that determines whether logging begins at file 3918 * open or starts in a paused state. Log messages can then be 3919 * controlled via the H5Fstart_mdc_logging() / H5Fstop_mdc_logging() 3920 * functions. H5Pget_mdc_log_options() can be used to examine a file 3921 * access property list, and H5Fget_mdc_logging_status() will return 3922 * the current state of the logging flags. 3923 * 3924 * The log format is described in the \ref_mdc_logging document. 3925 * 3926 * \since 1.10.0 3927 */ 3928 H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, 3929 size_t *location_size, hbool_t *start_on_access); 3930 /** 3931 * \ingroup FAPL 3932 * 3933 * \brief Returns the current metadata block size setting 3934 * 3935 * \fapl_id{fapl_id} 3936 * \param[out] size Minimum size, in bytes, of metadata block allocations 3937 * 3938 * \return \herr_t 3939 * 3940 * \details Returns the current minimum size, in bytes, of new 3941 * metadata block allocations. This setting is retrieved from the 3942 * file access property list \p fapl_id. 3943 * 3944 * This value is set by H5Pset_meta_block_size() and is 3945 * retrieved from the file access property list \p fapl_id. 3946 * 3947 * \since 1.4.0 3948 */ 3949 H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size); 3950 /** 3951 * \ingroup FAPL 3952 * 3953 * \brief Retrieves the number of read attempts from a file access 3954 * property list 3955 * 3956 * \fapl_id{plist_id} 3957 * \param[out] attempts The number of read attempts 3958 * 3959 * \return \herr_t 3960 * 3961 * \details H5Pget_metadata_read_attempts() retrieves the number of read 3962 * attempts that is set in the file access property list \p plist_id. 3963 * 3964 * For a default file access property list, the value retrieved 3965 * will depend on whether the user sets the number of attempts via 3966 * H5Pset_metadata_read_attempts(): 3967 * 3968 * <ul> 3969 * 3970 * <li>If the number of attempts is set to N, the value 3971 * returned will be N. 3972 * <li>If the number of attempts is not set, the value returned 3973 * will be the default for non-SWMR access (1). SWMR is short 3974 * for single-writer/multiple-reader. 3975 * </ul> 3976 * 3977 * For the file access property list of a specified HDF5 file, 3978 * the value retrieved will depend on how the file is opened 3979 * and whether the user sets the number of read attempts via 3980 * H5Pset_metadata_read_attempts(): 3981 * 3982 * <ul> 3983 * <li>For a file opened with SWMR access: 3984 * 3985 * <ul> 3986 * <li> If the number of attempts is set to N, the value 3987 * returned will be N. 3988 * <li> If the number of attempts is not set, the value 3989 * returned will be the default for SWMR access (100). 3990 * </ul> 3991 * <li>For a file opened without SWMR access, the value 3992 * retrieved will always be the default for non-SWMR access 3993 * (1). The value set via H5Pset_metadata_read_attempts() does 3994 * not have any effect on non-SWMR access. 3995 * </ul> 3996 * 3997 * \par Failure Modes 3998 * \parblock 3999 * 4000 * When the input property list is not a file access property list. 4001 * 4002 * When the library is unable to retrieve the number of read attempts from 4003 * the file access property list. 4004 * 4005 * \endparblock 4006 * 4007 * \par Examples 4008 * \parblock 4009 * 4010 * The first example illustrates the two cases for retrieving the number 4011 * of read attempts from a default file access property list. 4012 * 4013 * \include H5Pget_metadata_read_attempts.1.c 4014 * 4015 * The second example illustrates the two cases for retrieving the 4016 * number of read attempts from the file access property list of a file 4017 * opened with SWMR access. 4018 * 4019 * \include H5Pget_metadata_read_attempts.2.c 4020 * 4021 * The third example illustrates the two cases for retrieving the number 4022 * of read attempts from the file access property list of a file opened 4023 * with non-SWMR access. 4024 * 4025 * \include H5Pget_metadata_read_attempts.3.c 4026 * 4027 * \endparblock 4028 * 4029 * \since 1.10.0 4030 */ 4031 H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); 4032 /** 4033 * \ingroup FAPL 4034 * 4035 * \brief Retrieves type of data property for MULTI driver 4036 * 4037 * \param[in] fapl_id File access property list or data transfer property 4038 * list identifier 4039 * \param[out] type Type of data 4040 * 4041 * \return \herr_t 4042 * 4043 * \details H5Pget_multi_type() retrieves the type of data setting from 4044 * the file access or data transfer property list \p fapl_id. 4045 * This enables a user application to specify the type of data 4046 * the application wishes to access so that the application can 4047 * retrieve a file handle for low-level access to the particular 4048 * member of a set of MULTI files in which that type of data is 4049 * stored. The file handle is retrieved with a separate call to 4050 * H5Fget_vfd_handle() (or, in special circumstances, to 4051 * H5FDget_vfd_handle(); see the Virtual File Layer documentation 4052 * for more information. 4053 * 4054 * The type of data returned in \p type will be one of those 4055 * listed in the discussion of the \p type parameter in the 4056 * description of the function H5Pset_multi_type(). 4057 * 4058 * Use of this function is only appropriate for an HDF5 file 4059 * written as a set of files with the MULTI file driver. 4060 * 4061 * \since 1.6.0 4062 * 4063 */ 4064 H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); 4065 /** 4066 * \ingroup FAPL 4067 * 4068 * \brief Retrieves the object flush property values from the file access property list 4069 * 4070 * \fapl_id{plist_id} 4071 * \param[in] func The user-defined callback function 4072 * \param[in] udata The user-defined input data for the callback function 4073 * 4074 * \return \herr_t 4075 * 4076 * \details H5Pget_object_flush_cb() gets the user-defined callback 4077 * function that is set in the file access property list 4078 * \p fapl_id and stored in the parameter \p func. The callback is 4079 * invoked whenever an object flush occurs in the file. This 4080 * routine also obtains the user-defined input data that is 4081 * passed along to the callback function in the parameter 4082 * \p udata. 4083 * 4084 * \par Example 4085 * \parblock 4086 * The example below illustrates the usage of this routine to obtain the 4087 * object flush property values. 4088 * 4089 * \include H5Pget_object_flush_cb.c 4090 * \endparblock 4091 * 4092 * \since 1.10.0 4093 */ 4094 H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); 4095 /** 4096 * \ingroup FAPL 4097 * 4098 * \brief Retrieves the maximum size for the page buffer and the minimum 4099 percentage for metadata and raw data pages 4100 * 4101 * \fapl_id{plist_id} 4102 * \param[out] buf_size Maximum size, in bytes, of the page buffer 4103 * \param[out] min_meta_perc Minimum metadata percentage to keep in the 4104 * page buffer before allowing pages containing metadata to 4105 * be evicted 4106 * 4107 * \param[out] min_raw_perc Minimum raw data percentage to keep in the 4108 * page buffer before allowing pages containing raw data to 4109 * be evicted 4110 * 4111 * \return \herr_t 4112 * 4113 * \details H5Pget_page_buffer_size() retrieves \p buf_size, the maximum 4114 * size in bytes of the page buffer, \p min_meta_perc, the 4115 * minimum metadata percentage, and \p min_raw_perc, the 4116 * minimum raw data percentage. 4117 * 4118 * \since 1.10.1 4119 */ 4120 H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_perc, 4121 unsigned *min_raw_perc); 4122 /** 4123 * \ingroup FAPL 4124 * 4125 * \brief Returns maximum data sieve buffer size 4126 * 4127 * \fapl_id{fapl_id} 4128 * \param[out] size Maximum size, in bytes, of data sieve buffer 4129 * 4130 * \return \herr_t 4131 * 4132 * \details H5Pget_sieve_buf_size() retrieves, size, the current maximum 4133 * size of the data sieve buffer. 4134 * 4135 * This value is set by H5Pset_sieve_buf_size() and is retrieved 4136 * from the file access property list fapl_id. 4137 * 4138 * \version 1.6.0 The \p size parameter has changed from type \c hsize_t 4139 * to \c size_t 4140 * \since 1.4.0 4141 */ 4142 H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/); 4143 /** 4144 * \ingroup FAPL 4145 * 4146 * \brief Retrieves the current small data block size setting 4147 * 4148 * \fapl_id{fapl_id} 4149 * \param[out] size Maximum size, in bytes, of the small data block 4150 * 4151 * \result \herr_t 4152 * 4153 * \details H5Pget_small_data_block_size() retrieves the current setting 4154 * for the size of the small data block. 4155 * 4156 * If the returned value is zero (0), the small data block 4157 * mechanism has been disabled for the file. 4158 * 4159 * \since 1.4.4 4160 */ 4161 H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/); 4162 /** 4163 * \ingroup FAPL 4164 * 4165 * \brief Returns the identifier of the current VOL connector 4166 * 4167 * \fapl_id{plist_id} 4168 * \param[out] vol_id Current VOL connector identifier 4169 * 4170 * \return \herr_t 4171 * 4172 * \details H5Pget_vol_id() returns the VOL connector identifier \p vol_id for 4173 * the file access property list \p plist_id. This identifier should 4174 * be closed with H5VLclose(). 4175 * 4176 * \since 1.12.0 4177 * 4178 */ 4179 H5_DLL herr_t H5Pget_vol_id(hid_t plist_id, hid_t *vol_id); 4180 /** 4181 * \ingroup FAPL 4182 * 4183 * \brief Returns a copy of the VOL information for a connector 4184 * 4185 * \fapl_id{plist_id} 4186 * \param[out] vol_info The VOL information for a connector 4187 * 4188 * \return \herr_t 4189 * 4190 * \details H5Pget_vol_info() returns a copy of the VOL information \p vol_info 4191 * for a connector specified by the file access property list 4192 * \p plist_id. 4193 * 4194 * \since 1.12.0 4195 * 4196 */ 4197 H5_DLL herr_t H5Pget_vol_info(hid_t plist_id, void **vol_info); 4198 /** 4199 * \ingroup FAPL 4200 * 4201 * \brief Sets alignment properties of a file access property list 4202 * 4203 * \fapl_id 4204 * \param[in] threshold Threshold value. Note that setting the threshold 4205 * value to 0 (zero) has the effect of a special case, 4206 * forcing everything to be aligned 4207 * \param[in] alignment Alignment value 4208 * 4209 * \return \herr_t 4210 * 4211 * \details H5Pset_alignment() sets the alignment properties of a 4212 * file access property list so that any file object greater 4213 * than or equal in size to \p threshold bytes will be aligned 4214 * on an address that is a multiple of \p alignment. The 4215 * addresses are relative to the end of the user block; the 4216 * alignment is calculated by subtracting the user block size 4217 * from the absolute file address and then adjusting the address 4218 * to be a multiple of \p alignment. 4219 * 4220 * Default values for \p threshold and \p alignment are one, 4221 * implying no alignment. Generally the default values will 4222 * result in the best performance for single-process access to 4223 * the file. For MPI IO and other parallel systems, choose an 4224 * alignment that is a multiple of the disk block size. 4225 * 4226 * If the file space handling strategy is set to 4227 * #H5F_FSPACE_STRATEGY_PAGE, then the alignment set via this 4228 * routine is ignored. The file space handling strategy is set 4229 * by H5Pset_file_space_strategy(). 4230 * 4231 * \since 1.0.0 4232 * 4233 */ 4234 H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); 4235 /** 4236 * \ingroup FAPL 4237 * 4238 * \brief Sets the raw data chunk cache parameters 4239 * 4240 * \fapl_id{plist_id} 4241 * \param[in] mdc_nelmts No longer used; any value passed is ignored 4242 * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk 4243 * cache for this dataset. Increasing this value 4244 * reduces the number of cache collisions, but 4245 * slightly increases the memory used. Due to the 4246 * hashing strategy, this value should ideally be a 4247 * prime number. As a rule of thumb, this value 4248 * should be at least 10 times the number of chunks 4249 * that can fit in \p rdcc_nbytes bytes. For 4250 * maximum performance, this value should be set 4251 * approximately 100 times that number of chunks. 4252 * The default value is 521. 4253 * \param[in] rdcc_nbytes Total size of the raw data chunk cache in bytes. 4254 * The default size is 1 MB per dataset. 4255 * \param[in] rdcc_w0 The chunk preemption policy for all datasets. 4256 * This must be between 0 and 1 inclusive and 4257 * indicates the weighting according to which chunks 4258 * which have been fully read or written are 4259 * penalized when determining which chunks to flush 4260 * from cache. A value of 0 means fully read or 4261 * written chunks are treated no differently than 4262 * other chunks (the preemption is strictly LRU), 4263 * while a value of 1 means fully read or written 4264 * chunks are always preempted before other chunks. 4265 * If your application only reads or writes data once, 4266 * this can be safely set to 1. Otherwise, this should 4267 * be set lower depending on how often you re-read or 4268 * re-write the same data. The default value is 0.75. 4269 * If the value passed is #H5D_CHUNK_CACHE_W0_DEFAULT, 4270 * then the property will not be set on the dataset 4271 * access property list, and the parameter will come 4272 * from the file access property list. 4273 * 4274 * \return \herr_t 4275 * 4276 * \details H5Pset_cache() sets the number of elements, the total number of 4277 * bytes, and the preemption policy value for all datasets in a file 4278 * on the file's file access property list. 4279 * 4280 * The raw data chunk cache inserts chunks into the cache by first 4281 * computing a hash value using the address of a chunk and then by 4282 * using that hash value as the chunk's index into the table of 4283 * cached chunks. In other words, the size of this hash table and the 4284 * number of possible hash values are determined by the \p rdcc_nslots 4285 * parameter. If a different chunk in the cache has the same hash value, 4286 * a collision will occur, which will reduce efficiency. If inserting 4287 * the chunk into the cache would cause the cache to be too big, then 4288 * the cache will be pruned according to the \p rdcc_w0 parameter. 4289 * 4290 * The \p mdc_nelmts parameter is no longer used; any value passed 4291 * in that parameter will be ignored. 4292 * 4293 * \b Motivation: Setting raw data chunk cache parameters 4294 * can be done with H5Pset_cache(), H5Pset_chunk_cache(), 4295 * or a combination of both. H5Pset_cache() is used to 4296 * adjust the chunk cache parameters for all datasets via 4297 * a global setting for the file, and H5Pset_chunk_cache() 4298 * is used to adjust the chunk cache parameters for 4299 * individual datasets. When both are used, parameters 4300 * set with H5Pset_chunk_cache() will override any parameters 4301 * set with H5Pset_cache(). 4302 * 4303 * \note Optimum chunk cache parameters may vary widely depending 4304 * on different data layout and access patterns. For datasets 4305 * with low performance requirements for example, changing 4306 * the cache settings can save memory. 4307 * 4308 * \note Note: Raw dataset chunk caching is not currently 4309 * supported when using the MPI I/O and MPI POSIX file drivers 4310 * in read/write mode; see H5Pset_fapl_mpio(). When using this 4311 * file driver, all calls to H5Dread() and H5Dwrite() will access 4312 * the disk directly, and H5Pset_cache() will have no effect on 4313 * performance. 4314 * 4315 * \note Raw dataset chunk caching is supported when these drivers are 4316 * used in read-only mode. 4317 * 4318 * \version 1.8.0 The use of the \p mdc_nelmts parameter was discontinued. 4319 * Metadata cache configuration is managed with 4320 * H5Pset_mdc_config() and H5Pget_mdc_config(). 4321 * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nelmts parameters 4322 * changed from type int to size_t. 4323 * \since 1.0.0 4324 * 4325 */ 4326 H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, 4327 double rdcc_w0); 4328 /** 4329 * \ingroup FAPL 4330 * 4331 * \brief Sets write tracking information for core driver, #H5FD_CORE 4332 * 4333 * \fapl_id{fapl_id} 4334 * \param[in] is_enabled Boolean value specifying whether feature is 4335 enabled 4336 * \param[in] page_size Positive integer specifying size, in bytes, of 4337 * write aggregation pages Value of 1 (one) enables 4338 * tracking with no paging. 4339 * 4340 * \return \herr_t 4341 * 4342 * \details When a file is created or opened for writing using the core 4343 * virtual file driver (VFD) with the backing store option 4344 * turned on, the core driver can be configured to track 4345 * changes to the file and write out only the modified bytes. 4346 * 4347 * This write tracking feature is enabled and disabled with \p 4348 * is_enabled. The default setting is that write tracking is 4349 * disabled, or off. 4350 * 4351 * To avoid a large number of small writes, changes can 4352 * be aggregated into pages of a user-specified size, \p 4353 * page_size. 4354 * 4355 * Setting \p page_size to 1 enables tracking with no page 4356 * aggregation. 4357 * 4358 * The backing store option is set via the function 4359 * H5Pset_fapl_core. 4360 * 4361 * \attention 4362 * \parblock 4363 * This function is only for use with the core VFD and must 4364 * be used after the call to H5Pset_fapl_core(). It is an error 4365 * to use this function with any other VFD. 4366 * 4367 * It is an error to use this function when the backing store 4368 * flag has not been set using H5Pset_fapl_core(). 4369 * 4370 * This function only applies to the backing store write 4371 * operation which typically occurs when the file is flushed 4372 * or closed. This function has no relationship to the 4373 * increment parameter passed to H5Pset_fapl_core(). 4374 * 4375 * For optimum performance, the \p page_size parameter should be 4376 * a power of two. 4377 * 4378 * It is an error to set the page size to 0. 4379 * \endparblock 4380 * 4381 * \version 1.8.14 C function modified in this release to return error 4382 * if \p page_size is set to 0 (zero). 4383 * \since 1.8.13 4384 * 4385 */ 4386 H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); 4387 /** 4388 * \ingroup FAPL 4389 * 4390 * \brief Sets a file driver 4391 * 4392 * \plist_id 4393 * \param[in] driver_id The new driver identifier 4394 * \param[in] driver_info Optional struct containing driver properties 4395 * 4396 * \return \herr_t 4397 * 4398 * \details H5Pset_driver() sets the file driver, driver_id, for a file 4399 * access or data transfer property list, \p plist_id, and 4400 * supplies an optional struct containing the driver-specific 4401 * properties, \p driver_info. 4402 * 4403 * The driver properties will be copied into the property list 4404 * and the reference count on the driver will be incremented, 4405 * allowing the caller to close the driver identifier but still 4406 * use the property list. 4407 * 4408 * \version 1.8.2 Function publicized in this release; previous releases 4409 * described this function only in the virtual file driver 4410 * documentation. 4411 * 4412 * \since 1.4.0 4413 * 4414 */ 4415 H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); 4416 /** 4417 * \ingroup FAPL 4418 * 4419 * \brief Sets a file driver according to a given driver name 4420 * 4421 * \plist_id 4422 * \param[in] driver_name The new driver name 4423 * \param[in] driver_config Optional string containing driver properties 4424 * 4425 * \return \herr_t 4426 * 4427 * \details H5Pset_driver_by_name() sets the file driver, by the name 4428 * driver_name, for a file access or data transfer property list, 4429 * \p plist_id, and supplies an optional string containing the 4430 * driver-specific properties, \p driver_config. The driver 4431 * properties string will be copied into the property list. 4432 * 4433 * If the driver specified by \p driver_name is not currently 4434 * registered, an attempt will be made to load the driver as a 4435 * plugin. 4436 * 4437 * \since 1.14.0 4438 * 4439 */ 4440 H5_DLL herr_t H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *driver_config); 4441 /** 4442 * \ingroup FAPL 4443 * 4444 * \brief Sets a file driver according to a given driver value (ID). 4445 * 4446 * \plist_id 4447 * \param[in] driver_value The new driver value (ID) 4448 * \param[in] driver_config Optional string containing driver properties 4449 * 4450 * \return \herr_t 4451 * 4452 * \details H5Pset_driver_by_value() sets the file driver, by the value 4453 * driver_value, for a file access or data transfer property list, 4454 * \p plist_id, and supplies an optional string containing the 4455 * driver-specific properties, \p driver_config. The driver 4456 * properties string will be copied into the property list. 4457 * 4458 * If the driver specified by \p driver_value is not currently 4459 * registered, an attempt will be made to load the driver as a 4460 * plugin. 4461 * 4462 * \since 1.14.0 4463 * 4464 */ 4465 H5_DLL herr_t H5Pset_driver_by_value(hid_t plist_id, H5FD_class_value_t driver_value, 4466 const char *driver_config); 4467 /** 4468 * \ingroup FAPL 4469 * 4470 * \brief Sets the number of files that can be held open in an external 4471 * link open file cache 4472 * 4473 * \par Motivation 4474 * \parblock 4475 * The <em>external link open file cache</em> holds files open after 4476 * they have been accessed via an external link. This cache reduces 4477 * the number of times such files are opened when external links are 4478 * accessed repeatedly and can significantly improves performance in 4479 * certain heavy-use situations and when low-level file opens or closes 4480 * are expensive. 4481 * 4482 * H5Pset_elink_file_cache_size() sets the number of files 4483 * that will be held open in an external link open file 4484 * cache. H5Pget_elink_file_cache_size() retrieves the size of an existing 4485 * cache; and H5Fclear_elink_file_cache() clears an existing cache without 4486 * closing it. 4487 * \endparblock 4488 * 4489 * \fapl_id{plist_id} 4490 * \param[in] efc_size External link open file cache size in number of files 4491 * <em>Default setting is 0 (zero).</em> 4492 * 4493 * \return \herr_t 4494 * 4495 * \details H5Pset_elink_file_cache_size() specifies the number of files 4496 * that will be held open in an external link open file cache. 4497 * 4498 * The default external link open file cache size is 0 (zero), 4499 * meaning that files accessed via an external link are not 4500 * held open. Setting the cache size to a positive integer 4501 * turns on the cache; setting the size back to zero turns it 4502 * off. 4503 * 4504 * With this property set, files are placed in the external 4505 * link open file cache cache when they are opened via an 4506 * external link. Files are then held open until either 4507 * they are evicted from the cache or the parent file is 4508 * closed. This property setting can improve performance when 4509 * external links are repeatedly accessed. 4510 * 4511 * When the cache is full, files will be evicted using a least 4512 * recently used (LRU) scheme; the file which has gone the 4513 * longest time without being accessed through the parent file 4514 * will be evicted and closed if nothing else is holding that 4515 * file open. 4516 * 4517 * Files opened through external links inherit the parent 4518 * file's file access property list by default, and therefore 4519 * inherit the parent file's external link open file cache 4520 * setting. 4521 * 4522 * When child files contain external links of their own, the 4523 * caches can form a graph of cached external files. Closing 4524 * the last external reference to such a graph will recursively 4525 * close all files in the graph, even if cycles are present. 4526 * \par Example 4527 * \parblock 4528 * The following code sets up an external link open file cache that will 4529 * hold open up to 8 files reached through external links: 4530 * 4531 * \code 4532 * status = H5Pset_elink_file_cache_size(fapl_id, 8); 4533 * \endcode 4534 * \endparblock 4535 * 4536 * \since 1.8.7 4537 */ 4538 H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); 4539 /** 4540 * \ingroup FAPL 4541 * 4542 * \brief Controls the library's behavior of evicting metadata associated with 4543 * a closed object 4544 * 4545 * \fapl_id 4546 * \param[in] evict_on_close Whether the HDF5 object should be evicted on close 4547 * 4548 * \return \herr_t 4549 * 4550 * \details The library's metadata cache is fairly conservative about holding 4551 * on to HDF5 object metadata(object headers, chunk index structures, 4552 * etc.), which can cause the cache size to grow, resulting in memory 4553 * pressure on an application or system. When enabled, the "evict on 4554 * close" property will cause all metadata for an object to be evicted 4555 * from the cache as long as metadata is not referenced by any other 4556 * open object. 4557 * 4558 * This function only applies to file access property lists. 4559 * 4560 * The default library behavior is to not evict on object or file 4561 * close. 4562 * 4563 * When applied to a file access property list, any subsequently opened 4564 * object will inherit the "evict on close" property and will have 4565 * its metadata evicted when the object is closed. 4566 * 4567 * \since 1.10.1 4568 * 4569 */ 4570 H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); 4571 /** 4572 * \ingroup FAPL 4573 * 4574 * \brief Sets offset property for low-level access to a file in a family of 4575 * files 4576 * 4577 * \fapl_id 4578 * \param[in] offset Offset in bytes within the HDF5 file 4579 * 4580 * \return \herr_t 4581 * 4582 * \details H5Pset_family_offset() sets the offset property in the file access 4583 * property list \p fapl_id so that the user application can 4584 * retrieve a file handle for low-level access to a particular member 4585 * of a family of files. The file handle is retrieved with a separate 4586 * call to H5Fget_vfd_handle() (or, in special circumstances, to 4587 * H5FDget_vfd_handle(); see \ref VFLTN). 4588 * 4589 * The value of \p offset is an offset in bytes from the beginning of 4590 * the HDF5 file, identifying a user-determined location within the 4591 * HDF5 file. 4592 * The file handle the user application is seeking is for the specific 4593 * member-file in the associated family of files to which this offset 4594 * is mapped. 4595 * 4596 * Use of this function is only appropriate for an HDF5 file written as 4597 * a family of files with the \c FAMILY file driver. 4598 * 4599 * \since 1.6.0 4600 * 4601 */ 4602 H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); 4603 /** 4604 * \ingroup FAPL 4605 * 4606 * \brief Sets the file close degree 4607 * 4608 * \fapl_id 4609 * \param[in] degree Pointer to a location containing the file close 4610 * degree property, the value of \p degree 4611 * 4612 * \return \herr_t 4613 * 4614 * \details H5Pset_fclose_degree() sets the file close degree property 4615 * \p degree in the file access property list \p fapl_id. 4616 * 4617 * The value of \p degree determines how aggressively 4618 * H5Fclose() deals with objects within a file that remain open 4619 * when H5Fclose() is called to close that file. \p degree can 4620 * have any one of four valid values: 4621 * 4622 * <table> 4623 * <tr> 4624 * <th>Degree name</th> 4625 * <th>H5Fclose behavior with no open object in file</th> 4626 * <th>H5Fclose behavior with open object(s) in file</th> 4627 * </tr> 4628 * <tr> 4629 * <td>#H5F_CLOSE_WEAK</td> 4630 * <td>Actual file is closed.</td> 4631 * <td>Access to file identifier is terminated; actual file 4632 * close is delayed until all objects in file are closed 4633 * </td> 4634 * </tr> 4635 * <tr> 4636 * <td>#H5F_CLOSE_SEMI</td> 4637 * <td>Actual file is closed.</td> 4638 * <td>Function returns FAILURE</td> 4639 * </tr> 4640 * <tr> 4641 * <td>#H5F_CLOSE_STRONG</td> 4642 * <td>Actual file is closed.</td> 4643 * <td>All open objects remaining in the file are closed then 4644 * file is closed</td> 4645 * </tr> 4646 * <tr> 4647 * <td>#H5F_CLOSE_DEFAULT</td> 4648 * <td>The VFL driver chooses the behavior. Currently, all VFL 4649 * drivers set this value to #H5F_CLOSE_WEAK, except for the 4650 * MPI-I/O driver, which sets it to #H5F_CLOSE_SEMI.</td> 4651 * <td></td> 4652 * </tr> 4653 * 4654 * </table> 4655 * \warning If a file is opened multiple times without being closed, each 4656 * open operation must use the same file close degree setting. 4657 * For example, if a file is already open with #H5F_CLOSE_WEAK, 4658 * an H5Fopen() call with #H5F_CLOSE_STRONG will fail. 4659 * 4660 * \since 1.6.0 4661 * 4662 */ 4663 H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); 4664 /** 4665 * \ingroup FAPL 4666 * 4667 * \brief Sets an initial file image in a memory buffer 4668 * 4669 * \fapl_id 4670 * \param[in] buf_ptr Pointer to the initial file image, or 4671 * NULL if no initial file image is desired 4672 * \param[in] buf_len Size of the supplied buffer, or 4673 * 0 (zero) if no initial image is desired 4674 * 4675 * \return \herr_t 4676 * 4677 * \details H5Pset_file_image() allows an application to provide a file image 4678 * to be used as the initial contents of a file. 4679 * Calling H5Pset_file_image()makes a copy of the buffer specified in 4680 * \p buf_ptr of size \p buf_len. 4681 * 4682 * \par Motivation: 4683 * H5Pset_file_image() and other elements of HDF5 are 4684 * used to load an image of an HDF5 file into system memory and open 4685 * that image as a regular HDF5 file. An application can then use the 4686 * file without the overhead of disk I/O. 4687 * 4688 * \par Recommended Reading: 4689 * This function is part of the file image 4690 * operations feature set. It is highly recommended to study the guide 4691 * \ref H5FIM_UG before using this feature set. See the “See Also” section below 4692 * for links to other elements of HDF5 file image operations. 4693 * 4694 * \see 4695 * \li H5LTopen_file_image() 4696 * \li H5Fget_file_image() 4697 * \li H5Pget_file_image() 4698 * \li H5Pset_file_image_callbacks() 4699 * \li H5Pget_file_image_callbacks() 4700 * 4701 * \li \ref H5FIM_UG 4702 * 4703 * \li Within H5Pset_file_image_callbacks(): 4704 * \li Callback #H5FD_file_image_callbacks_t 4705 * \li Callback #H5FD_file_image_op_t 4706 * 4707 * \version 1.8.13 Fortran subroutine added in this release. 4708 * \since 1.8.9 4709 * 4710 */ 4711 H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); 4712 /** 4713 * \ingroup FAPL 4714 * 4715 * \brief Sets the callbacks for working with file images 4716 * 4717 * \note **Motivation:** H5Pset_file_image_callbacks() and other elements 4718 * of HDF5 are used to load an image of an HDF5 file into system 4719 * memory and open that image as a regular HDF5 file. An application 4720 * can then use the file without the overhead of disk I/O.\n 4721 * **Recommended Reading:** This function is part of the file 4722 * image operations feature set. It is highly recommended to study 4723 * the guide \ref H5FIM_UG before using this feature set. See the “See Also” section below 4724 * for links to other elements of HDF5 file image operations. 4725 * 4726 * \fapl_id 4727 * \param[in,out] callbacks_ptr Pointer to the instance of the 4728 * #H5FD_file_image_callbacks_t structure 4729 * 4730 * \return \herr_t \n 4731 * **Failure Modes**: Due to interactions between this function and 4732 * H5Pset_file_image() and H5Pget_file_image(), 4733 * H5Pset_file_image_callbacks() will fail if a file image has 4734 * already been set in the target file access property list, \p fapl_id. 4735 * 4736 * \details H5Pset_file_image_callbacks() sets callback functions for working 4737 * with file images in memory. 4738 * 4739 * H5Pset_file_image_callbacks() allows an application to control the 4740 * management of file image buffers through user defined callbacks. 4741 * These callbacks can be used in the management of file image buffers 4742 * in property lists and with certain file drivers. 4743 * 4744 * H5Pset_file_image_callbacks() must be used before any file image has 4745 * been set in the file access property list. Once a file image has 4746 * been set, the function will fail. 4747 * 4748 * The callback routines set up by H5Pset_file_image_callbacks() are 4749 * invoked when a new file image buffer is allocated, when an existing 4750 * file image buffer is copied or resized, or when a file image buffer 4751 * is released from use. 4752 * 4753 * Some file drivers allow the use of user-defined callback functions 4754 * for allocating, freeing, and copying the driver's internal buffer, 4755 * potentially allowing optimizations such as avoiding large \c malloc 4756 * and \c memcpy operations, or to perform detailed logging. 4757 * 4758 * From the perspective of the HDF5 library, the operations of the 4759 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", 4760 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", 4761 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and 4762 * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks 4763 * must be identical to those of the 4764 * corresponding C standard library calls (\c malloc, \c memcpy, 4765 * \c realloc, and \c free). While the operations must be identical, 4766 * the file image callbacks have more parameters. The return values 4767 * of \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and 4768 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" are identical to 4769 * the return values of \c malloc and \c realloc. The return values of 4770 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and 4771 * \ref H5FD_file_image_callbacks_t.image_free "image_free" differ from the return 4772 * values of \c memcpy and \c free in that the return values of 4773 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" and 4774 * \ref H5FD_file_image_callbacks_t.image_free "image_free" can also indicate failure. 4775 * 4776 * The callbacks and their parameters, along with a struct and 4777 * an \c ENUM required for their use, are described below. 4778 * 4779 * <b>Callback struct and \c ENUM:</b> 4780 * 4781 * The callback functions set up by H5Pset_file_image_callbacks() use 4782 * a struct and an \c ENUM that are defined as follows 4783 * 4784 * The struct #H5FD_file_image_callbacks_t serves as a container 4785 * for the callback functions and a pointer to user-supplied data. 4786 * The struct is defined as follows: 4787 * \snippet H5FDpublic.h H5FD_file_image_callbacks_t_snip 4788 * 4789 * Elements of the #H5FD_file_image_op_t are used by the 4790 * callbacks to invoke certain operations on file images. The ENUM is 4791 * defined as follows: 4792 * \snippet H5FDpublic.h H5FD_file_image_op_t_snip 4793 * 4794 * The elements of the #H5FD_file_image_op_t are used in the following 4795 * callbacks: 4796 * 4797 * - The \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" callback 4798 * contains a pointer to a function that must appear to HDF5 to have 4799 * functionality identical to that of the standard C library \c malloc() call. 4800 * 4801 * - Signature in #H5FD_file_image_callbacks_t: 4802 * \snippet H5FDpublic.h image_malloc_snip 4803 * \n 4804 * - The \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" 4805 * callback contains a pointer to a function 4806 * that must appear to HDF5 to have functionality identical to that 4807 * of the standard C library \c memcopy() call, except that it returns 4808 * a \p NULL on failure. (The \c memcpy C Library routine is defined 4809 * to return the \p dest parameter in all cases.) 4810 * 4811 * - Setting \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" 4812 * to \c NULL indicates that HDF5 should invoke 4813 * the standard C library \c memcpy() routine when copying buffers. 4814 * 4815 * - Signature in #H5FD_file_image_callbacks_t: 4816 * \snippet H5FDpublic.h image_memcpy_snip 4817 * \n 4818 * - The \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" callback 4819 * contains a pointer to a function that must appear to HDF5 to have 4820 * functionality identical to that of the standard C library \c realloc() call. 4821 * 4822 * - Setting \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" 4823 * to \p NULL indicates that HDF5 should 4824 * invoke the standard C library \c realloc() routine when resizing 4825 * file image buffers. 4826 * 4827 * - Signature in #H5FD_file_image_callbacks_t: 4828 * \snippet H5FDpublic.h image_realloc_snip 4829 * \n 4830 * - The \ref H5FD_file_image_callbacks_t.image_free "image_free" callback contains 4831 * a pointer to a function that must appear to HDF5 to have functionality 4832 * identical to that of the standard C library \c free() call, except 4833 * that it will return \c 0 (\c SUCCEED) on success and \c -1 (\c FAIL) on failure. 4834 * 4835 * - Setting \ref H5FD_file_image_callbacks_t.image_free "image_free" 4836 * to \c NULL indicates that HDF5 should invoke 4837 * the standard C library \c free() routine when releasing file image 4838 * buffers. 4839 * 4840 * - Signature in #H5FD_file_image_callbacks_t: 4841 * \snippet H5FDpublic.h image_free_snip 4842 * \n 4843 * - The \ref H5FD_file_image_callbacks_t.udata_copy "udata_copy" 4844 * callback contains a pointer to a function 4845 * that, from the perspective of HDF5, allocates a buffer of suitable 4846 * size, copies the contents of the supplied \p udata into the new 4847 * buffer, and returns the address of the new buffer. The function 4848 * returns NULL on failure. This function is necessary if a non-NULL 4849 * \p udata parameter is supplied, so that property lists containing 4850 * the image callbacks can be copied. If the \p udata parameter below 4851 * is \c NULL, then this parameter should be \c NULL as well. 4852 * 4853 * - Signature in #H5FD_file_image_callbacks_t: 4854 * \snippet H5FDpublic.h udata_copy_snip 4855 * \n 4856 * - The \ref H5FD_file_image_callbacks_t.udata_free "udata_free" 4857 * callback contains a pointer to a function 4858 * that, from the perspective of HDF5, frees a user data block. This 4859 * function is necessary if a non-NULL udata parameter is supplied so 4860 * that property lists containing image callbacks can be discarded 4861 * without a memory leak. If the udata parameter below is \c NULL, 4862 * this parameter should be \c NULL as well. 4863 * 4864 * - Signature in #H5FD_file_image_callbacks_t: 4865 * \snippet H5FDpublic.h udata_free_snip 4866 * 4867 * - \p **udata**, the final field in the #H5FD_file_image_callbacks_t 4868 * struct, provides a pointer to user-defined data. This pointer will 4869 * be passed to the 4870 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", 4871 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", 4872 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and 4873 * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks. 4874 * Define udata as \c NULL if no user-defined data is provided. 4875 * 4876 * \since 1.8.9 4877 * 4878 */ 4879 H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); 4880 /** 4881 * \ingroup FAPL 4882 * 4883 * \brief Sets the file locking property values 4884 * 4885 * \fapl_id 4886 * \param[in] use_file_locking Toggle to specify file locking (or not) 4887 * \param[in] ignore_when_disabled Toggle to ignore when disabled (or not) 4888 * 4889 * \return \herr_t 4890 * 4891 * \details H5Pset_file_locking() overrides the default file locking flag 4892 * setting that was set when the library was configured. 4893 * 4894 * This setting can be overridden by the \c HDF5_USE_FILE_LOCKING 4895 * environment variable. 4896 * 4897 * File locking is used when creating/opening a file to prevent 4898 * problematic file accesses. 4899 * 4900 * \since 1.10.7 4901 * 4902 */ 4903 H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled); 4904 /** 4905 * \ingroup FAPL 4906 * 4907 * \brief Sets garbage collecting references flag 4908 * 4909 * \fapl_id 4910 * \param[in] gc_ref Flag setting reference garbage collection to on (1) or off (0) 4911 * 4912 * \return \herr_t 4913 * 4914 * \details H5Pset_gc_references() sets the flag for garbage collecting 4915 * references for the file. 4916 * 4917 * Dataset region references and other reference types use space in an 4918 * HDF5 file's global heap. If garbage collection is on and the user 4919 * passes in an uninitialized value in a reference structure, the heap 4920 * might get corrupted. When garbage collection is off, however, and 4921 * the user reuses a reference, the previous heap block will be 4922 * orphaned and not returned to the free heap space. 4923 * 4924 * When garbage collection is on, the user must initialize the 4925 * reference structures to 0 or risk heap corruption. 4926 * 4927 * The default value for garbage collecting references is off. 4928 * 4929 * \since 1.2.0 4930 * 4931 */ 4932 H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); 4933 /** 4934 * \ingroup FAPL 4935 * 4936 * \brief Controls the range of library release versions used when creating 4937 * objects in a file 4938 * 4939 * \fapl_id{plist_id} 4940 * \param[in] low The earliest version of the library that will be used 4941 * for writing objects 4942 * \param[in] high The latest version of the library that will be used for 4943 * writing objects 4944 * 4945 * \return \herr_t 4946 * 4947 * \details H5Pset_libver_bounds() controls the range of library release 4948 * versions that will be used when creating objects in a file. 4949 * The object format versions are determined indirectly from the 4950 * library release versions specified in the call. 4951 * 4952 * This property is set in the file access property list 4953 * specified by the parameter \p fapl_id. 4954 * 4955 * The parameter \p low sets the earliest possible format 4956 * versions that the library will use when creating objects in 4957 * the file. Note that earliest possible is different from 4958 * earliest, as some features introduced in library versions 4959 * later than 1.0.0 resulted in updates to object formats. 4960 * The parameter \p high sets the latest format versions that 4961 * the library will be allowed to use when creating objects in 4962 * the file. 4963 * 4964 * The parameters \p low and \p high must be one of the 4965 * enumerated values in the #H5F_libver_t struct, which is 4966 * defined in H5Fpublic.h. 4967 * 4968 * #H5F_LIBVER_LATEST is equivalent to the highest explicitly numbered 4969 * API value in #H5F_libver_t, indicating that this is currently the 4970 * latest format available. 4971 * 4972 * The library supports the following pairs of (\p low, \p high) 4973 * combinations as derived from the values in #H5F_libver_t: 4974 * 4975 * <table> 4976 * <tr> 4977 * <th>Value of \p low and \p high</th> 4978 * <th>Result</th> 4979 * </tr> 4980 * <tr> 4981 * <td>\p low=#H5F_LIBVER_EARLIEST<br /> 4982 * \p high=<any other version but not #H5F_LIBVER_LATEST></td> 4983 * <td> 4984 * \li The library will create objects with the earliest 4985 * possible format versions. 4986 * \li The library will allow objects to be created with the 4987 * latest format versions available to library release 4988 * specified in the \p high value. 4989 * \li API calls that create objects or features that are 4990 * available to versions of the library greater than the 4991 * specified version in \p high will fail.</td> 4992 * </tr> 4993 * <tr> 4994 * <td>\p low=#H5F_LIBVER_V18<br /> 4995 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 4996 * <td> 4997 * \li The library will create objects with the latest format 4998 * versions available to library release 1.8.x. 4999 * \li The library will allow objects to be created with the latest 5000 * format versions available to library release specified 5001 * in the \p high value. 5002 * \li API calls that create objects or features that are 5003 * available to versions of the library greater than the 5004 * specified version in \p high will fail. 5005 * \li Earlier versions of the library may not be able to access 5006 * objects created with this setting.</td> 5007 * </tr> 5008 * <tr> 5009 * <td>\p low=#H5F_LIBVER_V110<br /> 5010 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5011 * <td> 5012 * \li The library will create objects with the latest format 5013 * versions available to library release 1.10.x. 5014 * \li The library will allow objects to be created with the latest 5015 * format versions available to library release specified 5016 * in the \p high value. 5017 * \li API calls that create objects or features that are available 5018 * to versions of the library greater than version specified in 5019 * \p high will fail. 5020 * \li Earlier versions of the library may not be able to access 5021 * objects created with this setting.</td> 5022 * </tr> 5023 * <tr> 5024 * <td>\p low=#H5F_LIBVER_V112<br /> 5025 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5026 * <td> 5027 * \li The library will create objects with the latest format 5028 * versions available to library release 1.12.x. 5029 * \li The library will allow objects to be created with the latest 5030 * format versions available to library release specified 5031 * in the \p high value. 5032 * \li API calls that create objects or features that are available 5033 * to versions of the library greater than version specified in 5034 * \p high will fail. 5035 * \li Earlier versions of the library may not be able to access 5036 * objects created with this setting.</td> 5037 * </tr> 5038 * <tr> 5039 * <td>\p low=#H5F_LIBVER_V114<br /> 5040 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5041 * <td> 5042 * \li The library will create objects with the latest format 5043 * versions available to library release 1.14.x. 5044 * \li The library will allow objects to be created with the latest 5045 * format versions available to library release specified 5046 * in the \p high value. 5047 * \li API calls that create objects or features that are available 5048 * to versions of the library greater than version specified in 5049 * \p high will fail. 5050 * \li Earlier versions of the library may not be able to access 5051 * objects created with this setting.</td> 5052 * </tr> 5053 * <tr> 5054 * <td>\p low=high </td> 5055 * <td> 5056 * \li The library will create objects with the latest format 5057 * versions available to library release specified. 5058 * \li The objects written with this setting may be 5059 * accessible to a smaller range of library versions than 5060 * would be the case if low is set to #H5F_LIBVER_EARLIEST. 5061 * \li API calls that create objects or features that are available 5062 * to versions of the library greater than the specified 5063 * release will fail. 5064 * \li Earlier versions of the library may not be able to access 5065 * objects created with this setting.</td> 5066 * </tr> 5067 * <tr> 5068 * <td>\p low=#H5F_LIBVER_EARLIEST<br /> 5069 * \p high=#H5F_LIBVER_LATEST</td> 5070 * <td> 5071 * \li The library will create objects with the earliest possible 5072 * format versions. 5073 * \li The library will allow objects to be created with the latest 5074 * format versions available to the latest release. See 5075 * note #H5F_LIBVER_LATEST below the table. 5076 * \li This is the library default setting and provides the greatest 5077 * format compatibility.</td> 5078 * </tr> 5079 * <tr> 5080 * <td>\p low=<any version lower than \p high><br/> 5081 * \p high=#H5F_LIBVER_LATEST</td> 5082 * <td> 5083 * \li The library will create objects with the latest format 5084 * versions available to library release \p low. 5085 * \li The library will allow objects to be created with the latest 5086 * format versions available to the latest release. See 5087 * note *H5F_LIBVER_LATEST* below the table. 5088 * \li This setting allows users to take advantage of the latest 5089 * features and performance enhancements in the library. 5090 * \li Earlier versions of the library may not be able to access 5091 * objects created with this setting.</td> 5092 * </tr> 5093 * <tr> 5094 * <td>\p low=#H5F_LIBVER_LATEST<br /> 5095 * \p high=#H5F_LIBVER_LATEST</td> 5096 * <td> 5097 * \li The library will create objects with the latest format 5098 * versions available to the latest release. 5099 * \li The library will allow objects to be created with the latest 5100 * format versions available to the latest release. See 5101 * note *H5F_LIBVER_LATEST* below the table. 5102 * \li This setting allows users to take advantage of the latest 5103 * features and performance enhancements in the library. 5104 * However, objects written with this setting may be 5105 * accessible to a smaller range of library versions than 5106 * would be the case if low is set to #H5F_LIBVER_EARLIEST. 5107 * \li Earlier versions of the library may not be able to access 5108 * objects created with this setting.</td> 5109 * </tr> 5110 * </table> 5111 * 5112 * \note *H5F_LIBVER_LATEST*:<br /> 5113 * Since 1.14.x is also #H5F_LIBVER_LATEST, there is no upper 5114 * limit on the format versions to use. That is, if a 5115 * newer format version is required to support a feature 5116 * in 1.14.x series, this setting will allow the object to be 5117 * created. 5118 * 5119 * \version 1.10.2 #H5F_LIBVER_V18 added to the enumerated defines in 5120 * #H5F_libver_t. 5121 * 5122 * \since 1.8.0 5123 * 5124 */ 5125 H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); 5126 /** 5127 * \ingroup FAPL 5128 * 5129 * \brief Set the initial metadata cache configuration in the indicated File 5130 * Access Property List to the supplied value 5131 * 5132 * \fapl_id{plist_id} 5133 * \param[in] config_ptr Pointer to the instance of \p H5AC_cache_config_t 5134 * containing the desired configuration 5135 * \return \herr_t 5136 * 5137 * \details The fields of the #H5AC_cache_config_t structure are shown 5138 * below: 5139 * \snippet H5ACpublic.h H5AC_cache_config_t_snip 5140 * \click4more 5141 * 5142 * \details H5Pset_mdc_config() attempts to set the initial metadata cache 5143 * configuration to the supplied value. It will fail if an invalid 5144 * configuration is detected. This configuration is used when the file 5145 * is opened. 5146 * 5147 * See the overview of the metadata cache in the special topics section 5148 * of the user manual for details on what is being configured. If you 5149 * have not read and understood that documentation, you really should 5150 * not be using this API call. 5151 * 5152 * \since 1.8.0 5153 * 5154 */ 5155 H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); 5156 /** 5157 * \ingroup FAPL 5158 * 5159 * \brief Sets metadata cache logging options 5160 * 5161 * \fapl_id{plist_id} 5162 * \param[in] is_enabled Whether logging is enabled 5163 * \param[in] location Location of log in UTF-8/ASCII (file path/name) 5164 * (On Windows, this must be ASCII) 5165 * \param[in] start_on_access Whether the logging will begin as soon as the 5166 * file is opened or created 5167 * 5168 * \return \herr_t 5169 * 5170 * \details The metadata cache is a central part of the HDF5 library through 5171 * which all file metadata reads and writes take place. File metadata 5172 * is normally invisible to the user and is used by the library for 5173 * purposes such as locating and indexing data. File metadata should 5174 * not be confused with user metadata, which consists of attributes 5175 * created by users and attached to HDF5 objects such as datasets via 5176 * H5A API calls. 5177 * 5178 * Due to the complexity of the cache, a trace/logging feature has 5179 * been created that can be used by HDF5 developers for debugging and 5180 * performance analysis. The functions that control this functionality 5181 * will normally be of use to a very limited number of developers 5182 * outside of The HDF Group. The functions have been documented to 5183 * help users create logs that can be sent with bug reports. 5184 * 5185 * Control of the log functionality is straightforward. Logging is 5186 * enabled via the H5Pset_mdc_log_options() function, 5187 * which will modify the file access property list used to open or 5188 * create a file. This function has a flag that determines whether 5189 * logging begins at file open or starts in a paused state. Log 5190 * messages can then be controlled via the H5Fstart_mdc_logging() 5191 * and H5Fstop_mdc_logging() function. 5192 * 5193 * H5Pget_mdc_log_options() can be used to examine a file access 5194 * property list, and H5Fget_mdc_logging_status() will return the 5195 * current state of the logging flags. 5196 * 5197 * The log format is described in [<em>Metadata Cache Logging</em>] 5198 * (https://\DOCURL/advanced_topics/FineTuningMetadataCache.md). 5199 * 5200 * \since 1.10.0 5201 * 5202 */ 5203 H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, 5204 hbool_t start_on_access); 5205 /** 5206 * \ingroup FAPL 5207 * 5208 * \brief Sets the minimum metadata block size 5209 * 5210 * \fapl_id{fapl_id} 5211 * \param[in] size Minimum size, in bytes, of metadata block allocations 5212 * 5213 * \return \herr_t 5214 * 5215 * \details H5Pset_meta_block_size() sets the minimum size, in bytes, of 5216 * metadata block allocations when #H5FD_FEAT_AGGREGATE_METADATA is set by a VFL 5217 * driver. 5218 5219 * Each raw metadata block is initially allocated to be of the given size. 5220 * Specific metadata objects (e.g., object headers, local heaps, B-trees) are then 5221 * sub-allocated from this block. 5222 * 5223 * The default setting is 2048 bytes, meaning that the library will 5224 * attempt to aggregate metadata in at least 2K blocks in the file. 5225 * Setting the value to zero (\TText{0}) with this function will turn 5226 * off metadata aggregation, even if the VFL driver attempts to use the 5227 * metadata aggregation strategy. 5228 * 5229 * Metadata aggregation reduces the number of small data objects in the file that 5230 * would otherwise be required for metadata. The aggregated block of metadata is 5231 * usually written in a single write action and always in a contiguous block, 5232 * potentially significantly improving library and application performance. 5233 * 5234 * \since 1.4.0 5235 */ 5236 H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); 5237 /** 5238 * \ingroup FAPL 5239 * 5240 * \brief Sets the number of read attempts in a file access property list 5241 * 5242 * \fapl_id{plist_id} 5243 * \param[in] attempts The number of read attempts. Must be a value greater than \TText{0} 5244 * 5245 * \return \herr_t 5246 * 5247 * \return Failure Modes: 5248 * - When the user sets the number of read attempts to \TText{0}. 5249 * - When the input property list is not a file access property list. 5250 * - When the library is unable to set the number of read attempts in the file access property list. 5251 * 5252 * \details H5Pset_metadata_read_attempts() sets the number of reads that the 5253 * library will try when reading checksummed metadata in an HDF5 file opened 5254 * with SWMR access. When reading such metadata, the library will compare the 5255 * checksum computed for the metadata just read with the checksum stored within 5256 * the piece of checksum. When performing SWMR operations on a file, the 5257 * checksum check might fail when the library reads data on a system that is not 5258 * atomic. To remedy such situations, the library will repeatedly read the piece 5259 * of metadata until the check passes or finally fails the read when the allowed 5260 * number of attempts is reached. 5261 * 5262 * The number of read attempts used by the library will depend on how the file is 5263 * opened and whether the user sets the number of read attempts via this routine: 5264 5265 * - For a file opened with SWMR access: 5266 * - If the user sets the number of attempts to \TText{N}, the library will use \TText{N}. 5267 * - If the user does not set the number of attempts, the library will use the 5268 * default for SWMR access (\TText{100}). 5269 * - For a file opened with non-SWMR access, the library will always use the default 5270 * for non-SWMR access (\TText{1}). The value set via this routine does not have any effect 5271 * during non-SWMR access. 5272 * 5273 * \b Example: The first example illustrates the case in setting the number of read attempts for a file 5274 * opened with SWMR access. 5275 * 5276 * \snippet H5Pset_metadata_read_attempts.c SWMR Access 5277 * 5278 * \b Example: The second example illustrates the case in setting the number of 5279 * read attempts for a file opened with non-SWMR access. The value 5280 * set in the file access property list does not have any effect. 5281 * 5282 * \snippet H5Pset_metadata_read_attempts.c non-SWMR Access 5283 * 5284 * \note \b Motivation: On a system that is not atomic, the library might 5285 * possibly read inconsistent metadata with checksum when performing 5286 * single-writer/multiple-reader (SWMR) operations for an HDF5 file. Upon 5287 * encountering such situations, the library will try reading the metadata 5288 * again to obtain consistent data. This routine provides the means to set 5289 * the number of read attempts other than the library default. 5290 * 5291 * \since 1.10.0 5292 */ 5293 H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); 5294 /** 5295 * \ingroup FAPL 5296 * 5297 * \brief Specifies type of data to be accessed via the \TText{MULTI} driver, 5298 * enabling more direct access 5299 * 5300 * \fapl_id{fapl_id} 5301 * \param[in] type Type of data to be accessed 5302 * 5303 * \return \herr_t 5304 * 5305 * \details H5Pset_multi_type() sets the \Emph{type of data} property in the file 5306 * access property list \p fapl_id. This setting enables a user 5307 * application to specify the type of data the application wishes to 5308 * access so that the application can retrieve a file handle for 5309 * low-level access to the particular member of a set of \TText{MULTI} 5310 * files in which that type of data is stored. The file handle is 5311 * retrieved with a separate call to H5Fget_vfd_handle() (or, in special 5312 * circumstances, to H5FDget_vfd_handle(); see \ref VFLTN. 5313 * 5314 * The type of data specified in \p type may be one of the following: 5315 * 5316 * <table> 5317 * <tr> 5318 * <td>#H5FD_MEM_SUPER</td> <td>Super block data</td> 5319 * </tr> 5320 * <tr> 5321 * <td>#H5FD_MEM_BTREE</td> <td>B-tree data</td> 5322 * </tr> 5323 * <tr> 5324 * <td>#H5FD_MEM_DRAW</td> <td>Dataset raw data</td> 5325 * </tr> 5326 * <tr> 5327 * <td>#H5FD_MEM_GHEAP</td> <td>Global heap data</td> 5328 * </tr> 5329 * <tr> 5330 * <td>#H5FD_MEM_LHEAP</td> <td>Local Heap data</td> 5331 * </tr> 5332 * <tr> 5333 * <td>#H5FD_MEM_OHDR</td> <td>Object header data</td> 5334 * </tr> 5335 * </table> 5336 * 5337 * This function is for use only when accessing an HDF5 file written as a set of 5338 * files with the \TText{MULTI} file driver. 5339 * 5340 * \since 1.6.0 5341 */ 5342 H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); 5343 /** 5344 * \ingroup FAPL 5345 * 5346 * \brief Sets a callback function to invoke when an object flush occurs in the file 5347 * 5348 * \fapl_id{plist_id} 5349 * \op{func} 5350 * \op_data_in{udata} 5351 * 5352 * \return \herr_t 5353 * 5354 * \details H5Pset_object_flush_cb() sets the callback function to invoke in the 5355 * file access property list \p plist_id whenever an object flush occurs in 5356 * the file. Library objects are group, dataset, and committed 5357 * datatype. 5358 * 5359 * The callback function \p func must conform to the prototype defined below: 5360 * \code 5361 * typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *user_data) 5362 * \endcode 5363 * 5364 * The parameters of the callback function, per the above prototypes, are defined as follows: 5365 * - \TText{object_id} is the identifier of the object which has just been flushed. 5366 * - \TText{user_data} is the user-defined input data for the callback function. 5367 * 5368 * \b Example: The example below illustrates the usage of this routine to set 5369 * the callback function to invoke when an object flush occurs. 5370 * 5371 * \include H5Pset_object_flush_cb.c 5372 * 5373 * \since 1.10.0 5374 */ 5375 H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); 5376 /** 5377 * \ingroup FAPL 5378 * 5379 * \brief Sets the maximum size of the data sieve buffer 5380 * 5381 * \fapl_id{fapl_id} 5382 * \param[in] size Maximum size, in bytes, of data sieve buffer 5383 * 5384 * \return \herr_t 5385 * 5386 * \details H5Pset_sieve_buf_size() sets \p size, the maximum size in bytes of the 5387 * data sieve buffer, which is used by file drivers that are capable of 5388 * using data sieving. 5389 * 5390 * The data sieve buffer is used when performing I/O on datasets in the 5391 * file. Using a buffer which is large enough to hold several pieces of 5392 * the dataset being read in for hyperslab selections boosts 5393 * performance by quite a bit. 5394 * 5395 * The default value is set to 64KB, indicating that file I/O for raw 5396 * data reads and writes will occur in at least 64KB blocks. Setting 5397 * the value to zero (\TText{0}) with this API function will turn off 5398 * the data sieving, even if the VFL driver attempts to use that 5399 * strategy. 5400 * 5401 * Internally, the library checks the storage sizes of the datasets in 5402 * the file. It picks the smaller one between the size from the file 5403 * access property and the size of the dataset to allocate the sieve 5404 * buffer for the dataset in order to save memory usage. 5405 * 5406 * \version 1.6.0 The \p size parameter has changed from type \TText{hsize_t} to \TText{size_t}. 5407 * 5408 * \since 1.4.0 5409 */ 5410 H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); 5411 /** 5412 * \ingroup FAPL 5413 * 5414 * \brief Sets the size of a contiguous block reserved for small data 5415 * 5416 * \fapl_id{fapl_id} 5417 * \param[in] size Maximum size, in bytes, of the small data block. 5418 The default size is \TText{2048}. 5419 * 5420 * \return \herr_t 5421 * 5422 * \details H5Pset_small_data_block_size() reserves blocks of \p size bytes for the 5423 * contiguous storage of the raw data portion of \Emph{small} datasets. The 5424 * HDF5 library then writes the raw data from small datasets to this 5425 * reserved space, thus reducing unnecessary discontinuities within 5426 * blocks of meta data and improving I/O performance. 5427 * 5428 * A small data block is actually allocated the first time a qualifying 5429 * small dataset is written to the file. Space for the raw data portion 5430 * of this small dataset is suballocated within the small data block. 5431 * The raw data from each subsequent small dataset is also written to 5432 * the small data block until it is filled; additional small data 5433 * blocks are allocated as required. 5434 * 5435 * The HDF5 library employs an algorithm that determines whether I/O 5436 * performance is likely to benefit from the use of this mechanism with 5437 * each dataset as storage space is allocated in the file. A larger 5438 * \p size will result in this mechanism being employed with larger 5439 * datasets. 5440 * 5441 * The small data block size is set as an allocation property in the 5442 * file access property list identified by \p fapl_id. 5443 * 5444 * Setting \p size to zero (\TText{0}) disables the small data block mechanism. 5445 * 5446 * \since 1.4.4 5447 */ 5448 H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); 5449 /** 5450 * \ingroup FAPL 5451 * 5452 * \brief Set the file VOL connector for a file access property list 5453 * 5454 * \fapl_id{plist_id} 5455 * \param[in] new_vol_id VOL connector identifier 5456 * \param[in] new_vol_info Optional VOL information 5457 * 5458 * \return \herr_t 5459 * 5460 * \details H5Pset_vol() sets the VOL connector \p new_vol_id for a file access 5461 * property list \p plist_id using the (optional) VOL information in 5462 * \p new_vol_info. 5463 * 5464 * \since 1.12.0 5465 * 5466 */ 5467 H5_DLL herr_t H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info); 5468 5469 /** 5470 * \ingroup FAPL 5471 * 5472 * \brief Query the capability flags for the VOL connector that will be used 5473 * with this file access property list (FAPL). 5474 * 5475 * \fapl_id{plist_id} 5476 * \param[out] cap_flags Flags that indicate the VOL connector capabilities 5477 * 5478 * \return \herr_t 5479 * 5480 * \details H5Pget_vol_cap_flags() queries the current VOL connector information 5481 * for a FAPL to retrieve the capability flags for the VOL 5482 * connector stack, as will be used by a file open or create 5483 * operation that uses this FAPL. 5484 * 5485 * \note This routine supports the use of the HDF5_VOL_CONNECTOR environment 5486 * variable to override the VOL connector set programmatically for the 5487 * FAPL (with H5Pset_vol). 5488 * 5489 * \note The H5VL_CAP_FLAG_ASYNC flag can be checked to see if asynchronous 5490 * operations are supported by the VOL connector stack. 5491 * 5492 * \since 1.14.0 5493 * 5494 */ 5495 H5_DLL herr_t H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags); 5496 5497 #ifdef H5_HAVE_PARALLEL 5498 /** 5499 * \ingroup GAPL 5500 * 5501 * \brief Sets metadata I/O mode for read operations to be collective or independent (default) 5502 * 5503 * \gacpl_id 5504 * \param[in] is_collective Boolean value indicating whether metadata reads are collective 5505 * (\TText{1}) or independent (\TText{0}). 5506 * Default mode: Independent (\TText{0}) 5507 * 5508 * \return \herr_t 5509 * 5510 * \details H5Pset_all_coll_metadata_ops() sets the metadata I/O mode for read 5511 * operations in the access property list \p plist_id. 5512 * 5513 * When engaging in parallel I/O, all metadata write operations must be 5514 * collective. If \p is_collective is \TText{1}, this property specifies 5515 * that the HDF5 library will perform all metadata read operations 5516 * collectively; if \p is_collective is \TText{0}, such operations may 5517 * be performed independently. 5518 * 5519 * Users must be aware that several HDF5 operations can potentially 5520 * issue metadata reads. These include opening a dataset, datatype, or 5521 * group; reading an attribute; or issuing a \Emph{get info} call such 5522 * as getting information for a group with H5Fget_info(). Collective 5523 * I/O requirements must be kept in mind when issuing such calls in the 5524 * context of parallel I/O. 5525 * 5526 * If this property is collective on a file access property list that 5527 * is used in creating or opening a file, then the HDF5 library will 5528 * assume that all metadata read operations issued on that file 5529 * identifier will be issued collectively from all ranks irrespective 5530 * of the individual setting of a particular operation. If this 5531 * assumption is not adhered to, corruption will be introduced in the 5532 * metadata cache and HDF5's behavior will be undefined. 5533 * 5534 * Alternatively, a user may wish to avoid setting this property 5535 * globally on the file access property list, and individually set it 5536 * on particular object access property lists (dataset, group, link, 5537 * datatype, attribute access property lists) for certain operations. 5538 * This will indicate that only the operations issued with such an 5539 * access property list will be called collectively and other 5540 * operations may potentially be called independently. There are, 5541 * however, several HDF5 operations that can issue metadata reads but 5542 * have no property list in their function signatures to allow passing 5543 * the collective requirement property. For those operations, the only 5544 * option is to set the global collective requirement property on the 5545 * file access property list; otherwise the metadata reads that can be 5546 * triggered from those operations will be done independently by each 5547 * process. 5548 * 5549 * Functions that do not accommodate an access property list but that 5550 * might issue metadata reads are listed in \ref maybe_metadata_reads. 5551 * 5552 * \attention As noted above, corruption will be introduced into the metadata 5553 * cache and HDF5 library behavior will be undefined when both of the following 5554 * conditions exist: 5555 * - A file is created or opened with a file access property list in which the 5556 * collective metadata I/O property is set to \TText{1}. 5557 * - Any function is called that triggers an independent metadata read while the 5558 * file remains open with that file access property list. 5559 * 5560 * \attention An approach that avoids this corruption risk is described above. 5561 * 5562 * \sa_metadata_ops 5563 * 5564 * \since 1.10.0 5565 */ 5566 H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective); 5567 /** 5568 * \ingroup GAPL 5569 * 5570 * \brief Retrieves metadata read mode setting 5571 * 5572 * \gacpl_id 5573 * \param[out] is_collective Pointer to a buffer containing the Boolean value indicating whether metadata 5574 * reads are collective (\TText{>0}) or independent (\TText{0}). 5575 * Default mode: Independent (\TText{0}) 5576 * 5577 * \return \herr_t 5578 * 5579 * \details H5Pget_all_coll_metadata_ops() retrieves the collective metadata read setting from the access 5580 * property list \p plist_id into \p is_collective. 5581 * 5582 * \sa_metadata_ops 5583 * 5584 * \since 1.10.0 5585 */ 5586 H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); 5587 /** 5588 * \ingroup FAPL 5589 * 5590 * \brief Sets metadata write mode to be collective or independent (default) 5591 * 5592 * \fapl_id{plist_id} 5593 * \param[out] is_collective Boolean value indicating whether metadata 5594 * writes are collective (\TText{>0}) or independent (\TText{0}). 5595 * \Emph{Default mode:} Independent (\TText{0}) 5596 * \return \herr_t 5597 * 5598 * \details H5Pset_coll_metadata_write() tells the HDF5 library whether to 5599 * perform metadata writes collectively (1) or independently (0). 5600 * 5601 * If collective access is selected, then on a flush of the metadata 5602 * cache, all processes will divide the metadata cache entries to be 5603 * flushed evenly among themselves and issue a single MPI-IO collective 5604 * write operation. This is the preferred method when the size of the 5605 * metadata created by the application is large. 5606 * 5607 * If independent access is selected, the library uses the default 5608 * method for doing metadata I/O either from process zero or 5609 * independently from each process. 5610 * 5611 * \sa_metadata_ops 5612 * 5613 * \since 1.10.0 5614 */ 5615 H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective); 5616 /** 5617 * \ingroup FAPL 5618 * 5619 * \brief Retrieves metadata write mode setting 5620 * 5621 * \fapl_id{plist_id} 5622 * \param[out] is_collective Pointer to a boolean value indicating whether 5623 * metadata writes are collective (\TText{>0}) or independent (\TText{0}). 5624 * \Emph{Default mode:} Independent (\TText{0}) 5625 * \return \herr_t 5626 * 5627 * \details H5Pget_coll_metadata_write() retrieves the collective metadata write 5628 * setting from the file access property into \p is_collective. 5629 * 5630 * \sa_metadata_ops 5631 * 5632 * \since 1.10.0 5633 */ 5634 H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective); 5635 5636 /** 5637 * \ingroup FAPL 5638 * 5639 * \brief Get the MPI communicator and info 5640 * 5641 * \fapl_id 5642 * \param[out] comm MPI communicator 5643 * \param[out] info MPI info object 5644 * \return \herr_t 5645 * 5646 * \details H5Pget_mpi_params() gets the MPI communicator and info stored in 5647 * the file access property list \p fapl_id. 5648 * 5649 * \since 1.12.0 5650 */ 5651 H5_DLL herr_t H5Pget_mpi_params(hid_t fapl_id, MPI_Comm *comm, MPI_Info *info); 5652 5653 /** 5654 * \ingroup FAPL 5655 * 5656 * \brief Set the MPI communicator and info 5657 * 5658 * \fapl_id 5659 * \param[in] comm MPI communicator 5660 * \param[in] info MPI info object 5661 * \return \herr_t 5662 * 5663 * \details H5Pset_mpi_params() sets the MPI communicator and info stored in 5664 * the file access property list \p fapl_id. 5665 * 5666 * \since 1.12.0 5667 * 5668 */ 5669 H5_DLL herr_t H5Pset_mpi_params(hid_t fapl_id, MPI_Comm comm, MPI_Info info); 5670 #endif /* H5_HAVE_PARALLEL */ 5671 5672 /** 5673 * \ingroup FAPL 5674 * 5675 * \brief Sets the metadata cache image option for a file access property list 5676 * 5677 * \fapl_id{plist_id} 5678 * \param[out] config_ptr Pointer to metadata cache image configuration values 5679 * \return \herr_t 5680 * 5681 * \details H5Pset_mdc_image_config() sets the metadata cache image option with 5682 * configuration values specified by \p config_ptr for the file access 5683 * property list specified in \p plist_id. 5684 * 5685 * #H5AC_cache_image_config_t is defined as follows: 5686 * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip 5687 * \click4more 5688 * 5689 * \par Limitations: While it is an obvious error to request a cache image when 5690 * opening the file read only, it is not in general possible to test for 5691 * this error in the H5Pset_mdc_image_config() call. Rather than fail the 5692 * subsequent file open, the library silently ignores the file image 5693 * request in this case.\n It is also an error to request a cache image on 5694 * a file that does not support superblock extension messages (i.e. a 5695 * superblock version less than 2). As above, it is not always possible to 5696 * detect this error in the H5Pset_mdc_image_config() call, and thus the 5697 * request for a cache image will fail silently in this case as well.\n 5698 * Creation of cache images is currently disabled in parallel -- as above, 5699 * any request for a cache image in this context will fail silently.\n 5700 * Files with cache images may be read in parallel applications, but note 5701 * that the load of the cache image is a collective operation triggered by 5702 * the first operation that accesses metadata after file open (or, if 5703 * persistent free space managers are enabled, on the first allocation or 5704 * deallocation of file space, or read of file space manager status, 5705 * whichever comes first). Thus the parallel process may deadlock if any 5706 * process does not participate in this access.\n 5707 * In long sequences of file closes and opens, infrequently accessed 5708 * metadata can accumulate in the cache image to the point where the cost 5709 * of storing and restoring this metadata exceeds the benefit of retaining 5710 * frequently used metadata in the cache image. When implemented, the 5711 * #H5AC_cache_image_config_t::entry_ageout should address this problem. In 5712 * the interim, not requesting a cache image every n file close/open cycles 5713 * may be an acceptable work around. The choice of \c n will be driven by 5714 * application behavior, but \TText{n = 10} seems a good starting point. 5715 * 5716 * \since 1.10.1 5717 */ 5718 H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); 5719 /** 5720 * \ingroup FAPL 5721 * 5722 * \brief Sets the maximum size for the page buffer and the minimum percentage 5723 * for metadata and raw data pages 5724 * 5725 * \fapl_id{plist_id} 5726 * \param[in] buf_size Maximum size, in bytes, of the page buffer 5727 * \param[in] min_meta_per Minimum metadata percentage to keep in the page buffer 5728 * before allowing pages containing metadata to be evicted (Default is 0) 5729 * \param[in] min_raw_per Minimum raw data percentage to keep in the page buffer 5730 * before allowing pages containing raw data to be evicted (Default is 0) 5731 * \return \herr_t 5732 * 5733 * \details H5Pset_page_buffer_size() sets buf_size, the maximum size in bytes 5734 * of the page buffer. The default value is zero, meaning that page 5735 * buffering is disabled. When a non-zero page buffer size is set, the 5736 * library will enable page buffering if that size is larger or equal 5737 * than a single page size if a paged file space strategy is enabled 5738 * using the functions H5Pset_file_space_strategy() and 5739 * H5Pset_file_space_page_size(). 5740 * 5741 * The page buffer layer captures all I/O requests before they are 5742 * issued to the VFD and "caches" them in fixed sized pages. Once the 5743 * total number of pages exceeds the page buffer size, the library 5744 * evicts pages from the page buffer by writing them to the VFD. At 5745 * file close, the page buffer is flushed writing all the pages to the 5746 * file. 5747 * 5748 * If a non-zero page buffer size is set, and the file space strategy 5749 * is not set to paged or the page size for the file space strategy is 5750 * larger than the page buffer size, the subsequent call to H5Fcreate() 5751 * using the \p plist_id will fail. 5752 * 5753 * \note As of HDF5 1.14.4, this property will be ignored when an existing 5754 * file is being opened and the file space strategy stored in the 5755 * file isn't paged. This was previously a failure. 5756 * 5757 * \note As of HDF5 1.14.4, if a file with a paged file space strategy is 5758 * opened with a page size that is smaller than the file's page size, 5759 * the page cache size will be rounded up to the file's page size. 5760 * This was previously a failure. 5761 * 5762 * The function also allows setting the minimum percentage of pages for 5763 * metadata and raw data to prevent a certain type of data to evict hot 5764 * data of the other type. 5765 * 5766 * \since 1.10.1 5767 * 5768 */ 5769 H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, 5770 unsigned min_raw_per); 5771 5772 /** 5773 * \ingroup FAPL 5774 * 5775 * \brief Relax file integrity checks that may issue errors for some valid files 5776 * 5777 * \fapl_id{plist_id} 5778 * \param[in] flags Relaxed integrity checks flag. Valid values are: 5779 * \li #H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS 5780 * suppresses integrity checks for detecting 5781 * unusually high values for the number of unused bits in 5782 * numeric datatype classes (H5T_INTEGER, H5T_FLOAT, and 5783 * H5T_BITFIELD). Integrity checks are triggered when 5784 * the precision for a datatype (i.e. the number of bits 5785 * containing actual data) is less than half of the 5786 * datatype's size and the datatype is greater than 5787 * 1 byte in size. For example, a datatype with a 5788 * precision of 15 bits and a size of 4 bytes (i.e. 32 bits) 5789 * will issue an error, but a datatype with 17 bits of 5790 * precision and a size of 4 bytes will not issue an 5791 * error, nor will a datatype with a precision of 1, 2, or 5792 * 3 bits and a size of 1 byte issue an error. 5793 * \li #H5F_RFIC_ALL relaxes all integrity checks above. 5794 * 5795 * \return \herr_t 5796 * 5797 * \details Incorrectly encoded or corrupted metadata in a native HDF5 5798 * format file can cause incorrect library behavior when the metadata 5799 * has no checksum. Integrity checks within the library detect these 5800 * circumstances and issue errors when incorrect metadata is found. 5801 * Unfortunately, some of the integrity checks for detecting these 5802 * circumstances may incorrectly issue an error for a valid HDF5 file 5803 * that was intentionally created with these configurations. 5804 * Setting the appropriate flag(s) with this routine will relax the 5805 * file integrity checks for these valid files and suppress errors 5806 * when accessing objects with these configurations. 5807 * 5808 * The library will also issue errors when these configurations are 5809 * used to create objects, preventing applications from unintentionally 5810 * creating them. Setting the appropriate flag with this routine will 5811 * also suppress those errors on creation, although using this routine 5812 * and the appropriate flag(s) will still be required when accessing 5813 * files created with these configurations. 5814 * 5815 * A more complete solution that avoids errors on both object creation 5816 * and access is to use the H5Pset_libver_bounds routine with a low 5817 * bound of at least #H5F_LIBVER_V18 when creating objects with these 5818 * configurations. This will cause the library to checksum a file's 5819 * metadata, allowing accidental data corruption to be correctly 5820 * detected and errors correctly issued without ambiguity. 5821 * 5822 * \since 1.14.4 5823 * 5824 */ 5825 H5_DLL herr_t H5Pset_relax_file_integrity_checks(hid_t plist_id, uint64_t flags); 5826 /** 5827 * \ingroup FAPL 5828 * 5829 * \brief Retrieve relaxed file integrity check flags 5830 * 5831 * \fapl_id{plist_id} 5832 * \param[out] flags Relaxed file integrity check flags 5833 * 5834 * \return \herr_t 5835 * 5836 * \details H5Pget_relax_file_integrity_checks() retrieves the relaxed file 5837 * integrity check value into \p flags for the file access property 5838 * list specified in \p plist_id. 5839 * 5840 * \since 1.14.4 5841 * 5842 */ 5843 H5_DLL herr_t H5Pget_relax_file_integrity_checks(hid_t plist_id, uint64_t *flags); 5844 5845 /* Dataset creation property list (DCPL) routines */ 5846 /** 5847 * \ingroup DCPL 5848 * 5849 * \brief Determines whether fill value is defined 5850 * 5851 * \dcpl_id{plist} 5852 * \param[out] status Status of fill value in property list 5853 * 5854 * \return \herr_t 5855 * 5856 * \details H5Pfill_value_defined() determines whether a fill value is 5857 * defined in the dataset creation property list \p plist. Valid 5858 * values returned in status are as follows: 5859 * 5860 * <table> 5861 * <tr> 5862 * <td>#H5D_FILL_VALUE_UNDEFINED</td> 5863 * <td>Fill value is undefined.</td> 5864 * </tr> 5865 * <tr> 5866 * <td>#H5D_FILL_VALUE_DEFAULT</td> 5867 * <td>Fill value is the library default.</td> 5868 * </tr> 5869 * <tr> 5870 * <td>#H5D_FILL_VALUE_USER_DEFINED</td> 5871 * <td>Fill value is defined by the application.</td> 5872 * </tr> 5873 * </table> 5874 * 5875 * \since 1.6.0 5876 * 5877 */ 5878 H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); 5879 /** 5880 * \ingroup DCPL 5881 * 5882 * \brief Retrieves the timing for storage space allocation 5883 * 5884 * \dcpl_id{plist_id} 5885 * \param[out] alloc_time The timing setting for allocating dataset 5886 * storage space 5887 * 5888 * \return \herr_t 5889 * 5890 * \details H5Pget_alloc_time() retrieves the timing for allocating storage 5891 * space for a dataset's raw data. This property is set in the 5892 * dataset creation property list \p plist_id. The timing setting 5893 * is returned in \p alloc_time as one of the following values: 5894 * 5895 * <table> 5896 * <tr> 5897 * <td>#H5D_ALLOC_TIME_DEFAULT<br /> </td> 5898 * <td>Uses the default allocation time, based on the dataset 5899 * storage method. <br />See the \p alloc_time description in 5900 * H5Pset_alloc_time() for default allocation times for 5901 * various storage methods.</td> 5902 * </tr> 5903 * <tr> 5904 * <td>#H5D_ALLOC_TIME_EARLY</td> 5905 * <td>All space is allocated when the dataset is created.</td> 5906 * </tr> 5907 * <tr> 5908 * <td>#H5D_ALLOC_TIME_INCR</td> 5909 * <td>Space is allocated incrementally as data is written 5910 * to the dataset.</td> 5911 * </tr> 5912 * <tr> 5913 * <td>#H5D_ALLOC_TIME_LATE</td> 5914 * <td>All space is allocated when data is first written to 5915 * the dataset.</td> 5916 * </tr> 5917 * </table> 5918 * 5919 * \note H5Pget_alloc_time() is designed to work in concert with the 5920 * dataset fill value and fill value write time properties, set 5921 * with the functions H5Pget_fill_value() and H5Pget_fill_time(). 5922 * 5923 * \since 1.6.0 5924 * 5925 */ 5926 H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); 5927 /** 5928 * \ingroup DCPL 5929 * 5930 * \brief Retrieves the size of chunks for the raw data of a chunked 5931 * layout dataset 5932 * 5933 * \dcpl_id{plist_id} 5934 * \param[in] max_ndims Size of the \p dims array 5935 * \param[out] dim Array to store the chunk dimensions 5936 * 5937 * \return Returns chunk dimensionality if successful; 5938 * otherwise returns a negative value. 5939 * 5940 * \details H5Pget_chunk() retrieves the size of chunks for the raw data 5941 * of a chunked layout dataset. This function is only valid for 5942 * dataset creation property lists. At most, \p max_ndims elements 5943 * of \p dim will be initialized. 5944 * 5945 * \since 1.0.0 5946 * 5947 */ 5948 H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/); 5949 /** 5950 * 5951 * \ingroup DCPL 5952 * 5953 * \brief Retrieves the edge chunk option setting from a dataset creation 5954 * property list 5955 * 5956 * \dcpl_id{plist_id} 5957 * \param[out] opts Edge chunk option flag. Valid values are described in 5958 * H5Pset_chunk_opts(). The option status can be 5959 * retrieved using the bitwise AND operator ( & ). For 5960 * example, the expression 5961 * (opts&#H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) will 5962 * evaluate to #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS if 5963 * that option has been enabled. Otherwise, it will 5964 * evaluate to 0 (zero). 5965 * 5966 * \return \herr_t 5967 * 5968 * \details H5Pget_chunk_opts() retrieves the edge chunk option setting 5969 * stored in the dataset creation property list \p plist_id. 5970 * 5971 * \since 1.10.0 5972 * 5973 */ 5974 H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); 5975 /** 5976 * \ingroup DCPL 5977 * 5978 * \brief Retrieves the setting for whether or not to create minimized 5979 * dataset object headers 5980 * 5981 * \dcpl_id 5982 * \param[out] minimize Flag indicating whether the library will or will 5983 * not create minimized dataset object headers 5984 * 5985 * \return \herr_t 5986 * 5987 * \details H5Pget_dset_no_attrs_hint() retrieves the 5988 * <i>no dataset attributes</i> hint setting for the dataset 5989 * creation property list \p dcpl_id. This setting is used to 5990 * inform the library to create minimized dataset object headers 5991 * when true. The setting value is returned in the boolean pointer 5992 * \p minimize. 5993 * 5994 * \since 1.10.5 5995 * 5996 */ 5997 H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); 5998 /** 5999 * \ingroup DCPL 6000 * 6001 * \brief Returns information about an external file 6002 * 6003 * \dcpl_id{plist_id} 6004 * \param[in] idx External file index 6005 * \param[in] name_size Maximum length of \p name array 6006 * \param[out] name Name of the external file 6007 * \param[out] offset Pointer to a location to return an offset value 6008 * \param[out] size Pointer to a location to return the size of the 6009 * external file data 6010 * 6011 * \return \herr_t 6012 * 6013 * \details H5Pget_external() returns information about an external file. 6014 * The external file is specified by its index, \p idx, which 6015 * is a number from zero to N-1, where N is the value returned 6016 * by H5Pget_external_count(). At most \p name_size characters 6017 * are copied into the \p name array. If the external file name 6018 * is longer than \p name_size with the null terminator, the 6019 * return value is not null terminated (similar to strncpy()). 6020 * 6021 * If \p name_size is zero or \p name is the null pointer, the 6022 * external file name is not returned. If \p offset or \p size 6023 * are null pointers then the corresponding information is not 6024 * returned. 6025 * 6026 * \note On Windows, off_t is typically a 32-bit signed long value, which 6027 * limits the valid offset that can be returned to 2 GiB. 6028 * 6029 * \version 1.6.4 \p idx parameter type changed to unsigned. 6030 * \since 1.0.0 6031 * 6032 */ 6033 H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, 6034 off_t *offset /*out*/, hsize_t *size /*out*/); 6035 /** 6036 * \ingroup DCPL 6037 * 6038 * \brief Returns the number of external files for a dataset 6039 * 6040 * \dcpl_id{plist_id} 6041 * 6042 * \return Returns the number of external files if successful; otherwise 6043 * returns a negative value. 6044 * 6045 * \details H5Pget_external_count() returns the number of external files 6046 * for the specified dataset. 6047 * 6048 * \since 1.0.0 6049 * 6050 */ 6051 H5_DLL int H5Pget_external_count(hid_t plist_id); 6052 /** 6053 * \ingroup DCPL 6054 * 6055 * \brief Retrieves the time when fill values are written to a dataset 6056 * 6057 * \dcpl_id{plist_id} 6058 * \param[out] fill_time Setting for the timing of writing fill values to 6059 * the dataset 6060 * 6061 * \return \herr_t 6062 * 6063 * \details H5Pget_fill_time() examines the dataset creation property list 6064 * \p plist_id to determine when fill values are to be written to 6065 * a dataset. Valid values returned in \p fill_time are as 6066 * follows: 6067 * 6068 * <table> 6069 * <tr> 6070 * <td>#H5D_FILL_TIME_IFSET</td> 6071 * <td>Fill values are written to the dataset when storage 6072 * space is allocated only if there is a user-defined fill 6073 * value, i.e., one set with H5Pset_fill_value(). (Default) 6074 * </td> 6075 * </tr> 6076 * <tr> 6077 * <td>#H5D_FILL_TIME_ALLOC</td> 6078 * <td>Fill values are written to the dataset when storage 6079 * space is allocated.</td> 6080 * </tr> 6081 * <tr> 6082 * <td>#H5D_FILL_TIME_NEVER</td> 6083 * <td>Fill values are never written to the dataset.</td> 6084 * </tr> 6085 * </table> 6086 * 6087 * \note H5Pget_fill_time() is designed to work in coordination with the 6088 * dataset fill value and dataset storage allocation time properties, 6089 * retrieved with the functions H5Pget_fill_value() and 6090 * H5Pget_alloc_time().type == H5FD_MEM_DRAW 6091 * 6092 * \since 1.6.0 6093 * 6094 */ 6095 H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/); 6096 /** 6097 * \ingroup DCPL 6098 * 6099 * \brief Retrieves a dataset fill value 6100 * 6101 * \dcpl_id{plist_id} 6102 * \param[in] type_id Datatype identifier for the value passed via 6103 * \p value 6104 * \param[out] value Pointer to buffer to contain the returned 6105 * fill value 6106 * 6107 * \return \herr_t 6108 * 6109 * \details H5Pget_fill_value() returns the dataset fill value defined in 6110 * the dataset creation property list \p plist_id. The fill value 6111 * is returned through the \p value pointer and will be converted 6112 * to the datatype specified by \p type_id. This datatype may 6113 * differ from the fill value datatype in the property list, but 6114 * the HDF5 library must be able to convert between the two 6115 * datatypes. 6116 * 6117 * If the fill value is undefined, i.e., set to NULL in the 6118 * property list, H5Pget_fill_value() will return an error. 6119 * H5Pfill_value_defined() should be used to check for this 6120 * condition before H5Pget_fill_value() is called. 6121 * 6122 * Memory must be allocated by the calling application. 6123 * 6124 * \note H5Pget_fill_value() is designed to coordinate with the dataset 6125 * storage allocation time and fill value write time properties, 6126 * which can be retrieved with the functions H5Pget_alloc_time() 6127 * and H5Pget_fill_time(), respectively. 6128 * 6129 * \since 1.0.0 6130 * 6131 */ 6132 H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/); 6133 /** 6134 * \ingroup DCPL 6135 * 6136 * \brief Returns the layout of the raw data for a dataset 6137 * 6138 * \dcpl_id{plist_id} 6139 * 6140 * \return Returns the layout type (a non-negative value) of a dataset 6141 * creation property list if successful. Valid return values are: 6142 * - #H5D_COMPACT: Raw data is stored in the object header in the 6143 * file. 6144 * - #H5D_CONTIGUOUS: Raw data is stored separately from the object 6145 * header in one contiguous chunk in the file. 6146 * - #H5D_CHUNKED: Raw data is stored separately from the object 6147 * header in chunks in separate locations in the 6148 * file. 6149 * - #H5D_VIRTUAL: Raw data is drawn from multiple datasets in 6150 * different files. 6151 * \return 6152 * Otherwise, returns a negative value indicating failure. 6153 * 6154 * \details H5Pget_layout() returns the layout of the raw data for a 6155 * dataset. This function is only valid for dataset creation 6156 * property lists. 6157 * 6158 * Note that a compact storage layout may affect writing data to 6159 * the dataset with parallel applications. See the H5Dwrite() 6160 * documentation for details. 6161 * 6162 * \version 1.10.0 #H5D_VIRTUAL added in this release. 6163 * 6164 * \since 1.0.0 6165 * 6166 */ 6167 H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); 6168 /** 6169 * \ingroup DCPL 6170 * 6171 * \brief Gets the number of mappings for the virtual dataset 6172 * 6173 * \dcpl_id 6174 * \param[out] count The number of mappings 6175 * 6176 * \return \herr_t 6177 * 6178 * \details H5Pget_virtual_count() gets the number of mappings for a 6179 * virtual dataset that has the creation property list specified 6180 * by \p dcpl_id. 6181 * 6182 * \see_virtual 6183 * 6184 * \since 1.10.0 6185 * 6186 */ 6187 H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); 6188 /** 6189 * \ingroup DCPL 6190 * 6191 * \brief Gets the name of a source dataset used in the mapping 6192 * 6193 * \dcpl_id 6194 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6195 * greater and less than \p count 6196 * (0 ≤ \p index < \p count), where \p count is the 6197 * number of mappings returned by H5Pget_virtual_count(). 6198 * \param[out] name A buffer containing the name of the source dataset 6199 * \param[in] size The size, in bytes, of the \p name buffer. Must be the 6200 * size of the dataset name in bytes plus 1 for a NULL 6201 * terminator 6202 * 6203 * \return Returns the length of the dataset name if successful; 6204 * otherwise returns a negative value. 6205 * 6206 * \details H5Pget_virtual_dsetname() takes the dataset creation property 6207 * list for the virtual dataset, \p dcpl_id, the mapping index, 6208 * \p index, the size of the dataset name for a source dataset, 6209 * \p size, and retrieves the name of the source dataset used in 6210 * the mapping. 6211 * 6212 * Up to \p size characters of the dataset name are returned in 6213 * \p name; additional characters, if any, are not returned to 6214 * the user application. 6215 * 6216 * \details_namelen{dataset,H5Pget_virtual_dsetname} 6217 * 6218 * \see_virtual 6219 * 6220 * \since 1.10.0 6221 * 6222 */ 6223 H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); 6224 /** 6225 * \ingroup DCPL 6226 * 6227 * \brief Gets the filename of a source dataset used in the mapping 6228 * 6229 * \dcpl_id 6230 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6231 * greater and less than \p count 6232 * (0 ≤ \p index < \p count), where \p count is the 6233 * number of mappings returned by H5Pget_virtual_count(). 6234 * \param[out] name A buffer containing the name of the file containing 6235 * the source dataset 6236 * \param[in] size The size, in bytes, of the name buffer. Must be the 6237 * size of the filename in bytes plus 1 for a NULL 6238 * terminator 6239 * 6240 * \return Returns the length of the filename if successful; otherwise 6241 * returns a negative value. 6242 * 6243 * \details H5Pget_virtual_filename() takes the dataset creation property 6244 * list for the virtual dataset, \p dcpl_id, the mapping index, 6245 * \p index, the size of the filename for a source dataset, 6246 * \p size, and retrieves the name of the file for a source dataset 6247 * used in the mapping. 6248 * 6249 * Up to \p size characters of the filename are returned in 6250 * \p name; additional characters, if any, are not returned to 6251 * the user application. 6252 * 6253 * \details_namelen{file,H5Pget_virtual_filename} 6254 * 6255 * \see_virtual 6256 * 6257 * \since 1.10.0 6258 * 6259 */ 6260 H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); 6261 /** 6262 * \ingroup DCPL 6263 * 6264 * \brief Gets a dataspace identifier for the selection within the source 6265 * dataset used in the mapping 6266 * 6267 * \dcpl_id 6268 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6269 * greater and less than \p count 6270 * (0 ≤ \p index < \p count), where \p count is the number 6271 * of mappings returned by H5Pget_virtual_count(). 6272 * 6273 * \return \hid_t{valid dataspace identifier} 6274 * 6275 * \details H5Pget_virtual_srcspace() takes the dataset creation property 6276 * list for the virtual dataset, \p dcpl_id, and the mapping 6277 * index, \p index, and returns a dataspace identifier for the 6278 * selection within the source dataset used in the mapping. 6279 * 6280 * \see_virtual 6281 * 6282 * \since 1.10.0 6283 * 6284 */ 6285 H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); 6286 /** 6287 * \ingroup DCPL 6288 * 6289 * \brief Gets a dataspace identifier for the selection within the virtual 6290 * dataset used in the mapping 6291 * 6292 * \dcpl_id 6293 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6294 * greater and less than \p count 6295 * (0 ≤ \p index < \p count), where \p count is the number 6296 * of mappings returned by H5Pget_virtual_count() 6297 * 6298 * \return \hid_t{valid dataspace identifier} 6299 * 6300 * \details H5Pget_virtual_vspace() takes the dataset creation property 6301 * list for the virtual dataset, \p dcpl_id, and the mapping 6302 * index, \p index, and returns a dataspace identifier for the 6303 * selection within the virtual dataset used in the mapping. 6304 * 6305 * \see_virtual 6306 * 6307 * \since 1.10.0 6308 * 6309 */ 6310 H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); 6311 /** 6312 * \ingroup DCPL 6313 * 6314 * \brief Sets the timing for storage space allocation 6315 * 6316 * \dcpl_id{plist_id} 6317 * \param[in] alloc_time When to allocate dataset storage space 6318 * 6319 * \return \herr_t 6320 * 6321 * \details H5Pset_alloc_time() sets up the timing for the allocation of 6322 * storage space for a dataset's raw data. This property is set 6323 * in the dataset creation property list \p plist_id. Timing is 6324 * specified in \p alloc_time with one of the following values: 6325 * 6326 * <table> 6327 * <tr> 6328 * <td>#H5D_ALLOC_TIME_DEFAULT</td> 6329 * <td>Allocate dataset storage space at the default time<br /> 6330 * (Defaults differ by storage method.)</td> 6331 * </tr> 6332 * <tr> 6333 * <td>#H5D_ALLOC_TIME_EARLY</td> 6334 * <td>Allocate all space when the dataset is created<br /> 6335 * (Default for compact datasets.)</td> 6336 * </tr> 6337 * <tr> 6338 * <td>#H5D_ALLOC_TIME_INCR</td> 6339 * <td>Allocate space incrementally, as data is written to 6340 * the dataset<br />(Default for chunked storage datasets.) 6341 * 6342 * \li Chunked datasets: Storage space allocation for each 6343 * chunk is deferred until data is written to the chunk. 6344 * \li Contiguous datasets: Incremental storage space 6345 * allocation for contiguous data is treated as late 6346 * allocation. 6347 * \li Compact datasets: Incremental allocation is not 6348 * allowed with compact datasets; H5Pset_alloc_time() 6349 * will return an error.</td> 6350 * </tr> 6351 * <tr> 6352 * <td>#H5D_ALLOC_TIME_LATE</td> 6353 * <td>Allocate all space when data is first written to the 6354 * dataset<br /> 6355 * (Default for contiguous datasets.)</td> 6356 * </tr> 6357 * </table> 6358 * 6359 * \note H5Pset_alloc_time() is designed to work in concert with the 6360 * dataset fill value and fill value write time properties, set 6361 * with the functions H5Pset_fill_value() and H5Pset_fill_time(). 6362 * 6363 * \note See H5Dcreate() for further cross-references. 6364 * 6365 * \since 1.6.0 6366 * 6367 */ 6368 H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); 6369 /** 6370 * \ingroup DCPL 6371 * 6372 * \brief Sets the size of the chunks used to store a chunked layout 6373 * dataset 6374 * 6375 * \dcpl_id{plist_id} 6376 * \param[in] ndims The number of dimensions of each chunk 6377 * \param[in] dim An array defining the size, in dataset elements, of 6378 * each chunk 6379 * 6380 * \return \herr_t 6381 * \details H5Pset_chunk() sets the size of the chunks used to store a 6382 * chunked layout dataset. This function is only valid for dataset 6383 * creation property lists. 6384 * 6385 * The \p ndims parameter currently must be the same size as the 6386 * rank of the dataset. 6387 * 6388 * The values of the \p dim array define the size of the chunks 6389 * to store the dataset's raw data. The unit of measure for \p dim 6390 * values is dataset elements. 6391 * 6392 * As a side-effect of this function, the layout of the dataset is 6393 * changed to #H5D_CHUNKED, if it is not already so set. 6394 * 6395 * \note Chunk size cannot exceed the size of a fixed-size dataset. For 6396 * example, a dataset consisting of a 5x4 fixed-size array cannot be 6397 * defined with 10x10 chunks. Chunk maximums: 6398 * - The maximum number of elements in a chunk is 2<sup>32</sup>-1 which 6399 * is equal to 4,294,967,295. If the number of elements in a chunk is 6400 * set via H5Pset_chunk() to a value greater than 2<sup>32</sup>-1, 6401 * then H5Pset_chunk() will fail. 6402 * - The maximum size for any chunk is 4GB. If a chunk that is larger 6403 * than 4GB attempts to be written with H5Dwrite(), then H5Dwrite() 6404 * will fail. 6405 * 6406 * \see H5Pset_layout(), H5Dwrite() 6407 * 6408 * \since 1.0.0 6409 * 6410 */ 6411 H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]); 6412 /** 6413 * \ingroup DCPL 6414 * 6415 * \brief Sets the edge chunk option in a dataset creation property list 6416 * 6417 * \dcpl_id{plist_id} 6418 * \param[in] opts Edge chunk option flag. Valid values are: 6419 * \li #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS 6420 * When enabled, filters are not applied to partial 6421 * edge chunks. When disabled, partial edge chunks are 6422 * filtered. Enabling this option will improve 6423 * performance when appending to the dataset and, when 6424 * compression filters are used, prevent reallocation 6425 * of these chunks. Datasets created with this option 6426 * enabled will be inaccessible with HDF5 library 6427 * versions before Release 1.10. Default: \e Disabled 6428 * \li 0 (zero) Disables option; partial edge chunks 6429 * will be compressed. 6430 * 6431 * \return \herr_t 6432 * 6433 * \details H5Pset_chunk_opts() sets the edge chunk option in the 6434 * dataset creation property list \p dcpl_id. 6435 * 6436 * The available option is detailed in the parameters section. 6437 * Only chunks that are not completely filled by the dataset's 6438 * dataspace are affected by this option. Such chunks are 6439 * referred to as partial edge chunks. 6440 * 6441 * \b Motivation: H5Pset_chunk_opts() is used to specify storage 6442 * options for chunks on the edge of a dataset's dataspace. This 6443 * capability allows the user to tune performance in cases where 6444 * the dataset size may not be a multiple of the chunk size and 6445 * the handling of partial edge chunks can impact performance. 6446 * 6447 * \since 1.10.0 6448 * 6449 */ 6450 H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); 6451 /** 6452 * \ingroup DCPL 6453 * 6454 * \brief Sets the flag to create minimized dataset object headers 6455 * 6456 * \dcpl_id 6457 * \param[in] minimize Flag for indicating whether or not a dataset's 6458 * object header will be minimized 6459 * 6460 * \return \herr_t 6461 * 6462 * \details H5Pset_dset_no_attrs_hint() sets the no dataset attributes 6463 * hint setting for the dataset creation property list \p dcpl_id. 6464 * Datasets created with the dataset creation property list 6465 * \p dcpl_id will have their object headers minimized if the 6466 * boolean flag \p minimize is set to true. By setting \p minimize 6467 * to true, the library expects that no attributes will be added 6468 * to the dataset. Attributes can be added, but they are appended 6469 * with a continuation message, which can reduce performance. 6470 * 6471 * This setting interacts with H5Fset_dset_no_attrs_hint(): if 6472 * either is set to true, then the created dataset's object header 6473 * will be minimized. 6474 * 6475 * \since 1.10.5 6476 * 6477 */ 6478 H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); 6479 /** 6480 * \ingroup DCPL 6481 * 6482 * \brief Adds an external file to the list of external files 6483 * 6484 * \dcpl_id{plist_id} 6485 * \param[in] name Name of an external file 6486 * \param[in] offset Offset, in bytes, from the beginning of the file to 6487 * the location in the file where the data starts 6488 * \param[in] size Number of bytes reserved in the file for the data 6489 * 6490 * \return \herr_t 6491 * 6492 * \details The first call to H5Pset_external() sets the external 6493 * storage property in the property list, thus designating that 6494 * the dataset will be stored in one or more non-HDF5 file(s) 6495 * external to the HDF5 file. This call also adds the file 6496 * \p name as the first file in the list of external files. 6497 * Subsequent calls to the function add the named file as the 6498 * next file in the list. 6499 * 6500 * If a dataset is split across multiple files, then the files 6501 * should be defined in order. The total size of the dataset is 6502 * the sum of the \p size arguments for all the external files. 6503 * If the total size is larger than the size of a dataset then 6504 * the dataset can be extended (provided the data space also 6505 * allows the extending). 6506 * 6507 * The \p size argument specifies the number of bytes reserved 6508 * for data in the external file. If \p size is set to 6509 * #H5F_UNLIMITED, the external file can be of unlimited size 6510 * and no more files can be added to the external files list. 6511 * If \p size is set to 0 (zero), no external file will actually 6512 * be created. 6513 * 6514 * All of the external files for a given dataset must be specified 6515 * with H5Pset_external() before H5Dcreate() is called to create 6516 * the dataset. If one these files does not exist on the system 6517 * when H5Dwrite() is called to write data to it, the library 6518 * will create the file. 6519 * 6520 * \note On Windows, off_t is typically a 32-bit signed long value, which 6521 * limits the valid offset that can be set to 2 GiB. 6522 * 6523 * \since 1.0.0 6524 * 6525 */ 6526 H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); 6527 /** 6528 * \ingroup DCPL 6529 * 6530 * \brief Sets the time when fill values are written to a dataset 6531 * 6532 * \dcpl_id{plist_id} 6533 * \param[in] fill_time When to write fill values to a dataset 6534 * 6535 * \return \herr_t 6536 * 6537 * \details H5Pset_fill_time() sets up the timing for writing fill values 6538 * to a dataset. This property is set in the dataset creation 6539 * property list \p plist_id. Timing is specified in \p fill_time 6540 * with one of the following values: 6541 * 6542 * <table> 6543 * <tr> 6544 * <td>#H5D_FILL_TIME_IFSET</td> 6545 * <td>Write fill values to the dataset when storage space is 6546 * allocated only if there is a user-defined fill value, 6547 * i.e.,one set with H5Pset_fill_value(). (Default)</td> 6548 * </tr> 6549 * <tr> 6550 * <td>#H5D_FILL_TIME_ALLOC</td> 6551 * <td>Write fill values to the dataset when storage space is 6552 * allocated.</td> 6553 * </tr> 6554 * <tr> 6555 * <td>#H5D_FILL_TIME_NEVER</td> 6556 * <td>Never write fill values to the dataset.</td> 6557 * </tr> 6558 * </table> 6559 * 6560 * \note H5Pset_fill_time() is designed for coordination with the dataset 6561 * fill value and dataset storage allocation time properties, set 6562 * with the functions H5Pset_fill_value() and H5Pset_alloc_time(). 6563 * See H5Dcreate() for further cross-references. 6564 * 6565 * \since 1.6.0 6566 * 6567 */ 6568 H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); 6569 /** 6570 * \ingroup DCPL 6571 * 6572 * \brief Sets the fill value for a dataset 6573 * 6574 * \dcpl_id{plist_id} 6575 * \param[in] type_id Datatype of \p value 6576 * \param[in] value Pointer to buffer containing value to use as 6577 * fill value 6578 * 6579 * \return \herr_t 6580 * 6581 * \details H5Pset_fill_value() sets the fill value for a dataset in the 6582 * dataset creation property list. \p value is interpreted as 6583 * being of datatype \p type_id. This datatype may differ from 6584 * that of the dataset, but the HDF5 library must be able to 6585 * convert \p value to the dataset datatype when the dataset is 6586 * created. 6587 * 6588 * The default fill value is 0 (zero), which is interpreted 6589 * according to the actual dataset datatype. 6590 * 6591 * Setting \p value to NULL indicates that the fill value is to 6592 * be undefined. 6593 * 6594 * \note Applications sometimes write data only to portions of an allocated 6595 * dataset. It is often useful in such cases to fill the unused space 6596 * with a known fill value. This function allows the user application 6597 * to set that fill value; the functions H5Dfill() and 6598 * H5Pset_fill_time(), respectively, provide the ability to apply the 6599 * fill value on demand or to set up its automatic application. 6600 * 6601 * \note A fill value should be defined so that it is appropriate for the 6602 * application. While the HDF5 default fill value is 0 (zero), it is 6603 * often appropriate to use another value. It might be useful, for 6604 * example, to use a value that is known to be impossible for the 6605 * application to legitimately generate. 6606 * 6607 * \note H5Pset_fill_value() is designed to work in concert with 6608 * H5Pset_alloc_time() and H5Pset_fill_time(). H5Pset_alloc_time() 6609 * and H5Pset_fill_time() govern the timing of dataset storage 6610 * allocation and fill value write operations and can be important in 6611 * tuning application performance. 6612 * 6613 * \note See H5Dcreate() for further cross-references. 6614 * 6615 * \since 1.0.0 6616 * 6617 */ 6618 H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); 6619 /** 6620 * \ingroup DCPL 6621 * 6622 * \brief Sets up use of the shuffle filter 6623 * 6624 * \dcpl_id{plist_id} 6625 * 6626 * \return \herr_t 6627 * 6628 * \par_compr_note 6629 * 6630 * \details H5Pset_shuffle() sets the shuffle filter, #H5Z_FILTER_SHUFFLE, 6631 * in the dataset creation property list \p plist_id. The shuffle 6632 * filter de-interlaces a block of data by reordering the bytes. 6633 * All the bytes from one consistent byte position of each data 6634 * element are placed together in one block; all bytes from a 6635 * second consistent byte position of each data element are placed 6636 * together a second block; etc. For example, given three data 6637 * elements of a 4-byte datatype stored as 012301230123, shuffling 6638 * will re-order data as 000111222333. This can be a valuable step 6639 * in an effective compression algorithm because the bytes in each 6640 * byte position are often closely related to each other and 6641 * putting them together can increase the compression ratio. 6642 * 6643 * As implied above, the primary value of the shuffle filter lies 6644 * in its coordinated use with a compression filter; it does not 6645 * provide data compression when used alone. When the shuffle 6646 * filter is applied to a dataset immediately prior to the use of 6647 * a compression filter, the compression ratio achieved is often 6648 * superior to that achieved by the use of a compression filter 6649 * without the shuffle filter. 6650 * 6651 * \since 1.6.0 6652 * 6653 */ 6654 H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); 6655 /** 6656 * \ingroup DCPL 6657 * 6658 * \brief Sets the type of storage used to store the raw data for a dataset 6659 * 6660 * \dcpl_id{plist_id} 6661 * \param[in] layout Type of storage layout for raw data 6662 * 6663 * \return \herr_t 6664 * \details H5Pset_layout() sets the type of storage used to store the raw 6665 * data for a dataset. This function is only valid for dataset 6666 * creation property lists. 6667 * 6668 * Valid values for \p layout are: 6669 * - #H5D_COMPACT: Store raw data in the dataset object header 6670 * in file. This should only be used for datasets 6671 * with small amounts of raw data. The raw data 6672 * size limit is 64K (65520 bytes). Attempting 6673 * to create a dataset with raw data larger than 6674 * this limit will cause the H5Dcreate() call to 6675 * fail. 6676 * - #H5D_CONTIGUOUS: Store raw data separately from the object 6677 * header in one large chunk in the file. 6678 * - #H5D_CHUNKED: Store raw data separately from the object header 6679 * as chunks of data in separate locations in 6680 * the file. 6681 * - #H5D_VIRTUAL: Draw raw data from multiple datasets in 6682 * different files. 6683 * 6684 * Note that a compact storage layout may affect writing data to 6685 * the dataset with parallel applications. See the note in 6686 * H5Dwrite() documentation for details. 6687 * \version 1.10.0 #H5D_VIRTUAL added in this release. 6688 * \since 1.0.0 6689 * 6690 */ 6691 H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); 6692 /** 6693 * \ingroup DCPL 6694 * 6695 * \brief Sets up the use of the N-Bit filter 6696 * 6697 * \dcpl_id{plist_id} 6698 * 6699 * \return \herr_t 6700 * 6701 * \par_compr_note 6702 * 6703 * \details H5Pset_nbit() sets the N-Bit filter, #H5Z_FILTER_NBIT, in the 6704 * dataset creation property list \p plist_id. 6705 * 6706 * The HDF5 user can create an N-Bit datatype with the following 6707 * code: 6708 * <pre> 6709 * hid_t nbit_datatype = H5Tcopy(H5T_STD_I32LE); 6710 * H5Tset_precision(nbit_datatype, 16); 6711 * H5Tset_offset(nbit_datatype, 4); 6712 * </pre> 6713 * 6714 * In memory, one value of the N-Bit datatype in the above example 6715 * will be stored on a little-endian machine as follows: 6716 * 6717 * <table> 6718 * <tr> 6719 * <td>byte 3</td> 6720 * <td>byte 2</td> 6721 * <td>byte 1</td> 6722 * <td>byte 0</td> 6723 * </tr> 6724 * <tr> 6725 * <td> ???????? </td> 6726 * <td> ????SPPP </td> 6727 * <td> PPPPPPPP </td> 6728 * <td> PPPP???? </td> 6729 * </tr> 6730 * </table> 6731 * Note: S - sign bit, P - significant bit, ? - padding bit; For 6732 * signed integer, the sign bit is included in the precision. 6733 * 6734 * When data of the above datatype is stored on disk using the 6735 * N-bit filter, all padding bits are chopped off and only 6736 * significant bits are stored. The values on disk will be 6737 * something like: 6738 * 6739 * <table> 6740 * <tr> 6741 * <td>1st value</td> 6742 * <td>2nd value</td> 6743 * <td>...</td> 6744 * </tr> 6745 * <tr> 6746 * <td>SPPPPPPPPPPPPPPP</td> 6747 * <td>SPPPPPPPPPPPPPPP</td> 6748 * <td>...</td> 6749 * </tr> 6750 * </table> 6751 * The N-Bit filter is used effectively for compressing data of 6752 * an N-Bit datatype as well as a compound and an array 6753 * datatype with N-Bit fields. However, the datatype classes of 6754 * the N-Bit datatype or the N-Bit field of the compound 6755 * datatype or the array datatype are limited to integer or 6756 * floating-point. 6757 * 6758 * The N-Bit filter supports complex situations where a compound 6759 * datatype contains member(s) of a compound datatype or an array 6760 * datatype that has a compound datatype as the base type. 6761 * However, it does not support the situation where an array 6762 * datatype has a variable-length or variable-length string as 6763 * its base datatype. The filter does support the situation where 6764 * a variable-length or variable-length string is a member of a 6765 * compound datatype. 6766 * 6767 * The N-Bit filter allows all other HDF5 datatypes (such as 6768 * time, string, bitfield, opaque, reference, enum, and variable 6769 * length) to pass through as a no-op. 6770 * 6771 * Like other I/O filters supported by the HDF5 library, 6772 * application using the N-Bit filter must store data with 6773 * chunked storage. 6774 * 6775 * By nature, the N-Bit filter should not be used together with 6776 * other I/O filters. 6777 * 6778 * \version 1.8.8 Fortran subroutine introduced in this release. 6779 * 6780 * \since 1.8.0 6781 * 6782 */ 6783 H5_DLL herr_t H5Pset_nbit(hid_t plist_id); 6784 /** 6785 * \ingroup DCPL 6786 * 6787 * \brief Sets up the use of the scale-offset filter 6788 * 6789 * \dcpl_id{plist_id} 6790 * \param[in] scale_type Flag indicating compression method 6791 * \param[in] scale_factor Parameter related to scale. Must be 6792 * non-negative 6793 * 6794 * \return \herr_t 6795 * 6796 * \par_compr_note 6797 * 6798 * \details H5Pset_scaleoffset() sets the scale-offset filter, 6799 * #H5Z_FILTER_SCALEOFFSET, for a dataset. 6800 * 6801 * Generally speaking, scale-offset compression performs a scale and/or 6802 * offset operation on each data value and truncates the resulting 6803 * value to a minimum number of bits (MinBits) before storing it. The 6804 * current scale-offset filter supports integer and floating-point 6805 * datatypes. 6806 * 6807 * For an integer datatype, the parameter \p scale_type should be set 6808 * to #H5Z_SO_INT (2). The parameter \p scale_factor denotes MinBits. 6809 * If the user sets it to H5Z_SO_INT_MINBITS_DEFAULT (0), the filter 6810 * will calculate MinBits. If \p scale_factor is set to a positive 6811 * integer, the filter does not do any calculation and just uses the 6812 * number as MinBits. However, if the user gives a MinBits that is less 6813 * than what would be generated by the filter, the compression will be 6814 * lossy. Also, the MinBits supplied by the user cannot exceed the 6815 * number of bits to store one value of the dataset datatype. 6816 * 6817 * For a floating-point datatype, the filter adopts the GRiB data 6818 * packing mechanism, which offers two alternate methods: E-scaling and 6819 * D-scaling. Both methods are lossy compression. If the parameter 6820 * \p scale_type is set to #H5Z_SO_FLOAT_DSCALE (0), the filter will 6821 * use the D-scaling method; if it is set to #H5Z_SO_FLOAT_ESCALE (1), 6822 * the filter will use the E-scaling method. Since only the D-scaling 6823 * method is implemented, \p scale_type should be set to 6824 * #H5Z_SO_FLOAT_DSCALE or 0. 6825 * 6826 * When the D-scaling method is used, the original data is "D" scaled 6827 * — multiplied by 10 to the power of \p scale_factor, and the 6828 * "significant" part of the value is moved to the left of the decimal 6829 * point. Care should be taken in setting the decimal \p scale_factor 6830 * so that the integer part will have enough precision to contain the 6831 * appropriate information of the data value. For example, if 6832 * \p scale_factor is set to 2, the number 104.561 will be 10456.1 6833 * after "D" scaling. The last digit 1 is not "significant" and is 6834 * thrown off in the process of rounding. The user should make sure that 6835 * after "D" scaling and rounding, the data values are within the range 6836 * that can be represented by the integer (same size as the 6837 * floating-point type). 6838 * 6839 * Valid values for scale_type are as follows: 6840 * 6841 * <table> 6842 * <tr> 6843 * <td>#H5Z_SO_FLOAT_DSCALE (0)</td> 6844 * <td>Floating-point type, using variable MinBits method</td> 6845 * </tr> 6846 * <tr> 6847 * <td>#H5Z_SO_FLOAT_ESCALE (1)</td> 6848 * <td>Floating-point type, using fixed MinBits method</td> 6849 * </tr> 6850 * <tr> 6851 * <td>#H5Z_SO_INT (2)</td> 6852 * <td>Integer type</td> 6853 * </tr> 6854 * </table> 6855 * 6856 * The meaning of \p scale_factor varies according to the value 6857 * assigned to \p scale_type: 6858 * 6859 * <table> 6860 * <tr> 6861 * <th>\p scale_type value</th> 6862 * <th>\p scale_factor description</th> 6863 * </tr> 6864 * <tr> 6865 * <td>#H5Z_SO_FLOAT_DSCALE</td> 6866 * <td>Denotes the decimal scale factor for D-scaling and can be 6867 * positive, negative or zero. This is the current 6868 * implementation of the library.</td> 6869 * </tr> 6870 * <tr> 6871 * <td>#H5Z_SO_FLOAT_ESCALE</td> 6872 * <td>Denotes MinBits for E-scaling and must be a positive integer. 6873 * This is not currently implemented by the library.</td> 6874 * </tr> 6875 * <tr> 6876 * <td>#H5Z_SO_INT</td> 6877 * <td>Denotes MinBits and it should be a positive integer or 6878 * #H5Z_SO_INT_MINBITS_DEFAULT (0). If it is less than 0, the 6879 * library will reset it to 0 since it is not implemented. 6880 * </td> 6881 * </tr> 6882 * </table> 6883 * Like other I/O filters supported by the HDF5 library, an 6884 * application using the scale-offset filter must store data with 6885 * chunked storage. 6886 * 6887 * \version 1.8.8 Fortran90 subroutine introduced in this release. 6888 * 6889 * \since 1.8.0 6890 * 6891 */ 6892 H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); 6893 /** 6894 * \ingroup DCPL 6895 * 6896 * \brief Sets up use of the SZIP compression filter 6897 * 6898 * \dcpl_id{plist_id} 6899 * \param[in] options_mask A bit-mask conveying the desired SZIP options; 6900 * Valid values are #H5_SZIP_EC_OPTION_MASK and 6901 * #H5_SZIP_NN_OPTION_MASK. 6902 * \param[in] pixels_per_block The number of pixels or data elements in each 6903 * data block (max #H5_SZIP_MAX_PIXELS_PER_BLOCK) 6904 * 6905 * \return \herr_t 6906 * 6907 * \par_compr_note 6908 * 6909 * \details H5Pset_szip() sets an SZIP compression filter, #H5Z_FILTER_SZIP, 6910 * for a dataset. SZIP is a compression method designed for use with 6911 * scientific data. 6912 * 6913 * Before proceeding, all users should review the “Limitations” 6914 * section below. 6915 * 6916 * Users familiar with SZIP outside the HDF5 context may benefit 6917 * from reviewing the Note “For Users Familiar with SZIP in Other 6918 * Contexts” below. 6919 * 6920 * In the text below, the term pixel refers to an HDF5 data element. 6921 * This terminology derives from SZIP compression's use with image 6922 * data, where pixel referred to an image pixel. 6923 * 6924 * The SZIP \p bits_per_pixel value (see Note, below) is automatically 6925 * set, based on the HDF5 datatype. SZIP can be used with atomic 6926 * datatypes that may have size of 8, 16, 32, or 64 bits. 6927 * Specifically, a dataset with a datatype that is 8-, 16-, 32-, or 6928 * 64-bit signed or unsigned integer; char; or 32- or 64-bit float 6929 * can be compressed with SZIP. See Note, below, for further 6930 * discussion of the SZIP \p bits_per_pixel setting. 6931 * 6932 * SZIP options are passed in an options mask, \p options_mask, 6933 * as follows. 6934 * 6935 * <table> 6936 * <tr> 6937 * <th>Option</th> 6938 * <th>Description (Mutually exclusive; select one)</th> 6939 * </tr> 6940 * <tr> 6941 * <td>#H5_SZIP_EC_OPTION_MASK</td> 6942 * <td>Selects entropy coding method</td> 6943 * </tr> 6944 * <tr> 6945 * <td>#H5_SZIP_NN_OPTION_MASK</td> 6946 * <td>Selects nearest neighbor preprocessing followed by entropy coding</td> 6947 * </tr> 6948 * </table> 6949 * 6950 * The following guidelines can be used in determining which 6951 * option to select: 6952 * 6953 * - The entropy coding method, the EC option specified by 6954 * #H5_SZIP_EC_OPTION_MASK, is best suited for data that has been 6955 * processed. The EC method works best for small numbers. 6956 * - The nearest neighbor coding method, the NN option specified 6957 * by #H5_SZIP_NN_OPTION_MASK, preprocesses the data then the 6958 * applies EC method as above. 6959 * 6960 * Other factors may affect results, but the above criteria 6961 * provides a good starting point for optimizing data compression. 6962 * 6963 * SZIP compresses data block by block, with a user-tunable block 6964 * size. This block size is passed in the parameter 6965 * \p pixels_per_block and must be even and not greater than 32, 6966 * with typical values being 8, 10, 16, or 32. This parameter 6967 * affects compression ratio; the more pixel values vary, the 6968 * smaller this number should be to achieve better performance. 6969 * 6970 * In HDF5, compression can be applied only to chunked datasets. 6971 * If \p pixels_per_block is bigger than the total number of 6972 * elements in a dataset chunk, H5Pset_szip() will succeed but 6973 * the subsequent call to H5Dcreate() will fail; the conflict 6974 * can be detected only when the property list is used. 6975 * 6976 * To achieve optimal performance for SZIP compression, it is 6977 * recommended that a chunk's fastest-changing dimension be equal 6978 * to N times \p pixels_per_block where N is the maximum number of 6979 * blocks per scan line allowed by the SZIP library. In the 6980 * current version of SZIP, N is set to 128. 6981 * 6982 * SZIP compression is an optional HDF5 filter. 6983 * 6984 * \b Limitations: 6985 * 6986 * - SZIP compression cannot be applied to compound, array, 6987 * variable-length, enumeration, or any other user-defined 6988 * datatypes. If an SZIP filter is set in a dataset creation 6989 * property list used to create a dataset containing a 6990 * non-allowed datatype, the call to H5Dcreate() will fail; the 6991 * conflict can be detected only when the property list is used. 6992 * - Users should be aware that there are factors that affect one's 6993 * rights and ability to use SZIP compression by reviewing the 6994 * SZIP copyright notice. (This limitation does not apply to the 6995 * libaec library). 6996 * 6997 * \note <b> For Users Familiar with SZIP in Other Contexts: </b> 6998 * 6999 * \note The following notes are of interest primarily to those who have 7000 * used SZIP compression outside of the HDF5 context. 7001 * In non-HDF5 applications, SZIP typically requires that the user 7002 * application supply additional parameters: 7003 * - \p pixels_in_object, the number of pixels in the object to 7004 * be compressed 7005 * - \p bits_per_pixel, the number of bits per pixel 7006 * - \p pixels_per_scanline, the number of pixels per scan line 7007 * 7008 * \note These values need not be independently supplied in the HDF5 7009 * environment as they are derived from the datatype and dataspace, 7010 * which are already known. In particular, HDF5 sets 7011 * \p pixels_in_object to the number of elements in a chunk and 7012 * \p bits_per_pixel to the size of the element or pixel datatype. 7013 * 7014 * \note The following algorithm is used to set \p pixels_per_scanline: 7015 * - If the size of a chunk's fastest-changing dimension, size, 7016 * is greater than 4K, set \p pixels_per_scanline to 128 times 7017 * \p pixels_per_block. 7018 * - If size is less than 4K but greater than \p pixels_per_block, 7019 * set \p pixels_per_scanline to the minimum of size and 128 7020 * times \p pixels_per_block. 7021 * - If size is less than \p pixels_per_block but greater than the 7022 * number elements in the chunk, set \p pixels_per_scanline to 7023 * the minimum of the number elements in the chunk and 128 times 7024 * \p pixels_per_block. 7025 * 7026 * \note The HDF5 datatype may have precision that is less than the full 7027 * size of the data element, e.g., an 11-bit integer can be defined 7028 * using H5Tset_precision(). To a certain extent, SZIP can take 7029 * advantage of the precision of the datatype to improve compression: 7030 * - If the HDF5 datatype size is 24-bit or less and the offset of 7031 * the bits in the HDF5 datatype is zero (see H5Tset_offset() or 7032 * H5Tget_offset()), the data is the in lowest N bits of the data 7033 * element. In this case, the SZIP \p bits_per_pixel is set to the 7034 * precision of the HDF5 datatype. 7035 * - If the offset is not zero, the SZIP \p bits_per_pixel will be 7036 * set to the number of bits in the full size of the data element. 7037 * - If the HDF5 datatype precision is 25-bit to 32-bit, the SZIP 7038 * \p bits_per_pixel will be set to 32. 7039 * - If the HDF5 datatype precision is 33-bit to 64-bit, the SZIP 7040 * \p bits_per_pixel will be set to 64. 7041 * 7042 * \note HDF5 always modifies the options mask provided by the user to set up 7043 * usage of RAW_OPTION_MASK, ALLOW_K13_OPTION_MASK, and one of 7044 * LSB_OPTION_MASK or MSB_OPTION_MASK, depending on endianness of the 7045 * datatype. 7046 * 7047 * \since 1.6.0 7048 * 7049 */ 7050 H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); 7051 7052 /** 7053 * \ingroup DCPL 7054 * 7055 * \brief Sets the mapping between virtual and source datasets 7056 * 7057 * \dcpl_id 7058 * \param[in] vspace_id The dataspace identifier with the selection within the 7059 * virtual dataset applied, possibly an unlimited selection 7060 * \param[in] src_file_name The name of the HDF5 file where the source dataset is 7061 * located or a \TText{"."} (period) for a source dataset in the same 7062 * file. The file might not exist yet. The name can be specified using 7063 * a C-style \c printf statement as described below. 7064 * \param[in] src_dset_name The path to the HDF5 dataset in the file specified by 7065 * \p src_file_name. The dataset might not exist yet. The dataset name 7066 * can be specified using a C-style \c printf statement as described below. 7067 * \param[in] src_space_id The source dataset's dataspace identifier with a 7068 * selection applied, possibly an unlimited selection 7069 * \return \herr_t 7070 * 7071 * \details H5Pset_virtual() maps elements of the virtual dataset (VDS) 7072 * described by the virtual dataspace identifier \p vspace_id to the 7073 * elements of the source dataset described by the source dataset 7074 * dataspace identifier \p src_space_id. The source dataset is 7075 * identified by the name of the file where it is located, 7076 * \p src_file_name, and the name of the dataset, \p src_dset_name. 7077 * 7078 * \par C-style \c printf Formatting Statements: 7079 * C-style \c printf formatting allows a pattern to be specified in the name 7080 * of a source file or dataset. Strings for the file and dataset names are 7081 * treated as literals except for the following substitutions: 7082 * <table> 7083 * <tr> 7084 * <td>\TText{"%%"}</td> 7085 * <td>Replaced with a single \TText{"%"} (percent) character.</td> 7086 * </tr> 7087 * <tr> 7088 * <td><code>"%<d>b"</code></td> 7089 * <td>Where <code>"<d>"</code> is the virtual dataset dimension axis (0-based) 7090 * and \TText{"b"} indicates that the block count of the selection in that 7091 * dimension should be used. The full expression (for example, \TText{"%0b"}) 7092 * is replaced with a single numeric value when the mapping is evaluated at 7093 * VDS access time. Example code for many source and virtual dataset mappings 7094 * is available in the "Examples of Source to Virtual Dataset Mapping" 7095 * chapter in the 7096 * <a href="https://\RFCURL/HDF5-VDS-requirements-use-cases-2014-12-10.pdf"> 7097 * RFC: HDF5 Virtual Dataset</a>. 7098 * </td> 7099 * </tr> 7100 * </table> 7101 * If the printf form is used for the source file or dataset names, the 7102 * selection in the source dataset's dataspace must be fixed-size. 7103 * 7104 * \par Source File Resolutions: 7105 * When a source dataset residing in a different file is accessed, the 7106 * library will search for the source file \p src_file_name as described 7107 * below: 7108 * \li If \p src_file_name is a \TText{"."} (period) then it refers to the 7109 * file containing the virtual dataset. 7110 * \li If \p src_file_name is a relative pathname, the following steps are 7111 * performed: 7112 * - The library will get the prefix(es) set in the environment 7113 * variable \c HDF5_VDS_PREFIX and will try to prepend each prefix 7114 * to \p src_file_name to form a new \p src_file_name. If the new 7115 * \p src_file_name does not exist or if \c HDF5_VDS_PREFIX is not 7116 * set, the library will get the prefix set via H5Pset_virtual_prefix() 7117 * and prepend it to \p src_file_name to form a new \p src_file_name. 7118 * If the new \p src_file_name does not exist or no prefix is being 7119 * set by H5Pset_virtual_prefix() then the path of the file containing 7120 * the virtual dataset is obtained. This path can be the absolute path 7121 * or the current working directory plus the relative path of that 7122 * file when it is created/opened. The library will prepend this path 7123 * to \p src_file_name to form a new \p src_file_name. 7124 * - If the new \p src_file_name does not exist, then the library will 7125 * look for \p src_file_name and will return failure/success accordingly. 7126 * \li If \p src_file_name is an absolute pathname, the library will first 7127 * try to find \p src_file_name. If \p src_file_name does not exist, 7128 * \p src_file_name is stripped of directory paths to form a new 7129 * \p src_file_name. The search for the new \p src_file_name then follows 7130 * the same steps as described above for a relative pathname. See 7131 * examples below illustrating how \p src_file_name is stripped to form 7132 * a new \p src_file_name. 7133 * \par 7134 * Note that \p src_file_name is considered to be an absolute pathname when 7135 * the following condition is true: 7136 * \li For Unix, the first character of \p src_file_name is a slash 7137 * (\TText{/}).\n For example, consider a \p src_file_name of 7138 * \TText{/tmp/A.h5}. If that source file does not exist, the new 7139 * \p src_file_name after stripping will be \TText{A.h5}. 7140 * \li For Windows, there are 6 cases: 7141 * 1. \p src_file_name is an absolute drive with absolute pathname.\n 7142 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7143 * If that source file does not exist, the new \p src_file_name 7144 * after stripping will be \TText{A.h5}. 7145 * 2. \p src_file_name is an absolute pathname without specifying 7146 * drive name.\n For example, consider a \p src_file_name of 7147 * \TText{/tmp/A.h5}. If that source file does not exist, the new 7148 * \p src_file_name after stripping will be \TText{A.h5}. 7149 * 3. \p src_file_name is an absolute drive with relative pathname.\n 7150 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7151 * If that source file does not exist, the new \p src_file_name 7152 * after stripping will be \TText{tmp/A.h5}. 7153 * 4. \p src_file_name is in UNC (Uniform Naming Convention) format 7154 * with server name, share name, and pathname.\n 7155 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7156 * If that source file does not exist, the new \p src_file_name 7157 * after stripping will be \TText{A.h5}. 7158 * 5. \p src_file_name is in Long UNC (Uniform Naming Convention) 7159 * format with server name, share name, and pathname.\n 7160 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7161 * If that source file does not exist, the new \p src_file_name 7162 * after stripping will be \TText{A.h5}. 7163 * 6. \p src_file_name is in Long UNC (Uniform Naming Convention) 7164 * format with an absolute drive and an absolute pathname.\n 7165 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7166 * If that source file does not exist, the new \p src_file_name 7167 * after stripping will be \TText{A.h5} 7168 * 7169 * \see <a href="https://\RFCURL/HDF5-VDS-requirements-use-cases-2014-12-10.pdf"> 7170 * Virtual Dataset Overview</a> 7171 * 7172 * \see_virtual 7173 * 7174 * \version 1.10.2 A change was made to the method of searching for VDS source files. 7175 * \since 1.10.0 7176 * 7177 */ 7178 H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, 7179 const char *src_dset_name, hid_t src_space_id); 7180 7181 /* Dataset access property list (DAPL) routines */ 7182 /** 7183 * \ingroup DAPL 7184 * 7185 * \brief Retrieves the values of the append property that is set up in 7186 * the dataset access property list 7187 * 7188 * \dapl_id 7189 * \param[in] dims The number of elements for \p boundary 7190 * \param[in] boundary The dimension sizes used to determine the boundary 7191 * \param[in] func The user-defined callback function 7192 * \param[in] udata The user-defined input data 7193 * 7194 * \return \herr_t 7195 * 7196 * \details H5Pget_append_flush() obtains the following information 7197 * from the dataset access property list, \p dapl_id. 7198 * 7199 * \p boundary consists of the sizes set up in the access 7200 * property list that are used to determine when a dataset 7201 * dimension size hits the boundary. Only at most \p dims 7202 * boundary sizes are retrieved, and \p dims will not exceed 7203 * the corresponding value that is set in the property list. 7204 * 7205 * \p func is the user-defined callback function to invoke when 7206 * a dataset's appended dimension size reaches a boundary and 7207 * \p udata is the user-defined input data for the callback 7208 * function. 7209 * 7210 * \since 1.10.0 7211 * 7212 */ 7213 H5_DLL herr_t H5Pget_append_flush(hid_t dapl_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func, 7214 void **udata); 7215 /** 7216 * \ingroup DAPL 7217 * 7218 * \brief Retrieves the raw data chunk cache parameters 7219 * 7220 * \dapl_id 7221 * \param[out] rdcc_nslots Number of chunk slots in the raw data chunk 7222 * cache hash table 7223 * \param[out] rdcc_nbytes Total size of the raw data chunk cache, in 7224 * bytes 7225 * \param[out] rdcc_w0 Preemption policy 7226 * 7227 * \return \herr_t 7228 * 7229 * \details H5Pget_chunk_cache() retrieves the number of chunk slots in 7230 * the raw data chunk cache hash table, the maximum possible 7231 * number of bytes in the raw data chunk cache, and the 7232 * preemption policy value. 7233 * 7234 * These values are retrieved from a dataset access property 7235 * list. If the values have not been set on the property list, 7236 * then values returned will be the corresponding values from 7237 * a default file access property list. 7238 * 7239 * Any (or all) pointer arguments may be null pointers, in which 7240 * case the corresponding data is not returned. 7241 * 7242 * \since 1.8.3 7243 * 7244 */ 7245 H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, 7246 double *rdcc_w0 /*out*/); 7247 /** 7248 * \ingroup DAPL 7249 * 7250 * \brief Retrieves the prefix for external raw data storage files as set 7251 * in the dataset access property list 7252 * 7253 * \dapl_id 7254 * \param[in,out] prefix Dataset external storage prefix in UTF-8 or 7255 * ASCII (\em Path and \em filename must be ASCII 7256 * on Windows systems.) 7257 * \param[in] size Size of prefix buffer in bytes 7258 * 7259 * \return Returns the size of \p prefix and the prefix string will be 7260 * stored in \p prefix if successful. 7261 * Otherwise returns a negative value and the contents of \p prefix 7262 * will be undefined. 7263 * 7264 * \details H5Pget_efile_prefix() retrieves the file system path prefix 7265 * for locating external files associated with a dataset that 7266 * uses external storage. This will be the value set with 7267 * H5Pset_efile_prefix() or the HDF5 library's default. 7268 * 7269 * The value of \p size is the size in bytes of the prefix, 7270 * including the NULL terminator. If the size is unknown, a 7271 * preliminary H5Pget_elink_prefix() call with the pointer 7272 * \p prefix set to NULL will return the size of the prefix 7273 * without the NULL terminator. 7274 * 7275 * The \p prefix buffer must be allocated by the caller. In a 7276 * call that retrieves the actual prefix, that buffer must be 7277 * of the size specified in \p size. 7278 * 7279 * \note See H5Pset_efile_prefix() for a more complete description of 7280 * file location behavior and for notes on the use of the 7281 * HDF5_EXTFILE_PREFIX environment variable. 7282 * 7283 * \since 1.8.17 7284 * 7285 */ 7286 H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); 7287 /** 7288 * \ingroup DAPL 7289 * 7290 * \brief Retrieves prefix applied to VDS source file paths 7291 * 7292 * \dapl_id 7293 * \param[out] prefix Prefix applied to VDS source file paths 7294 * \param[in] size Size of prefix, including null terminator 7295 * 7296 * \return If successful, returns a non-negative value specifying the size 7297 * in bytes of the prefix without the NULL terminator; otherwise 7298 * returns a negative value. 7299 * 7300 * \details H5Pget_virtual_prefix() retrieves the prefix applied to the 7301 * path of any VDS source files traversed. 7302 * 7303 * When an VDS source file is traversed, the prefix is retrieved 7304 * from the dataset access property list \p dapl_id, returned 7305 * in the user-allocated buffer pointed to by \p prefix, and 7306 * prepended to the filename stored in the VDS virtual file, set 7307 * with H5Pset_virtual(). 7308 * 7309 * The size in bytes of the prefix, including the NULL terminator, 7310 * is specified in \p size. If \p size is unknown, a preliminary 7311 * H5Pget_virtual_prefix() call with the pointer \p prefix set to 7312 * NULL will return the size of the prefix without the NULL 7313 * terminator. 7314 * 7315 * \see_virtual 7316 * 7317 * \since 1.10.2 7318 * 7319 */ 7320 H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); 7321 /** 7322 * \ingroup DAPL 7323 * 7324 * \brief Returns the maximum number of missing source files and/or datasets 7325 * with the printf-style names when getting the extent for an unlimited 7326 * virtual dataset 7327 * 7328 * \dapl_id 7329 * \param[out] gap_size Maximum number of the files and/or datasets 7330 * allowed to be missing for determining the extent 7331 * of an unlimited virtual dataset with printf-style 7332 * mappings. (\em Default: 0) 7333 * 7334 * \return \herr_t 7335 * 7336 * \details H5Pget_virtual_printf_gap() returns the maximum number of 7337 * missing printf-style files and/or datasets for determining the 7338 * extent of an unlimited virtual dataaset, \p gap_size, using 7339 * the access property list for the virtual dataset, \p dapl_id. 7340 * 7341 * The default library value for \p gap_size is 0 (zero). 7342 * 7343 * \since 1.10.0 7344 * 7345 */ 7346 H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t dapl_id, hsize_t *gap_size); 7347 /** 7348 * \ingroup DAPL 7349 * 7350 * \brief Retrieves the view of a virtual dataset accessed with 7351 * \p dapl_id 7352 * 7353 * \dapl_id 7354 * \param[out] view The flag specifying the view of the virtual dataset. 7355 * 7356 * \return \herr_t 7357 * 7358 * \details H5Pget_virtual_view() takes the virtual dataset access property 7359 * list, \p dapl_id, and retrieves the flag, \p view, set by the 7360 * H5Pset_virtual_view() call. 7361 * 7362 * \see_virtual 7363 * 7364 * \since 1.10.0 7365 * 7366 */ 7367 H5_DLL herr_t H5Pget_virtual_view(hid_t dapl_id, H5D_vds_view_t *view); 7368 /** 7369 * \ingroup DAPL 7370 * 7371 * \brief Sets two actions to perform when the size of a dataset's 7372 * dimension being appended reaches a specified boundary 7373 * 7374 * \dapl_id 7375 * \param[in] ndims The number of elements for boundary 7376 * \param[in] boundary The dimension sizes used to determine the boundary 7377 * \param[in] func The user-defined callback function 7378 * \param[in] udata The user-defined input data 7379 * 7380 * \return \herr_t 7381 * 7382 * \details H5Pset_append_flush() sets the following two actions to 7383 * perform for a dataset associated with the dataset access 7384 * property list \p dapl_id: 7385 * 7386 * \li Call the callback function \p func set in the property 7387 * list 7388 * \li Flush the dataset associated with the dataset access 7389 * property list 7390 * 7391 * When a user is appending data to a dataset via H5DOappend() 7392 * and the dataset's newly extended dimension size hits a 7393 * specified boundary, the library will perform the first action 7394 * listed above. Upon return from the callback function, the 7395 * library will then perform the second action listed above and 7396 * return to the user. If no boundary is hit or set, the two 7397 * actions above are not invoked. 7398 * 7399 * The specified boundary is indicated by the parameter 7400 * \p boundary. It is a 1-dimensional array with \p ndims 7401 * elements, which should be the same as the rank of the 7402 * dataset's dataspace. While appending to a dataset along a 7403 * particular dimension index via H5Dappend(), the library 7404 * determines a boundary is reached when the resulting dimension 7405 * size is divisible by \p boundary[index]. A zero value for 7406 * \p boundary[index] indicates no boundary is set for that 7407 * dimension index. 7408 * 7409 * The setting of this property will apply only for a chunked 7410 * dataset with an extendible dataspace. A dataspace is extendible 7411 * when it is defined with either one of the following: 7412 * 7413 * \li A dataspace with fixed current and maximum dimension sizes 7414 * \li A dataspace with at least one unlimited dimension for its 7415 * maximum dimension size 7416 * 7417 * When creating or opening a chunked dataset, the library will 7418 * check whether the boundary as specified in the access property 7419 * list is set up properly. The library will fail the dataset 7420 * create or open if the following conditions are true: 7421 * 7422 * \li \p ndims, the number of elements for boundary, is not the 7423 * same as the rank of the dataset's dataspace. 7424 * \li A non-zero boundary value is specified for a non-extendible 7425 * dimension. 7426 * 7427 * The callback function \p func must conform to the following 7428 * prototype: 7429 * \snippet H5Dpublic.h H5D_append_cb_t_snip 7430 * 7431 * The parameters of the callback function, per the above 7432 * prototype, are defined as follows: 7433 * 7434 * \li \p dataset_id is the dataset identifier. 7435 * \li \p cur_dims is the dataset's current dimension sizes when 7436 * a boundary is hit. 7437 * \li \p user_data is the user-defined input data. 7438 * 7439 * \since 1.10.0 7440 * 7441 */ 7442 H5_DLL herr_t H5Pset_append_flush(hid_t dapl_id, unsigned ndims, const hsize_t boundary[], 7443 H5D_append_cb_t func, void *udata); 7444 /** 7445 * \ingroup DAPL 7446 * 7447 * \brief Sets the raw data chunk cache parameters 7448 * 7449 * \dapl_id 7450 * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk 7451 * cache for this dataset. Increasing this value 7452 * reduces the number of cache collisions, but 7453 * slightly increases the memory used. Due to the 7454 * hashing strategy, this value should ideally be a 7455 * prime number. As a rule of thumb, this value 7456 * should be at least 10 times the number of chunks 7457 * that can fit in \p rdcc_nbytes bytes. For maximum 7458 * performance, this value should be set 7459 * approximately 100 times that number of chunks. 7460 * The default value is 521. If the value passed is 7461 * #H5D_CHUNK_CACHE_NSLOTS_DEFAULT, then the 7462 * property will not be set on \p dapl_id and the 7463 * parameter will come from the file access 7464 * property list used to open the file. 7465 * \param[in] rdcc_nbytes The total size of the raw data chunk cache for 7466 * this dataset. In most cases increasing this 7467 * number will improve performance, as long as 7468 * you have enough free memory. 7469 * The default size is 1 MB. If the value passed is 7470 * #H5D_CHUNK_CACHE_NBYTES_DEFAULT, then the 7471 * property will not be set on \p dapl_id and the 7472 * parameter will come from the file access 7473 * property list. 7474 * \param[in] rdcc_w0 The chunk preemption policy for this dataset. 7475 * This must be between 0 and 1 inclusive and 7476 * indicates the weighting according to which chunks 7477 * which have been fully read or written are 7478 * penalized when determining which chunks to flush 7479 * from cache. A value of 0 means fully read or 7480 * written chunks are treated no differently than 7481 * other chunks (the preemption is strictly LRU) 7482 * while a value of 1 means fully read or written 7483 * chunks are always preempted before other chunks. 7484 * If your application only reads or writes data 7485 * once, this can be safely set to 1. Otherwise, 7486 * this should be set lower, depending on how often 7487 * you re-read or re-write the same data. 7488 * The default value is 0.75. If the value passed is 7489 * #H5D_CHUNK_CACHE_W0_DEFAULT, then the property 7490 * will not be set on \p dapl_id and the parameter 7491 * will come from the file access property list. 7492 * 7493 * \return \herr_t 7494 * 7495 * \details H5Pset_chunk_cache() sets the number of elements, the total 7496 * number of bytes, and the preemption policy value in the raw 7497 * data chunk cache on a dataset access property list. After 7498 * calling this function, the values set in the property list 7499 * will override the values in the file's file access property 7500 * list. 7501 * 7502 * The raw data chunk cache inserts chunks into the cache 7503 * by first computing a hash value using the address of a chunk, 7504 * then using that hash value as the chunk's index into the table 7505 * of cached chunks. The size of this hash table, i.e., and the 7506 * number of possible hash values, is determined by the 7507 * \p rdcc_nslots parameter. If a different chunk in the cache 7508 * has the same hash value, this causes a collision, which 7509 * reduces efficiency. If inserting the chunk into cache would 7510 * cause the cache to be too big, then the cache is pruned 7511 * according to the \p rdcc_w0 parameter. 7512 * 7513 * \b Motivation: H5Pset_chunk_cache() is used to adjust the chunk 7514 * cache parameters on a per-dataset basis, as opposed to a global 7515 * setting for the file using H5Pset_cache(). The optimum chunk 7516 * cache parameters may vary widely with different data layout and 7517 * access patterns, so for optimal performance they must be set 7518 * individually for each dataset. It may also be beneficial to 7519 * reduce the size of the chunk cache for datasets whose 7520 * performance is not important in order to save memory space. 7521 * 7522 * \b Example \b Usage: The following code sets the chunk cache to 7523 * use a hash table with 12421 elements and a maximum size of 7524 * 16 MB, while using the preemption policy specified for the 7525 * entire file: 7526 * \TText{ 7527 * H5Pset_chunk_cache(dapl_id, 12421, 16*1024*1024, 7528 * H5D_CHUNK_CACHE_W0_DEFAULT);} 7529 * 7530 * \b Usage \b Notes: The chunk cache size is a property for 7531 * accessing a dataset and is not stored with a dataset or a 7532 * file. To guarantee the same chunk cache settings each time 7533 * the dataset is opened, call H5Dopen() with a dataset access 7534 * property list where the chunk cache size is set by calling 7535 * H5Pset_chunk_cache() for that property list. The property 7536 * list can be used for multiple accesses in the same 7537 * application. 7538 * 7539 * For files where the same chunk cache size will be 7540 * appropriate for all or most datasets, H5Pset_cache() can 7541 * be called with a file access property list to set the 7542 * chunk cache size for accessing all datasets in the file. 7543 * 7544 * Both methods can be used in combination, in which case 7545 * the chunk cache size set by H5Pset_cache() will apply 7546 * except for specific datasets where H5Dopen() is called 7547 * with dataset property list with the chunk cache size 7548 * set by H5Pset_chunk_cache(). 7549 * 7550 * In the absence of any cache settings, H5Dopen() will 7551 * by default create a 1 MB chunk cache for the opened 7552 * dataset. If this size happens to be appropriate, no 7553 * call will be needed to either function to set the 7554 * chunk cache size. 7555 * 7556 * It is also possible that a change in access pattern 7557 * for later access to a dataset will change the 7558 * appropriate chunk cache size. 7559 * 7560 * \since 1.8.3 7561 * 7562 */ 7563 H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); 7564 /** 7565 * \ingroup DAPL 7566 * 7567 * \brief Sets the external dataset storage file prefix in the dataset 7568 * access property list 7569 * 7570 * \dapl_id 7571 * \param[in] prefix Dataset external storage prefix in UTF-8 or ASCII 7572 * (<em>Path and filename must be ASCII on Windows systems.</em>) 7573 * 7574 * \return \herr_t 7575 * 7576 * \details H5Pset_efile_prefix() sets the prefix used to locate raw data 7577 * files for a dataset that uses external storage. This prefix 7578 * can provide either an absolute path or a relative path to the 7579 * external files. 7580 * 7581 * H5Pset_efile_prefix() is used in conjunction with 7582 * H5Pset_external() to control the behavior of the HDF5 library 7583 * when searching for the raw data files associated with a dataset 7584 * that uses external storage: 7585 * 7586 * \li The default behavior of the library is to search for the 7587 * dataset's external storage raw data files in the current 7588 * working directory of the program. 7589 * \li If the prefix is set to an absolute path, the target 7590 * directory will be searched for the dataset's external 7591 * storage raw data files. 7592 * \li If the prefix is set to a relative path, the target 7593 * directory, relative to the current working directory, will 7594 * be searched for the dataset's external storage raw data 7595 * files. 7596 * \li If the prefix is set to a relative path that begins with 7597 * the special token ${ORIGIN}, that directory, relative to 7598 * the HDF5 file containing the dataset, will be searched for 7599 * the dataset's external storage raw data files. 7600 * 7601 * The HDF5_EXTFILE_PREFIX environment variable can be used to 7602 * override the above behavior (the environment variable 7603 * supersedes the API call). Setting the variable to a path 7604 * string and calling H5Dcreate() or H5Dopen() is the equivalent 7605 * of calling H5Pset_efile_prefix() and calling the same create 7606 * or open function. The environment variable is checked at the 7607 * time of the create or open action and copied so it can be 7608 * safely changed after the H5Dcreate() or H5Dopen() call. 7609 * 7610 * Calling H5Pset_efile_prefix() with \p prefix set to NULL or 7611 * the empty string returns the search path to the default. The 7612 * result would be the same as if H5Pset_efile_prefix() had never 7613 * been called. 7614 * 7615 * \note If the external file prefix is not an absolute path and the HDF5 7616 * file is moved, the external storage files will also need to be 7617 * moved so they can be accessed at the new location. 7618 * 7619 * \note As stated above, the use of the HDF5_EXTFILE_PREFIX environment 7620 * variable overrides any property list setting. 7621 * H5Pset_efile_prefix() and H5Pget_efile_prefix(), being property 7622 * functions, set and retrieve only the property list setting; they 7623 * are unaware of the environment variable. 7624 * 7625 * \note On Windows, the prefix must be an ASCII string since the Windows 7626 * standard C library's I/O functions cannot handle UTF-8 file names. 7627 * 7628 * \since 1.8.17 7629 * 7630 */ 7631 H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix); 7632 /** 7633 * \ingroup DAPL 7634 * 7635 * \brief Sets prefix to be applied to VDS source file paths 7636 * 7637 * \dapl_id 7638 * \param[in] prefix Prefix to be applied to VDS source file paths 7639 * 7640 * \return \herr_t 7641 * 7642 * \details H5Pset_virtual_prefix() sets the prefix to be applied to the 7643 * path of any VDS source files traversed. The prefix is prepended 7644 * to the filename stored in the VDS virtual file, set with 7645 * H5Pset_virtual(). 7646 * 7647 * The prefix is specified in the user-allocated buffer \p prefix 7648 * and set in the dataset access property list \p dapl_id. The 7649 * buffer should not be freed until the property list has been 7650 * closed. 7651 * 7652 * \see_virtual 7653 * 7654 * \since 1.10.2 7655 * 7656 */ 7657 H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix); 7658 /** 7659 * \ingroup DAPL 7660 * 7661 * \brief Sets the maximum number of missing source files and/or datasets 7662 * with the printf-style names when getting the extent of an 7663 * unlimited virtual dataset 7664 * 7665 * \dapl_id 7666 * \param[in] gap_size Maximum number of files and/or datasets allowed to 7667 * be missing for determining the extent of an 7668 * unlimited virtual dataset with printf-style 7669 * mappings (<em>Default value</em>: 0) 7670 * 7671 * \return \herr_t 7672 * 7673 * \details H5Pset_virtual_printf_gap() sets the access property list for 7674 * the virtual dataset, \p dapl_id, to instruct the library to 7675 * stop looking for the mapped data stored in the files and/or 7676 * datasets with the printf-style names after not finding 7677 * \p gap_size files and/or datasets. The found source files and 7678 * datasets will determine the extent of the unlimited virtual 7679 * dataset with the printf-style mappings. 7680 * 7681 * Consider the following examples where the regularly spaced 7682 * blocks of a virtual dataset are mapped to datasets with the 7683 * names d-1, d-2, d-3, ..., d-N, ... : 7684 * 7685 * \li If the dataset d-2 is missing and \p gap_size is set to 0, 7686 * then the virtual dataset will contain only data found 7687 * in d-1. 7688 * \li If d-2 and d-3 are missing and \p gap_size is set to 2, 7689 * then the virtual dataset will contain the data from 7690 * d-1, d-3, ..., d-N, ... . The blocks that are mapped to 7691 * d-2 and d-3 will be filled according to the virtual 7692 * dataset's fill value setting. 7693 * 7694 * \see_virtual 7695 * 7696 * \since 1.10.0 7697 * 7698 */ 7699 H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t dapl_id, hsize_t gap_size); 7700 /** 7701 * \ingroup DAPL 7702 * 7703 * \brief Sets the view of the virtual dataset (VDS) to include or exclude 7704 * missing mapped elements 7705 * 7706 * \dapl_id 7707 * \param[in] view Flag specifying the extent of the data to be included 7708 * in the view. 7709 * 7710 * \return \herr_t 7711 * 7712 * \details H5Pset_virtual_view() takes the access property list for the 7713 * virtual dataset, \p dapl_id, and the flag, \p view, and sets 7714 * the VDS view according to the flag value. 7715 * 7716 * If \p view is set to #H5D_VDS_FIRST_MISSING, the view includes 7717 * all data before the first missing mapped data. This setting 7718 * provides a view containing only the continuous data starting 7719 * with the dataset's first data element. Any break in 7720 * continuity terminates the view. 7721 * 7722 * If \p view is set to #H5D_VDS_LAST_AVAILABLE, the view 7723 * includes all available mapped data. 7724 * 7725 * Missing mapped data is filled with the fill value set in the 7726 * VDS creation property list. 7727 * 7728 * \see_virtual 7729 * 7730 * \since 1.10.0 7731 * 7732 */ 7733 H5_DLL herr_t H5Pset_virtual_view(hid_t dapl_id, H5D_vds_view_t view); 7734 7735 /* Dataset xfer property list (DXPL) routines */ 7736 /** 7737 * 7738 * \ingroup DXPL 7739 * 7740 * \brief Gets B-tree split ratios for a dataset transfer property list 7741 * 7742 * \dxpl_id{plist_id} 7743 * \param[out] left The B-tree split ratio for left-most nodes 7744 * \param[out] middle The B-tree split ratio for right-most nodes and lone nodes 7745 * \param[out] right The B-tree split ratio for all other nodes 7746 * \return \herr_t 7747 * 7748 * \details H5Pget_btree_ratios() returns the B-tree split ratios for a dataset 7749 * transfer property list. 7750 * 7751 * The B-tree split ratios are returned through the non-NULL arguments 7752 * \p left, \p middle, and \p right, as set by the H5Pset_btree_ratios() 7753 * function. 7754 * 7755 * \since 1.0.0 7756 * 7757 */ 7758 H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/, 7759 double *right /*out*/); 7760 /** 7761 * 7762 * \ingroup DXPL 7763 * 7764 * \brief Reads buffer settings 7765 * 7766 * \param[in] plist_id Identifier for the dataset transfer property list 7767 * \param[out] tconv Address of the pointer to application-allocated type 7768 * conversion buffer 7769 * \param[out] bkg Address of the pointer to application-allocated 7770 * background buffer 7771 * 7772 * \return Returns buffer size, in bytes, if successful; otherwise 0 on failure. 7773 * 7774 * \details H5Pget_buffer() reads values previously set with H5Pset_buffer(). 7775 * 7776 * \version 1.6.0 The return type changed from \p hsize_t to \p size_t. 7777 * \version 1.4.0 The return type changed to \p hsize_t. 7778 * 7779 * \since 1.0.0 7780 * 7781 */ 7782 H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/); 7783 /** 7784 * 7785 * \ingroup DXPL 7786 * 7787 * \brief Retrieves a data transform expression 7788 * 7789 * \param[in] plist_id Identifier of the property list or class 7790 * \param[out] expression Pointer to memory where the transform expression will 7791 * be copied 7792 * \param[in] size Number of bytes of the transform expression to copy 7793 * to 7794 * 7795 * \return Success: the size of the transform expression. Failure: a negative 7796 * value. 7797 * 7798 * \details H5Pget_data_transform() retrieves the data transform expression 7799 * previously set in the dataset transfer property list \p plist_id 7800 * by H5Pset_data_transform(). 7801 * 7802 * H5Pget_data_transform() can be used to both retrieve the transform 7803 * expression and query its size. 7804 * 7805 * If \p expression is non-NULL, up to \p size bytes of the data 7806 * transform expression are written to the buffer. If \p expression 7807 * is NULL, \p size is ignored, and the function does not write 7808 * anything to the buffer. The function always returns the size of 7809 * the data transform expression. 7810 * 7811 * If 0 is returned for the size of the expression, no data transform 7812 * expression exists for the property list. 7813 * 7814 * If an error occurs, the buffer pointed to by \p expression is 7815 * unchanged, and the function returns a negative value. 7816 * 7817 * \since 1.8.0 7818 * 7819 */ 7820 H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size); 7821 /** 7822 * 7823 * \ingroup DXPL 7824 * 7825 * \brief Determines whether error-detection is enabled for dataset reads 7826 * 7827 * \param[in] plist_id Dataset transfer property list identifier 7828 * 7829 * \return Returns \p H5Z_ENABLE_EDC or \p H5Z_DISABLE_EDC if successful; 7830 * otherwise returns a negative value. 7831 * 7832 * \details H5Pget_edc_check() queries the dataset transfer property 7833 * list \p plist to determine whether error detection is enabled for 7834 * data read operations. 7835 * 7836 * \since 1.6.0 7837 * 7838 */ 7839 H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); 7840 /** 7841 * 7842 * \ingroup DXPL 7843 * 7844 * \brief Retrieves number of I/O vectors to be read/written in hyperslab I/O 7845 * 7846 * \param[in] fapl_id Dataset transfer property list identifier 7847 * \param[out] size Number of I/O vectors to accumulate in memory for I/O operations 7848 * 7849 * \return \herr_t 7850 * 7851 * \details H5Pget_hyper_vector_size() retrieves the number of I/O vectors to be accumulated in 7852 * memory before being issued to the lower levels of the HDF5 library for reading or 7853 * writing the actual data. 7854 * 7855 * The number of I/O vectors set in the dataset transfer property list \p fapl_id is 7856 * returned in \p size. Unless the default value is in use, \p size was 7857 * previously set with a call to H5Pset_hyper_vector_size(). 7858 * 7859 * \since 1.6.0 7860 * 7861 */ 7862 H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/); 7863 /** 7864 * 7865 * \ingroup DXPL 7866 * 7867 * \brief Checks status of the dataset transfer property list (\b DEPRECATED) 7868 * 7869 * \deprecated{H5Pget_preserve() is deprecated as it is no longer useful; 7870 * compound datatype field preservation is now core functionality 7871 * in the HDF5 library.} 7872 * 7873 * \param[in] plist_id Identifier for the dataset transfer property list 7874 * 7875 * \return Returns 1 or 0 if successful; otherwise returns a negative value. 7876 * 7877 * \details H5Pget_preserve() checks the status of the dataset transfer 7878 * property list. 7879 * 7880 * \since 1.0.0 7881 * 7882 * \version 1.6.0 The flag parameter was changed from INTEGER to LOGICAL to 7883 * better match the C API. (Fortran 90) 7884 * \version 1.8.2 Deprecated. 7885 * 7886 */ 7887 H5_DLL int H5Pget_preserve(hid_t plist_id); 7888 /** 7889 * 7890 * \ingroup DXPL 7891 * 7892 * \brief Gets user-defined datatype conversion callback function 7893 * 7894 * \param[in] dxpl_id Dataset transfer property list identifier 7895 * \param[out] op User-defined type conversion callback function 7896 * \param[out] operate_data User-defined input data for the callback function 7897 * 7898 * \return \herr_t 7899 * 7900 * \details H5Pget_type_conv_cb() gets the user-defined datatype conversion 7901 * callback function \p op in the dataset transfer property list 7902 * \p dxpl_id. 7903 * 7904 * The parameter \p operate_data is a pointer to user-defined input 7905 * data for the callback function. 7906 * 7907 * The callback function \p op defines the actions an application is 7908 * to take when there is an exception during datatype conversion. 7909 * 7910 * Please refer to the function H5Pset_type_conv_cb() for more details. 7911 * 7912 * \since 1.8.0 7913 * 7914 */ 7915 H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data); 7916 /** 7917 * 7918 * \ingroup DXPL 7919 * 7920 * \brief Gets the memory manager for variable-length datatype allocation in H5Dread() and H5Dvlen_reclaim() 7921 * 7922 * \param[in] plist_id Identifier for the dataset transfer property list 7923 * \param[out] alloc_func User's allocate routine, or NULL for system malloc 7924 * \param[out] alloc_info Extra parameter for user's allocation routine. 7925 * Contents are ignored if preceding 7926 * parameter is NULL \param[out] free_func User's free routine, or NULL for 7927 * system free \param[out] free_info 7928 * Extra parameter for user's free routine. Contents are ignored if preceding 7929 * parameter is NULL 7930 * 7931 * \return \herr_t 7932 * 7933 * \details H5Pget_vlen_mem_manager() is the companion function to 7934 * H5Pset_vlen_mem_manager(), returning the parameters set by 7935 * that function. 7936 * 7937 * \since 1.0.0 7938 * 7939 */ 7940 H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info, 7941 H5MM_free_t *free_func, void **free_info); 7942 /** 7943 * 7944 * \ingroup DXPL 7945 * 7946 * \brief Sets B-tree split ratios for a dataset transfer property list 7947 * 7948 * \param[in] plist_id The dataset transfer property list identifier 7949 * \param[in] left The B-tree split ratio for left-most nodes 7950 * \param[in] middle The B-tree split ratio for all other nodes 7951 * \param[in] right The B-tree split ratio for right-most nodes and lone 7952 * nodes 7953 * 7954 * \return \herr_t 7955 * 7956 * \details H5Pset_btree_ratios() sets the B-tree split ratios for a dataset 7957 * transfer property list. The split ratios determine what percent of 7958 * children go in the first node when a node splits. 7959 * 7960 * The ratio \p left is used when the splitting node is the left-most 7961 * node at its level in the tree; 7962 * the ratio \p right is used when the splitting node is the right-most 7963 * node at its level; and 7964 * the ratio \p middle is used for all other cases. 7965 * 7966 * A node that is the only node at its level in the tree uses the 7967 * ratio \p right when it splits. 7968 * 7969 * All ratios are real numbers between 0 and 1, inclusive. 7970 * 7971 * \since 1.0.0 7972 * 7973 */ 7974 H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); 7975 7976 /** 7977 * 7978 * \ingroup DXPL 7979 * 7980 * \brief Sets type conversion and background buffers 7981 * 7982 * \dxpl_id{plist_id} 7983 * \param[in] size Size, in bytes, of the type conversion and background buffers 7984 * \param[in] tconv Pointer to application-allocated type conversion buffer 7985 * \param[in] bkg Pointer to application-allocated background buffer 7986 * \return \herr_t 7987 * 7988 * \details Given a dataset transfer property list, H5Pset_buffer() sets the 7989 * maximum size for the type conversion buffer and background buffer 7990 * and optionally supplies pointers to application-allocated 7991 * buffers. If the buffer size is smaller than the entire amount of 7992 * data being transferred between the application and the file, and a 7993 * type conversion buffer or background buffer is required, then strip 7994 * mining will be used. 7995 * 7996 * Note that there are minimum size requirements for the buffer. Strip 7997 * mining can only break the data up along the first dimension, so the 7998 * buffer must be large enough to accommodate a complete slice that 7999 * encompasses all of the remaining dimensions. For example, when strip 8000 * mining a \TText{100x200x300} hyperslab of a simple data space, the 8001 * buffer must be large enough to hold \TText{1x200x300} data 8002 * elements. When strip mining a \TText{100x200x300x150} hyperslab of a 8003 * simple data space, the buffer must be large enough to hold 8004 * \TText{1x200x300x150} data elements. 8005 * 8006 * If \p tconv and/or \p bkg are null pointers, then buffers will be 8007 * allocated and freed during the data transfer. 8008 * 8009 * The default value for the maximum buffer is 1 MiB. 8010 * 8011 * \version 1.6.0 The \p size parameter has changed from type hsize_t to \c size_t. 8012 * \version 1.4.0 The \p size parameter has changed to type hsize_t. 8013 * 8014 * \since 1.0.0 8015 * 8016 */ 8017 H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); 8018 8019 /** 8020 * \ingroup DXPL 8021 * 8022 * \brief Sets a data transform expression 8023 * 8024 * \dxpl_id{plist_id} 8025 * \param[in] expression Pointer to the null-terminated data transform 8026 * expression 8027 * \return \herr_t 8028 * 8029 * \details H5Pset_data_transform() sets the data transform to be used for 8030 * reading and writing data. This function operates on the dataset 8031 * transfer property list \p plist_id. 8032 * 8033 * The \p expression parameter is a string containing an algebraic 8034 * expression, such as \TText{(5/9.0)*(x-32)} or \TText{x*(x-5)}. When a 8035 * dataset is read or written with this property list, the transform 8036 * expression is applied with the \c x being replaced by the values in 8037 * the dataset. When reading data, the values in the file are not 8038 * changed and the transformed data is returned to the user. 8039 * 8040 * Data transforms can only be applied to integer or 8041 * floating-point datasets. Order of operations is obeyed and 8042 * the only supported operations are +, -, *, and /. Parentheses 8043 * can be nested arbitrarily and can be used to change precedence. 8044 * When writing data back to the dataset, the transformed data is 8045 * written to the file and there is no way to recover the original 8046 * values to which the transform was applied. 8047 * 8048 * \since 1.8.0 8049 * 8050 */ 8051 H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression); 8052 8053 /** 8054 * \ingroup DXPL 8055 * 8056 * \brief Sets the dataset transfer property list to enable or disable error 8057 * detection when reading data 8058 * 8059 * \dxpl_id{plist_id} 8060 * \param[in] check Specifies whether error checking is enabled or disabled 8061 * for dataset read operations 8062 * \return \herr_t 8063 * 8064 * \details H5Pset_edc_check() sets the dataset transfer property list \p plist 8065 * to enable or disable error detection when reading data. 8066 * 8067 * Whether error detection is enabled or disabled is specified in the 8068 * \p check parameter. Valid values are #H5Z_ENABLE_EDC (default) and 8069 * #H5Z_DISABLE_EDC. 8070 * 8071 * \note The initial error detection implementation, Fletcher32 checksum, 8072 * supports error detection for chunked datasets only. 8073 * 8074 * \attention The Fletcher32 EDC checksum filter, set with H5Pset_fletcher32(), 8075 * was added in HDF5 Release 1.6.0. In the original implementation, 8076 * however, the checksum value was calculated incorrectly on 8077 * little-endian systems. The error was fixed in HDF5 Release 1.6.3.\n 8078 * As a result of this fix, an HDF5 library of Release 1.6.0 through 8079 * Release 1.6.2 cannot read a dataset created or written with 8080 * Release 1.6.3 or later if the dataset was created with the 8081 * checksum filter and the filter is enabled in the reading 8082 * library. (Libraries of Release 1.6.3 and later understand the 8083 * earlier error and compensate appropriately.)\n 8084 * \Bold{Work-around:} An HDF5 library of Release 1.6.2 or earlier 8085 * will be able to read a dataset created or written with the 8086 * checksum filter by an HDF5 library of Release 1.6.3 or later if 8087 * the checksum filter is disabled for the read operation. This can 8088 * be accomplished via an H5Pset_edc_check() call with the value 8089 * #H5Z_DISABLE_EDC in the second parameter. This has the obvious 8090 * drawback that the application will be unable to verify the 8091 * checksum, but the data does remain accessible. 8092 * 8093 * \version 1.6.3 Error in checksum calculation on little-endian systems 8094 * corrected in this release. 8095 * \since 1.6.0 8096 * 8097 */ 8098 H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); 8099 8100 /** 8101 * \ingroup DXPL 8102 * 8103 * \brief Sets user-defined filter callback function 8104 * 8105 * \dxpl_id{plist_id} 8106 * \param[in] func User-defined filter callback function 8107 * \param[in] op_data User-defined input data for the callback function 8108 * \return \herr_t 8109 * 8110 * \details H5Pset_filter_callback() sets the user-defined filter callback 8111 * function \p func in the dataset transfer property list \p plist_id. 8112 * 8113 * The parameter \p op_data is a pointer to user-defined input data for 8114 * the callback function and will be passed through to the callback 8115 * function. 8116 * 8117 * The callback function \p func defines the actions an application is 8118 * to take when a filter fails. The function prototype is as follows: 8119 * \snippet H5Zpublic.h H5Z_filter_func_t_snip 8120 * where \c filter indicates which filter has failed, \c buf and \c buf_size 8121 * are used to pass in the failed data, and op_data is the required 8122 * input data for this callback function. 8123 * 8124 * Valid callback function return values are #H5Z_CB_FAIL and #H5Z_CB_CONT. 8125 * 8126 * \since 1.6.0 8127 * 8128 */ 8129 H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data); 8130 8131 /** 8132 * \ingroup DXPL 8133 * 8134 * \brief Sets number of I/O vectors to be read/written in hyperslab I/O 8135 * 8136 * \dxpl_id{plist_id} 8137 * \param[in] size Number of I/O vectors to accumulate in memory for I/O 8138 * operations\n 8139 * Must be greater than 1 (one)\n 8140 * Default value: 1024 8141 * \return \herr_t 8142 * 8143 * \details H5Pset_hyper_vector_size() sets the number of I/O vectors to be 8144 * accumulated in memory before being issued to the lower levels of 8145 * the HDF5 library for reading or writing the actual data. 8146 * 8147 * The I/O vectors are hyperslab offset and length pairs and are 8148 * generated during hyperslab I/O. 8149 * 8150 * The number of I/O vectors is passed in \p size to be set in the 8151 * dataset transfer property list \p plist_id. \p size must be 8152 * greater than 1 (one). 8153 * 8154 * H5Pset_hyper_vector_size() is an I/O optimization function; 8155 * increasing vector_size should provide better performance, but the 8156 * library will use more memory during hyperslab I/O. The default value 8157 * of \p size is 1024. 8158 * 8159 * \since 1.6.0 8160 * 8161 */ 8162 H5_DLL herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t size); 8163 8164 /** 8165 * \ingroup DXPL 8166 * 8167 * \brief Sets the dataset transfer property list \p status 8168 * 8169 * \dxpl_id{plist_id} 8170 * \param[in] status Status toggle of the dataset transfer property list 8171 * \return \herr_t 8172 * 8173 * \deprecated This function is deprecated as it no longer has any effect; 8174 * compound datatype field preservation is now core functionality in 8175 * the HDF5 library. 8176 * 8177 * \details H5Pset_preserve() sets the dataset transfer property list status to 8178 * \c 1 or \c 0. 8179 * 8180 * When reading or writing compound datatypes and the destination is 8181 * partially initialized and the read/write is intended to initialize 8182 * the other members, one must set this property to \c 1. Otherwise the 8183 * I/O pipeline treats the destination datapoints as completely 8184 * uninitialized. 8185 * 8186 * \since 1.0.0 8187 * 8188 * \version 1.8.2 Deprecated. 8189 * 8190 */ 8191 H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); 8192 8193 /** 8194 * \ingroup DXPL 8195 * 8196 * \brief Sets user-defined datatype conversion callback function 8197 * 8198 * \dxpl_id 8199 * \param[in] op User-defined type conversion callback function 8200 * \param[in] operate_data User-defined input data for the callback function 8201 * \return \herr_t 8202 * 8203 * \details H5Pset_type_conv_cb() sets the user-defined datatype conversion 8204 * callback function \p op in the dataset transfer property list \p 8205 * dxpl_id 8206 * 8207 * The parameter operate_data is a pointer to user-defined input data 8208 * for the callback function and will be passed through to the callback 8209 * function. 8210 * 8211 * The callback function \p op defines the actions an application is to 8212 * take when there is an exception during datatype conversion. The 8213 * function prototype is as follows: 8214 * \snippet H5Tpublic.h H5T_conv_except_func_t_snip 8215 * 8216 * \callback_note 8217 * 8218 * \since 1.8.0 8219 * 8220 */ 8221 H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data); 8222 8223 /** 8224 * \ingroup DXPL 8225 * 8226 * \brief Sets the memory manager for variable-length datatype allocation in 8227 * H5Dread() and H5Dvlen_reclaim() 8228 * 8229 * \dxpl_id{plist_id} 8230 * \param[in] alloc_func User's allocate routine, or \c NULL for system \c malloc 8231 * \param[in] alloc_info Extra parameter for user's allocation routine. 8232 * Contents are ignored if preceding parameter is \c NULL. 8233 * \param[in] free_func User's free routine, or \c NULL for system \c free 8234 * \param[in] free_info Extra parameter for user's free routine. Contents are 8235 * ignored if preceding parameter is \c NULL 8236 * \return \herr_t 8237 * 8238 * \details H5Pset_vlen_mem_manager() sets the memory manager for 8239 * variable-length datatype allocation in H5Dread() and free in 8240 * H5Dvlen_reclaim(). 8241 * 8242 * The \p alloc_func and \p free_func parameters identify the memory 8243 * management routines to be used. If the user has defined custom 8244 * memory management routines, \p alloc_func and/or free_func should be 8245 * set to make those routine calls (i.e., the name of the routine is 8246 * used as the value of the parameter); if the user prefers to use the 8247 * system's \c malloc and/or \c free, the \p alloc_func and \p 8248 * free_func parameters, respectively, should be set to \c NULL 8249 * 8250 * The prototypes for these user-defined functions are as follows: 8251 * \snippet H5MMpublic.h H5MM_allocate_t_snip 8252 * 8253 * \snippet H5MMpublic.h H5MM_free_t_snip 8254 * 8255 * The \p alloc_info and \p free_info parameters can be used to pass 8256 * along any required information to the user's memory management 8257 * routines. 8258 * 8259 * In summary, if the user has defined custom memory management 8260 * routines, the name(s) of the routines are passed in the \p 8261 * alloc_func and \p free_func parameters and the custom routines' 8262 * parameters are passed in the \p alloc_info and \p free_info 8263 * parameters. If the user wishes to use the system \c malloc and \c 8264 * free functions, the \p alloc_func and/or \p free_func parameters are 8265 * set to \c NULL and the \p alloc_info and \p free_info parameters are 8266 * ignored. 8267 * 8268 * \since 1.0.0 8269 * 8270 */ 8271 H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, 8272 H5MM_free_t free_func, void *free_info); 8273 8274 #ifdef H5_HAVE_PARALLEL 8275 /** 8276 * \ingroup DXPL 8277 * 8278 * \brief Retrieves the type of chunk optimization that HDF5 actually performed 8279 * on the last parallel I/O call (not necessarily the type requested) 8280 * 8281 * \dxpl_id{plist_id} 8282 * \param[out] actual_chunk_opt_mode The type of chunk optimization performed by HDF5 8283 * \return \herr_t 8284 * 8285 * \par Motivation: 8286 * A user can request collective I/O via a data transfer property list 8287 * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). 8288 * However, HDF5 will sometimes ignore this request and perform independent 8289 * I/O instead. This property allows the user to see what kind of I/O HDF5 8290 * actually performed. Used in conjunction with H5Pget_mpio_actual_io_mode(), 8291 * this property allows the user to determine exactly what HDF5 did when 8292 * attempting collective I/O. 8293 * 8294 * \details H5Pget_mpio_actual_chunk_opt_mode() retrieves the type of chunk 8295 * optimization performed when collective I/O was requested. This 8296 * property is set before I/O takes place, and will be set even if I/O 8297 * fails. 8298 * 8299 * Valid values returned in \p actual_chunk_opt_mode: 8300 * \snippet this H5D_mpio_actual_chunk_opt_mode_t_snip 8301 * \click4more 8302 * 8303 * \since 1.8.8 8304 * 8305 */ 8306 H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, 8307 H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); 8308 /** 8309 * \ingroup DXPL 8310 * 8311 * \brief Retrieves the type of I/O that HDF5 actually performed on the last 8312 * parallel I/O call (not necessarily the type requested) 8313 * 8314 * \dxpl_id{plist_id} 8315 * \param[out] actual_io_mode The type of I/O performed by this process 8316 * \return \herr_t 8317 * 8318 * \par Motivation: 8319 * A user can request collective I/O via a data transfer property list 8320 * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). 8321 * However, HDF5 will sometimes ignore this request and perform independent 8322 * I/O instead. This property allows the user to see what kind of I/O HDF5 8323 * actually performed. Used in conjunction with H5Pget_mpio_actual_chunk_opt_mode(), 8324 * this property allows the user to determine exactly HDF5 did when 8325 * attempting collective I/O. 8326 * 8327 * \details H5Pget_mpio_actual_io_mode() retrieves the type of I/O performed on 8328 * the selection of the current process. This property is set after all 8329 * I/O is completed; if I/O fails, it will not be set. 8330 * 8331 * Valid values returned in \p actual_io_mode: 8332 * \snippet this H5D_mpio_actual_io_mode_t_snip 8333 * \click4more 8334 * 8335 * \attention All processes do not need to have the same value. For example, if 8336 * I/O is being performed using the multi chunk optimization scheme, 8337 * one process's selection may include only chunks accessed 8338 * collectively, while another may include chunks accessed 8339 * independently. In this case, the first process will report 8340 * #H5D_MPIO_CHUNK_COLLECTIVE while the second will report 8341 * #H5D_MPIO_CHUNK_INDEPENDENT. 8342 * 8343 * \see H5Pget_mpio_no_collective_cause(), H5Pget_mpio_actual_chunk_opt_mode() 8344 * 8345 * \since 1.8.8 8346 * 8347 */ 8348 H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); 8349 /** 8350 * \ingroup DXPL 8351 * 8352 * \brief Retrieves local and global causes that broke collective I/O on the last 8353 * parallel I/O call 8354 * 8355 * \dxpl_id{plist_id} 8356 * \param[out] local_no_collective_cause An enumerated set value indicating the 8357 * causes that prevented collective I/O in the local process 8358 * \param[out] global_no_collective_cause An enumerated set value indicating 8359 * the causes across all processes that prevented collective I/O 8360 * \return \herr_t 8361 * 8362 * \par Motivation: 8363 * A user can request collective I/O via a data transfer property list (DXPL) 8364 * that has been suitably modified with H5P_SET_DXPL_MPIO. However, there are 8365 * conditions that can cause HDF5 to forgo collective I/O and perform 8366 * independent I/O. Such causes can be different across the processes of a 8367 * parallel application. This function allows the user to determine what 8368 * caused the HDF5 library to skip collective I/O locally, that is in the 8369 * local process, and globally, across all processes. 8370 * 8371 * \details H5Pget_mpio_no_collective_cause() serves two purposes. It can be 8372 * used to determine whether collective I/O was used for the last 8373 * preceding parallel I/O call. If collective I/O was not used, the 8374 * function retrieves the local and global causes that broke collective 8375 * I/O on that parallel I/O call. The properties retrieved by this 8376 * function are set before I/O takes place and are retained even when 8377 * I/O fails. 8378 * 8379 * Valid values returned in \p local_no_collective_cause and \p 8380 * global_no_collective_cause are as follows or, if there are multiple 8381 * causes, a bitwise OR of the relevant causes; the numbers in the 8382 * center column are the bitmask values: 8383 * \snippet this H5D_mpio_no_collective_cause_t_snip 8384 * \click4more 8385 * 8386 * \attention Each process determines whether it can perform collective I/O and 8387 * broadcasts the result. Those results are combined to make a 8388 * collective decision; collective I/O will be performed only if all 8389 * processes can perform collective I/O.\n 8390 * If collective I/O was not used, the causes that prevented it are 8391 * reported by individual process by means of an enumerated set. The 8392 * causes may differ among processes, so H5Pget_mpio_no_collective_cause() 8393 * returns two property values. The first value is the one produced 8394 * by the local process to report local causes. This local information 8395 * is encoded in an enumeration, the \ref H5D_mpio_no_collective_cause_t 8396 * described above, with all individual causes combined into a single 8397 * enumeration value by means of a bitwise OR operation. The second 8398 * value reports global causes; this global value is the result of a 8399 * bitwise-OR operation across the values returned by all the processes. 8400 * 8401 * \since 1.8.10 8402 * 8403 */ 8404 H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, 8405 uint32_t *global_no_collective_cause); 8406 #endif /* H5_HAVE_PARALLEL */ 8407 /** 8408 * 8409 * \ingroup DXPL 8410 * 8411 * \brief Sets a hyperslab file selection for a dataset I/O operation 8412 * 8413 * \param[in] plist_id Property list identifier 8414 * \param[in] rank Number of dimensions of selection 8415 * \param[in] op Operation to perform on current selection 8416 * \param[in] start Offset of start of hyperslab 8417 * \param[in] stride Hyperslab stride 8418 * \param[in] count Number of blocks included in hyperslab 8419 * \param[in] block Size of block in hyperslab 8420 * 8421 * \return \herr_t 8422 * 8423 * \details H5Pset_dataset_io_hyperslab_selection() is designed to be used 8424 * in conjunction with using #H5S_PLIST for the file dataspace 8425 * ID when making a call to H5Dread() or H5Dwrite(). When used 8426 * with #H5S_PLIST, the selection created by one or more calls to 8427 * this routine is used for determining which dataset elements to 8428 * access. 8429 * 8430 * \p rank is the dimensionality of the selection and determines 8431 * the size of the \p start, \p stride, \p count, and \p block arrays. 8432 * \p rank must be between 1 and #H5S_MAX_RANK, inclusive. 8433 * 8434 * The \p op, \p start, \p stride, \p count, and \p block parameters 8435 * behave identically to their behavior for H5Sselect_hyperslab(), 8436 * please see the documentation for that routine for details about 8437 * their use. 8438 * 8439 * \since 1.14.0 8440 * 8441 */ 8442 H5_DLL herr_t H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper_t op, 8443 const hsize_t start[], const hsize_t stride[], 8444 const hsize_t count[], const hsize_t block[]); 8445 8446 /** 8447 * 8448 * \ingroup DXPL 8449 * 8450 * \brief Sets the selection I/O mode 8451 * 8452 * \dxpl_id{plist_id} 8453 * \param[in] selection_io_mode The selection I/O mode to be set 8454 * 8455 * \return \herr_t 8456 * 8457 * \details H5Pset_selection_io() sets the selection I/O mode 8458 * \p selection_io_mode in the dataset transfer property 8459 * list \p plist_id. 8460 * 8461 * This can be used to enable collective I/O with type conversion, or 8462 * with custom VFDs that support vector or selection I/O. 8463 * 8464 * Values that can be set in \p selection_io_mode: 8465 * \snippet this H5D_selection_io_mode_t_snip 8466 * \click4more 8467 * 8468 * \note The library may not perform selection I/O as it asks for if the 8469 * layout callback determines that it is not feasible to do so. Please 8470 * refer to H5Pget_no_selection_io_cause() for details. 8471 * 8472 * When used with type conversion, selection I/O requires the type 8473 * conversion buffer (and the background buffer if applicable) be large 8474 * enough to hold the entirety of the data involved in the I/O. For 8475 * read operations, the library will use the application's read buffer 8476 * as the type conversion buffer if the memory type is not smaller than 8477 * the file type, eliminating the need for a separate type conversion 8478 * buffer (a background buffer may still be required). For write 8479 * operations, the library will similarly use the write buffer as a 8480 * type conversion buffer, but only if H5Pset_modify_write_buf() is 8481 * used to allow the library to modify the contents of the write 8482 * buffer. 8483 * 8484 * \since 1.14.1 8485 * 8486 */ 8487 H5_DLL herr_t H5Pset_selection_io(hid_t plist_id, H5D_selection_io_mode_t selection_io_mode); 8488 8489 /** 8490 * 8491 * \ingroup DXPL 8492 * 8493 * \brief Retrieves the selection I/O mode 8494 * 8495 * \dxpl_id{plist_id} 8496 * \param[out] selection_io_mode The selection I/O mode 8497 * 8498 * \return \herr_t 8499 * 8500 * \details H5Pget_selection_io() queries the selection I/O mode set in 8501 * in the dataset transfer property list \p plist_id. 8502 * 8503 * Values returned in \p selection_io_mode: 8504 * \snippet this H5D_selection_io_mode_t_snip 8505 * \click4more 8506 * 8507 * \note The library may not perform selection I/O as it asks for if the 8508 * layout callback determines that it is not feasible to do so. Please 8509 * refer to H5Pget_no_selection_io_cause() for details. 8510 * 8511 * \since 1.14.1 8512 * 8513 */ 8514 H5_DLL herr_t H5Pget_selection_io(hid_t plist_id, H5D_selection_io_mode_t *selection_io_mode); 8515 8516 /** 8517 * \ingroup DXPL 8518 * 8519 * \brief Retrieves the cause for not performing selection or vector I/O on the 8520 * last parallel I/O call 8521 * 8522 * \dxpl_id{plist_id} 8523 * \param[out] no_selection_io_cause A bitwise set value indicating the relevant 8524 * causes that prevented selection I/O from 8525 * being performed 8526 * \return \herr_t 8527 * 8528 * \par Motivation: 8529 * A user can request selection I/O to be performed via a data transfer 8530 * property list (DXPL). This can be used to enable collective I/O with 8531 * type conversion, or with custom VFDs that support vector or selection 8532 * I/O. However, there are conditions that can cause HDF5 to forgo 8533 * selection or vector I/O and perform legacy (scalar) I/O instead. 8534 * 8535 * \details H5Pget_no_selection_io_cause() can be used to determine whether 8536 * selection or vector I/O was applied for the last preceding I/O call. 8537 * If selection or vector I/O was not used, this function retrieves the 8538 * cause(s) that prevent selection or vector I/O to be performed on 8539 * that I/O call. The properties retrieved by this function are set 8540 * before I/O takes place and are retained even when I/O fails. 8541 * 8542 * If a selection I/O request falls back to vector I/O, that is not 8543 * considered "breaking" selection I/O by this function, since vector 8544 * I/O still passes all information to the file driver in a single 8545 * callback. 8546 * 8547 * Valid values returned in \p no_selection_io_cause are listed 8548 * as follows. If there are multiple causes, it is a bitwise OR of 8549 * the relevant causes. 8550 * 8551 * - #H5D_SEL_IO_DISABLE_BY_API 8552 * Selection I/O was not performed because the feature was disabled by the API 8553 * - #H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET 8554 * Selection I/O was not performed because the dataset was neither contiguous nor chunked 8555 * - #H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER 8556 * Selection I/O was not performed because of sieve buffer for contiguous dataset 8557 * - #H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB 8558 * Selection I/O was not performed because the VFD does not have vector or selection I/O callback 8559 * - #H5D_SEL_IO_PAGE_BUFFER 8560 * Selection I/O was not performed because of page buffer 8561 * - #H5D_SEL_IO_DATASET_FILTER 8562 * Selection I/O was not performed because of dataset filters 8563 * - #H5D_SEL_IO_CHUNK_CACHE 8564 * Selection I/O was not performed because of chunk cache 8565 * - #H5D_SEL_IO_TCONV_BUF_TOO_SMALL 8566 * Selection I/O was not performed because the type conversion buffer is too small 8567 * - #H5D_SEL_IO_BKG_BUF_TOO_SMALL 8568 * Selection I/O was not performed because the type conversion background buffer is too small 8569 * - #H5D_SEL_IO_DEFAULT_OFF 8570 * Selection I/O was not performed because the selection I/O mode is DEFAULT and the library chose it 8571 * to be off for this case 8572 * 8573 * \since 1.14.1 8574 * 8575 */ 8576 H5_DLL herr_t H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause); 8577 8578 /** 8579 * \ingroup DXPL 8580 * 8581 * \brief Retrieves the type(s) of I/O that HDF5 actually performed on raw data 8582 * during the last I/O call 8583 * 8584 * \dxpl_id{plist_id} 8585 * \param[out] actual_selection_io_mode A bitwise set value indicating the 8586 * type(s) of I/O performed 8587 * \return \herr_t 8588 * 8589 * \par Motivation: 8590 * A user can request selection I/O to be performed via a data transfer 8591 * property list (DXPL). This can be used to enable collective I/O with 8592 * type conversion, or with custom VFDs that support vector or selection 8593 * I/O. However, there are conditions that can cause HDF5 to forgo 8594 * selection or vector I/O and perform legacy (scalar) I/O instead. 8595 * This function allows the user to determine which type or types of 8596 * I/O were actually performed. 8597 * 8598 * \details H5Pget_actual_selection_io_mode() allows the user to determine which 8599 * type(s) of I/O were actually performed on raw data during the last 8600 * I/O operation which used \p plist_id. This property is set after 8601 * all I/O is completed; if I/O fails, it will not be set. 8602 * 8603 * H5Pget_no_selection_io_cause() can be used to determine the reason 8604 * why selection or vector I/O was not performed. 8605 * 8606 * Valid bitflags returned in \p actual_selection_io_mode are listed 8607 * as follows. 8608 * 8609 * - #H5D_SCALAR_IO 8610 * Scalar (or legacy MPIO) I/O was performed 8611 * - #H5D_VECTOR_IO 8612 * Vector I/O was performed 8613 * - #H5D_SELECTION_IO 8614 * Selection I/O was performed 8615 * 8616 * 0 or more of these can be present in \p actual_selection_io_mode in 8617 * a bitwise fashion, since a single operation can trigger multiple 8618 * instances of I/O, possibly with different types. A value of \p 0 8619 * indicates no raw data I/O was performed during the operation. 8620 * 8621 * Be aware that this function will only include raw data I/O performed 8622 * to/from disk as part of the last I/O operation. Any metadata 8623 * I/O, including attribute and compact dataset I/O, is disregarded. 8624 * It is also possible that data was cached in the dataset chunk cache 8625 * or sieve buffer, which may prevent I/O from hitting the disk, and 8626 * thereby prevent it from being counted by this function. 8627 * 8628 * \since 1.14.3 8629 * 8630 */ 8631 H5_DLL herr_t H5Pget_actual_selection_io_mode(hid_t plist_id, uint32_t *actual_selection_io_mode); 8632 8633 /** 8634 * 8635 * \ingroup DXPL 8636 * 8637 * \brief Allows the library to modify the contents of the write buffer 8638 * 8639 * \dxpl_id{plist_id} 8640 * \param[in] modify_write_buf Whether the library can modify the contents of the write buffer 8641 * 8642 * \return \herr_t 8643 * 8644 * \details H5Pset_modify_write_buf() sets whether the library is allowed to 8645 * modify the contents of write buffers passed to HDF5 API routines 8646 * that are passed the dataset transfer property list \p plist_id. The 8647 * default value for modify_write_buf is false. 8648 * 8649 * This function can be used to allow the library to perform in-place 8650 * type conversion on write operations to save memory space. After making an 8651 * API call with this parameter set to true, the contents of the write buffer 8652 * are undefined. 8653 * 8654 * \note When modify_write_buf is set to true the library may violate the 8655 * const qualifier on the API parameter for the write buffer. 8656 * 8657 * \since 1.14.1 8658 * 8659 */ 8660 H5_DLL herr_t H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf); 8661 8662 /** 8663 * 8664 * \ingroup DXPL 8665 * 8666 * \brief Retrieves the "modify write buffer" property 8667 * 8668 * \dxpl_id{plist_id} 8669 * \param[out] modify_write_buf Whether the library can modify the contents of the write buffer 8670 * 8671 * \return \herr_t 8672 * 8673 * \details H5Pget_modify_write_buf() gets the "modify write buffer" property 8674 * from the dataset transfer property list \p plist_id. This property 8675 * determines whether the library is allowed to modify the contents of 8676 * write buffers passed to HDF5 API routines that are passed 8677 * \p plist_id. The default value for modify_write_buf is false. 8678 * 8679 * \since 1.14.1 8680 * 8681 */ 8682 H5_DLL herr_t H5Pget_modify_write_buf(hid_t plist_id, hbool_t *modify_write_buf); 8683 8684 /** 8685 * \ingroup LCPL 8686 * 8687 * \brief Determines whether property is set to enable creating missing 8688 * intermediate groups 8689 * 8690 * \lcpl_id{plist_id} 8691 * \param[out] crt_intmd Flag specifying whether to create intermediate 8692 * groups upon creation of an object 8693 * 8694 * \return \herr_t 8695 * 8696 * \details H5Pget_create_intermediate_group() determines whether the link 8697 * creation property list \p plist_id is set to allow functions 8698 * that create objects in groups different from the current 8699 * working group to create intermediate groups that may be 8700 * missing in the path of a new or moved object. 8701 * 8702 * Functions that create objects in or move objects to a group 8703 * other than the current working group make use of this 8704 * property. H5Gcreate_anon() and H5Lmove() are examples of such 8705 * functions. 8706 * 8707 * If \p crt_intmd is positive, missing intermediate groups will 8708 * be created; if \p crt_intmd is non-positive, missing intermediate 8709 * groups will not be created. 8710 * 8711 * \since 1.8.0 8712 * 8713 */ 8714 H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/); 8715 /** 8716 * \ingroup LCPL 8717 * 8718 * \brief Specifies in property list whether to create missing 8719 * intermediate groups 8720 * 8721 * \lcpl_id{plist_id} 8722 * \param[in] crt_intmd Flag specifying whether to create intermediate 8723 * groups upon the creation of an object 8724 * 8725 * \return \herr_t 8726 * 8727 * \details H5Pset_create_intermediate_group() 8728 * 8729 * \since 1.8.0 8730 * 8731 */ 8732 H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); 8733 8734 /* Group creation property list (GCPL) routines */ 8735 8736 /** 8737 * \ingroup GCPL 8738 * 8739 * \brief Returns the estimated link count and average link name length in a group 8740 * 8741 * \gcpl_id{plist_id} 8742 * \param[out] est_num_entries The estimated number of links in the group 8743 * referenced by \p plist_id 8744 * \param[out] est_name_len The estimated average length of line names in the group 8745 * referenced by \p plist_id 8746 * \return \herr_t 8747 * 8748 * \details H5Pget_est_link_info() retrieves two settings from the group creation 8749 * property list \p plist_id: the estimated number of links that are 8750 * expected to be inserted into a group created with the property list 8751 * and the estimated average length of those link names. 8752 * 8753 * The estimated number of links is returned in \p est_num_entries. The 8754 * limit for \p est_num_entries is 64 K. 8755 * 8756 * The estimated average length of the anticipated link names is returned 8757 * in \p est_name_len. The limit for \p est_name_len is 64 K. 8758 * 8759 * See \ref_group_impls for a discussion of the available types of HDF5 8760 * group structures. 8761 * 8762 * \since 1.8.0 8763 * 8764 */ 8765 H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */, 8766 unsigned *est_name_len /* out */); 8767 /** 8768 * \ingroup GCPL 8769 * 8770 * \brief Queries whether link creation order is tracked and/or indexed in 8771 * a group 8772 * 8773 * \param[in] plist_id Group or file creation property list 8774 * identifier 8775 * \param[out] crt_order_flags Creation order flag(s) 8776 * 8777 * \return \herr_t 8778 * 8779 * \details H5Pget_link_creation_order() queries the group or file creation 8780 * property list, \p plist_id, and returns a flag indicating whether 8781 * link creation order is tracked and/or indexed in a group. 8782 * 8783 * See H5Pset_link_creation_order() for a list of valid creation 8784 * order flags, as passed in \p crt_order_flags, and their 8785 * meanings. 8786 * 8787 * \since 1.8.0 8788 * 8789 */ 8790 H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */); 8791 /** 8792 * \ingroup GCPL 8793 * 8794 * \brief Queries the settings for conversion between compact and dense 8795 * groups 8796 * 8797 * \gcpl_id{plist_id} 8798 * \param[out] max_compact Maximum number of links for compact storage 8799 * \param[out] min_dense Minimum number of links for dense storage 8800 * 8801 * \return \herr_t 8802 * 8803 * \details H5Pget_link_phase_change() queries the maximum number of 8804 * entries for a compact group and the minimum number of links 8805 * to require before converting a group to a dense form. 8806 * 8807 * In the compact format, links are stored as messages in the 8808 * group's header. In the dense format, links are stored in a 8809 * fractal heap and indexed with a version 2 B-tree. 8810 * 8811 * \p max_compact is the maximum number of links to store as 8812 * header messages in the group header before converting the 8813 * group to the dense format. Groups that are in the compact 8814 * format and exceed this number of links are automatically 8815 * converted to the dense format. 8816 * 8817 * \p min_dense is the minimum number of links to store in the 8818 * dense format. Groups which are in dense format and in which 8819 * the number of links falls below this number are automatically 8820 * converted back to the compact format. 8821 * 8822 * In the compact format, links are stored as messages in the 8823 * group's header. In the dense format, links are stored in a 8824 * fractal heap and indexed with a version 2 B-tree. 8825 * 8826 * See H5Pset_link_phase_change() for a discussion of 8827 * traditional, compact, and dense group storage. 8828 * 8829 * \since 1.8.0 8830 * 8831 */ 8832 H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, 8833 unsigned *min_dense /*out*/); 8834 /** 8835 * \ingroup GCPL 8836 * 8837 * \brief Retrieves the anticipated size of the local heap for original-style 8838 * groups 8839 * 8840 * \gcpl_id{plist_id} 8841 * \param[out] size_hint Anticipated size of local heap 8842 * \return \herr_t 8843 * 8844 * \details H5Pget_local_heap_size_hint() queries the group creation property 8845 * list, \p plist_id, for the anticipated size of the local heap, \p 8846 * size_hint, for original-style groups, i.e., for groups of the style 8847 * used prior to HDF5 Release 1.8.0. See H5Pset_local_heap_size_hint() 8848 * for further discussion. 8849 * 8850 * \since 1.8.0 8851 * 8852 */ 8853 H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/); 8854 /** 8855 * \ingroup GCPL 8856 * 8857 * \brief Sets estimated number of links and length of link names in a group 8858 * 8859 * \gcpl_id{plist_id} 8860 * \param[in] est_num_entries Estimated number of links to be inserted into group 8861 * \param[in] est_name_len Estimated average length of link names 8862 * \return \herr_t 8863 * 8864 * \details H5Pset_est_link_info() inserts two settings into the group creation 8865 * property list plist_id: the estimated number of links that are 8866 * expected to be inserted into a group created with the property list 8867 * and the estimated average length of those link names. 8868 * 8869 * The estimated number of links is passed in \p est_num_entries. The 8870 * limit for \p est_num_entries is 64 K. 8871 * 8872 * The estimated average length of the anticipated link names is passed 8873 * in \p est_name_len. The limit for \p est_name_len is 64 K. 8874 * 8875 * The values for these two settings are multiplied to compute the 8876 * initial local heap size (for old-style groups, if the local heap 8877 * size hint is not set) or the initial object header size for 8878 * (new-style compact groups; see \ref_group_impls). Accurately setting 8879 * these parameters will help reduce wasted file space. 8880 * 8881 * If a group is expected to have many links and to be stored in dense 8882 * format, set \p est_num_entries to 0 (zero) for maximum 8883 * efficiency. This will prevent the group from being created in the 8884 * compact format. 8885 * 8886 * See \ref_group_impls for a discussion of the available types of HDF5 8887 * group structures. 8888 * 8889 * \since 1.8.0 8890 * 8891 */ 8892 H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); 8893 /** 8894 * \ingroup GCPL 8895 * 8896 * \brief Sets creation order tracking and indexing for links in a group 8897 * 8898 * \param[in] plist_id Group or file creation property list 8899 * identifier 8900 * \param[out] crt_order_flags Creation order flag(s) 8901 * 8902 * \return \herr_t 8903 * 8904 * \details H5Pset_link_creation_order() sets flags for tracking and 8905 * indexing links on creation order in groups created with the 8906 * group (or file) creation property list \p plist_id. 8907 * 8908 * \p crt_order_flags contains flags with the following meanings: 8909 * 8910 * <table> 8911 * <tr> 8912 * <td>#H5P_CRT_ORDER_TRACKED</td> 8913 * <td>Link creation order is tracked but not necessarily 8914 * indexed</td> 8915 * </tr> 8916 * <tr> 8917 * <td>#H5P_CRT_ORDER_INDEXED</td> 8918 * <td>Link creation order is indexed (requires 8919 * #H5P_CRT_ORDER_TRACKED)</td> 8920 * </tr> 8921 * </table> 8922 * 8923 * The default behavior is that links are tracked and indexed by 8924 * name, and link creation order is neither tracked nor indexed. 8925 * The name is always the primary index for links in a group. 8926 * 8927 * H5Pset_link_creation_order() can be used to set link creation 8928 * order tracking, or to set link creation order tracking and 8929 * indexing. 8930 * 8931 * If (#H5P_CRT_ORDER_TRACKED | #H5P_CRT_ORDER_INDEXED) is 8932 * specified for \p crt_order_flags, then links will be tracked 8933 * and indexed by creation order. The creation order is added as 8934 * a secondary index and enables faster queries and iterations 8935 * by creation order. 8936 * 8937 * If just #H5P_CRT_ORDER_TRACKED is specified for 8938 * \p crt_order_flags, then links will be tracked by creation 8939 * order, but not indexed by creation order. Queries and iterations 8940 * by creation order will work but will be much slower for large 8941 * groups than if #H5P_CRT_ORDER_INDEXED had been included. 8942 * 8943 * \note If a creation order index is to be built, it must be specified in 8944 * the group creation property list. HDF5 currently provides no 8945 * mechanism to turn on link creation order tracking at group 8946 * creation time and to build the index later. 8947 * 8948 * \since 1.8.0 8949 * 8950 */ 8951 H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); 8952 /** 8953 * \ingroup GCPL 8954 * 8955 * \brief Sets the parameters for conversion between compact and dense 8956 * groups 8957 * 8958 * \gcpl_id{plist_id} 8959 * \param[in] max_compact Maximum number of links for compact storage 8960 * (\a Default: 8) 8961 * \param[in] min_dense Minimum number of links for dense storage 8962 * (\a Default: 6) 8963 * 8964 * \return \herr_t 8965 * 8966 * \details H5Pset_link_phase_change() sets the maximum number of entries 8967 * for a compact group and the minimum number of links to allow 8968 * before converting a dense group back to the compact format. 8969 * 8970 * \p max_compact is the maximum number of links to store as 8971 * header messages in the group header before converting the 8972 * group to the dense format. Groups that are in compact format 8973 * and which exceed this number of links are automatically 8974 * converted to dense format. 8975 * 8976 * \p min_dense is the minimum number of links to store in the 8977 * dense format. Groups which are in dense format and in which 8978 * the number of links falls below this threshold are 8979 * automatically converted to compact format. 8980 * 8981 * \since 1.8.0 8982 * 8983 */ 8984 H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); 8985 /** 8986 * \ingroup GCPL 8987 * 8988 * \brief Specifies the anticipated maximum size of a local heap 8989 * 8990 * \gcpl_id{plist_id} 8991 * \param[in] size_hint Anticipated maximum size in bytes of local heap 8992 * \return \herr_t 8993 * 8994 * \details H5Pset_local_heap_size_hint() is used with original-style HDF5 8995 * groups (see “Motivation” below) to specify the anticipated maximum 8996 * local heap size, size_hint, for groups created with the group 8997 * creation property list \p plist_id. The HDF5 library then uses \p 8998 * size_hint to allocate contiguous local heap space in the file for 8999 * each group created with \p plist_id. 9000 * 9001 * For groups with many members or very few members, an appropriate 9002 * initial value of \p size_hint would be the anticipated number of 9003 * group members times the average length of group member names, plus a 9004 * small margin: 9005 * \code 9006 * size_hint = max_number_of_group_members * 9007 * (average_length_of_group_member_link_names + 2) 9008 * \endcode 9009 * If it is known that there will be groups with zero members, the use 9010 * of a group creation property list with \p size_hint set to to 1 (one) 9011 * will guarantee the smallest possible local heap for each of those groups. 9012 * 9013 * Setting \p size_hint to zero (0) causes the library to make a 9014 * reasonable estimate for the default local heap size. 9015 * 9016 * \par Motivation: 9017 * In situations where backward-compatibility is required, specifically, when 9018 * libraries prior to HDF5 Release 1.8.0 may be used to read the file, groups 9019 * must be created and maintained in the original style. This is HDF5's default 9020 * behavior. If backward compatibility with pre-1.8.0 libraries is not a concern, 9021 * greater efficiencies can be obtained with the new-format compact and indexed 9022 * groups. See <a href="https://\DOXURL/group___h5_g.html">Group 9023 * implementations in HDF5</a> in the \ref H5G API introduction (at the bottom).\n 9024 * H5Pset_local_heap_size_hint() is useful for tuning file size when files 9025 * contain original-style groups with either zero members or very large 9026 * numbers of members.\n 9027 * The original style of HDF5 groups, the only style available prior to HDF5 9028 * Release 1.8.0, was well-suited for moderate-sized groups but was not optimized 9029 * for either very small or very large groups. This original style remains the 9030 * default, but two new group implementations were introduced in HDF5 Release 1.8.0: 9031 * compact groups to accommodate zero to small numbers of members and indexed groups 9032 * for thousands or tens of thousands of members ... or millions, if that's what 9033 * your application requires.\n 9034 * The local heap size hint, \p size_hint, is a performance tuning parameter for 9035 * original-style groups. As indicated above, an HDF5 group may have zero, a handful, 9036 * or tens of thousands of members. Since the original style of HDF5 groups stores the 9037 * metadata for all of these group members in a uniform format in a local heap, the size 9038 * of that metadata (and hence, the size of the local heap) can vary wildly from group 9039 * to group. To intelligently allocate space and to avoid unnecessary fragmentation of 9040 * the local heap, it can be valuable to provide the library with a hint as to the local 9041 * heap's likely eventual size. This can be particularly valuable when it is known that 9042 * a group will eventually have a great many members. It can also be useful in conserving 9043 * space in a file when it is known that certain groups will never have any members. 9044 * 9045 * \since 1.8.0 9046 * 9047 */ 9048 H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); 9049 9050 /* Map access property list (MAPL) routines */ 9051 #ifdef H5_HAVE_MAP_API 9052 /** 9053 * \ingroup MAPL 9054 * 9055 * \brief Set map iteration hints 9056 * 9057 * \mapl_id 9058 * \param[in] key_prefetch_size Number of keys to prefetch at a time during 9059 * iteration 9060 * \param[in] key_alloc_size The initial size of the buffer allocated to hold 9061 * prefetched keys 9062 * \return \herr_t 9063 * 9064 * \details H5Pset_map_iterate_hints() adjusts the behavior of H5Miterate() when 9065 * prefetching keys for iteration. The \p key_prefetch_size parameter 9066 * specifies the number of keys to prefetch at a time during 9067 * iteration. The \p key_alloc_size parameter specifies the initial 9068 * size of the buffer allocated to hold these prefetched keys. If this 9069 * buffer is too small it will be reallocated to a larger size, though 9070 * this may result in an additional I/O. 9071 * 9072 * \since 1.12.0 9073 * 9074 */ 9075 H5_DLL herr_t H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size); 9076 /** 9077 * \ingroup MAPL 9078 * 9079 * \brief Set map iteration hints 9080 * 9081 * \mapl_id 9082 * \param[out] key_prefetch_size Pointer to number of keys to prefetch at a time 9083 * during iteration 9084 * \param[out] key_alloc_size Pointer to the initial size of the buffer allocated 9085 * to hold prefetched keys 9086 * \return \herr_t 9087 * 9088 * \details H5Pget_map_iterate() returns the map iterate hints, \p key_prefetch_size 9089 * and \p key_alloc_size, as set by H5Pset_map_iterate_hints(). 9090 * 9091 * \since 1.12.0 9092 * 9093 */ 9094 H5_DLL herr_t H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/, 9095 size_t *key_alloc_size /*out*/); 9096 #endif /* H5_HAVE_MAP_API */ 9097 9098 /** 9099 * \ingroup ACPL 9100 * 9101 * \brief Retrieves the character encoding used to create a link or 9102 * attribute name 9103 * 9104 * \param[in] plist_id Link creation or attribute creation property list 9105 * identifier 9106 * \param[out] encoding String encoding character set 9107 * 9108 * \return \herr_t 9109 * 9110 * \details H5Pget_char_encoding() retrieves the character encoding used 9111 * to encode link or attribute names that are created with the 9112 * property list \p plist_id. 9113 * 9114 * Valid values for \p encoding are defined in H5Tpublic.h and 9115 * include the following: 9116 * 9117 * \csets 9118 * 9119 * \note H5Pget_char_encoding() retrieves the character set used for an 9120 * HDF5 link or attribute name while H5Tget_cset() retrieves the 9121 * character set used in a character or string datatype. 9122 * 9123 * \since 1.8.0 9124 * 9125 */ 9126 H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/); 9127 /** 9128 * \ingroup ACPL 9129 * 9130 * \brief Sets the character encoding used to encode link and attribute 9131 * names 9132 * 9133 * \param[in] plist_id Link creation or attribute creation property list 9134 * identifier 9135 * \param[in] encoding String encoding character set 9136 * 9137 * \return \herr_t 9138 * 9139 * \details H5Pset_char_encoding() sets the character encoding used for 9140 * the names of links (which provide the names by which objects 9141 * are referenced) or attributes created with the property list 9142 * \p plist_id. 9143 * 9144 * Valid values for encoding include the following: 9145 * \csets 9146 * \details For example, if the character set for the property list 9147 * \p plist_id is set to #H5T_CSET_UTF8, link names pointing to 9148 * objects created with the link creation property list 9149 * \p plist_id will be encoded using the UTF-8 character set. 9150 * Similarly, names of attributes created with the attribute 9151 * creation property list \p plist_id will be encoded as UTF-8. 9152 * 9153 * ASCII and UTF-8 Unicode are the only currently supported 9154 * character encodings. Extended ASCII encodings (for example, 9155 * ISO 8859) are not supported. This encoding policy is not 9156 * enforced by the HDF5 library. Using encodings other than 9157 * ASCII and UTF-8 can lead to compatibility and usability 9158 * problems. 9159 * 9160 * \note H5Pset_char_encoding() sets the character set used for an 9161 * HDF5 link or attribute name while H5Tset_cset() sets the 9162 * character set used in a character or string datatype. 9163 * 9164 * \since 1.8.0 9165 * 9166 */ 9167 H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); 9168 9169 /** 9170 * \ingroup LAPL 9171 * 9172 * \brief Retrieves the external link traversal file access flag from the 9173 * specified link access property list 9174 * 9175 * \lapl_id 9176 * \param[out] flags File access flag for link traversal 9177 * 9178 * \return \herr_t 9179 * 9180 * \details H5Pget_elink_acc_flags() retrieves the file access flag used 9181 * to open an external link target file from the specified link 9182 * access property list. 9183 * 9184 * Valid values for \p flags include: 9185 * \li #H5F_ACC_RDWR - Files opened through external links will 9186 * be opened with write access 9187 * \li #H5F_ACC_RDONLY - Files opened through external links will 9188 * be opened with read-only access 9189 * \li #H5F_ACC_DEFAULT - Files opened through external links will 9190 * be opened with the same access flag as 9191 * the parent file 9192 * 9193 * The value returned, if it is not #H5F_ACC_DEFAULT, will 9194 * override the default access flag, which is the access flag 9195 * used to open the parent file. 9196 * 9197 * <b>Example Usage:</b> 9198 * The following code retrieves the external link access flag 9199 * settings on the link access property list \p lapl_id into a 9200 * local variable: 9201 * <pre> 9202 * unsigned acc_flags; 9203 * status = H5Pget_elink_acc_flags(lapl_id, &acc_flags); 9204 * </pre> 9205 * 9206 * \since 1.8.3 9207 * 9208 */ 9209 H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); 9210 /** 9211 * \ingroup LAPL 9212 * 9213 * \brief Retrieves the external link traversal callback function from the 9214 * specified link access property list 9215 * 9216 * \lapl_id 9217 * \param[out] func User-defined external link traversal callback 9218 * function 9219 * \param[out] op_data User-defined input data for the callback function 9220 * 9221 * \return \herr_t 9222 * 9223 * \details H5Pget_elink_cb() retrieves the user-defined external link 9224 * traversal callback function defined in the specified link 9225 * access property list. 9226 * 9227 * The callback function may adjust the file access property 9228 * list and file access flag to use when opening a file through 9229 * an external link. The callback will be executed by the HDF5 9230 * library immediately before opening the target file. 9231 * 9232 * <b>Failure Modes:</b> H5Pget_elink_cb() will fail if the link 9233 * access property list identifier, \p lapl_id, is invalid. 9234 * 9235 * An invalid function pointer or data pointer, \p func or 9236 * \p op_data respectively, may cause a segmentation fault or an 9237 * invalid memory access. 9238 * 9239 * <b>Example Usage:</b> The following code retrieves the external 9240 * link callback settings on the link access property list 9241 * \p lapl_id into local variables: 9242 * <pre> 9243 * H5L_elink_traverse_t elink_callback_func; 9244 * void *elink_callback_udata; 9245 * status = H5Pget_elink_cb (lapl_id, &elink_callback_func, 9246 * &elink_callback_udata); 9247 * </pre> 9248 * 9249 * \since 1.8.3 9250 * 9251 */ 9252 H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data); 9253 /** 9254 * \ingroup LAPL 9255 * 9256 * \brief Retrieves the file access property list identifier associated 9257 * with the link access property list 9258 * 9259 * \lapl_id 9260 * 9261 * \return \hid_t{file access property list} 9262 * 9263 * \details H5Pget_elink_fapl() retrieves the file access property list 9264 * identifier that is set for the link access property list 9265 * identifier, \p lapl_id. The library uses this file access 9266 * property list identifier to open the target file for the 9267 * external link access. When no such identifier is set, this 9268 * routine returns #H5P_DEFAULT. 9269 * 9270 * \see H5Pset_elink_fapl() and H5Lcreate_external(). 9271 * 9272 * \since 1.8.0 9273 * 9274 */ 9275 H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); 9276 /** 9277 * \ingroup LAPL 9278 * 9279 * \brief Retrieves prefix applied to external link paths 9280 * 9281 * \lapl_id{plist_id} 9282 * \param[out] prefix Prefix applied to external link paths 9283 * \param[in] size Size of prefix, including null terminator 9284 * 9285 * \return If successful, returns a non-negative value specifying the size 9286 * in bytes of the prefix without the NULL terminator; otherwise 9287 * returns a negative value. 9288 * 9289 * \details H5Pget_elink_prefix() retrieves the prefix applied to the 9290 * path of any external links traversed. 9291 * 9292 * When an external link is traversed, the prefix is retrieved 9293 * from the link access property list \p plist_id, returned in 9294 * the user-allocated buffer pointed to by \p prefix, and 9295 * prepended to the filename stored in the external link. 9296 * 9297 * The size in bytes of the prefix, including the NULL terminator, 9298 * is specified in \p size. If size is unknown, a preliminary 9299 * H5Pget_elink_prefix() call with the pointer \p prefix set to 9300 * NULL will return the size of the prefix without the NULL 9301 * terminator. 9302 * 9303 * \since 1.8.0 9304 * 9305 */ 9306 H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); 9307 /** 9308 * \ingroup LAPL 9309 * 9310 * \brief Retrieves the maximum number of link traversals 9311 * 9312 * \lapl_id{plist_id} 9313 * \param[out] nlinks Maximum number of links to traverse 9314 * 9315 * \return \herr_t 9316 * 9317 * \details H5Pget_nlinks() retrieves the maximum number of soft or 9318 * user-defined link traversals allowed, \p nlinks, before the 9319 * library assumes it has found a cycle and aborts the traversal. 9320 * This value is retrieved from the link access property list 9321 * \p plist_id. 9322 * 9323 * The limit on the number of soft or user-defined link traversals 9324 * is designed to terminate link traversal if one or more links 9325 * form a cycle. User control is provided because some files may 9326 * have legitimate paths formed of large numbers of soft or 9327 * user-defined links. This property can be used to allow 9328 * traversal of as many links as desired. 9329 * 9330 * \since 1.8.0 9331 * 9332 */ 9333 H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); 9334 /** 9335 * \ingroup LAPL 9336 * 9337 * \brief Sets the external link traversal file access flag in a link 9338 * access property list 9339 * 9340 * \lapl_id 9341 * \param[in] flags The access flag for external link traversal 9342 * 9343 * \return \herr_t 9344 * 9345 * \details H5Pset_elink_acc_flags() specifies the file access flag to use 9346 * to open the target file of an external link. This allows 9347 * read-only access of files reached through an external link in 9348 * a file opened with write access, or vice-versa. 9349 * 9350 * Valid values for \p flags include: 9351 * \li #H5F_ACC_RDWR - Causes files opened through external links 9352 * to be opened with write access 9353 * \li #H5F_ACC_RDONLY - Causes files opened through external 9354 * links to be opened with read-only access 9355 * \li #H5F_ACC_DEFAULT - Removes any external link file access 9356 * flag setting from \p lapl_id, causing the file access flag 9357 * setting to be taken from the parent file 9358 * 9359 * The library will normally use the file access flag used to 9360 * open the parent file as the file access flag for the target 9361 * file. This function provides a way to override that behavior. 9362 * The external link traversal callback function set by 9363 * H5Pset_elink_cb() can override the setting from 9364 * H5Pset_elink_acc_flags(). 9365 * 9366 * <b>Motivation:</b> H5Pset_elink_acc_flags() is used to adjust the 9367 * file access flag used to open files reached through external links. 9368 * This may be useful to, for example, prevent modifying files 9369 * accessed through an external link. Otherwise, the target file is 9370 * opened with whatever flag was used to open the parent. 9371 * 9372 * <b>Example Usage:</b> The following code sets the link access 9373 * property list \p lapl_id to open external link target files with 9374 * read-only access: 9375 * <pre> 9376 * status = H5Pset_elink_acc_flags(lapl_id, H5F_ACC_RDONLY); 9377 * </pre> 9378 * 9379 * \since 1.8.3 9380 * 9381 */ 9382 H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); 9383 /** 9384 * \ingroup LAPL 9385 * 9386 * \brief Sets the external link traversal callback function in a link 9387 * access property list 9388 * 9389 * \lapl_id 9390 * \param[in] func User-defined external link traversal callback 9391 * function 9392 * \param[in] op_data User-defined input data for the callback function 9393 * 9394 * \return \herr_t 9395 * 9396 * \details H5Pset_elink_cb() sets a user-defined external link traversal 9397 * callback function in the link access property list \p lapl_id. 9398 * The callback function \p func must conform to the prototype 9399 * specified in #H5L_elink_traverse_t. 9400 * 9401 * The callback function may adjust the file access property 9402 * list and file access flags to use when opening a file through 9403 * an external link. The callback will be executed by the HDF5 9404 * library immediately before opening the target file. 9405 * 9406 * The callback will be made after the file access property list 9407 * set by H5Pset_elink_fapl() and the file access flag set by 9408 * H5Pset_elink_acc_flags() are applied, so changes made by this 9409 * callback function will take precedence. 9410 * 9411 * \attention A file close degree property setting (H5Pset_fclose_degree()) 9412 * in this callback function or an associated property list will 9413 * be ignored. A file opened by means of traversing an external 9414 * link is always opened with the weak file close degree 9415 * property setting, #H5F_CLOSE_WEAK. 9416 * 9417 * <b>Motivation:</b> H5Pset_elink_cb() is used to specify a 9418 * callback function that is executed by the HDF5 library when 9419 * traversing an external link. This provides a mechanism to set 9420 * specific access permissions, modify the file access property 9421 * list, modify the parent or target file, or take any other 9422 * user-defined action. This callback function is used in 9423 * situations where the HDF5 library's default behavior is not 9424 * suitable. 9425 * 9426 * <b>Failure Modes:</b> H5Pset_elink_cb() will fail if the link 9427 * access property list identifier, \p lapl_id, is invalid or if 9428 * the function pointer, \p func, is NULL. 9429 * 9430 * An invalid function pointer, \p func, will cause a segmentation 9431 * fault or other failure when an attempt is subsequently made to 9432 * traverse an external link. 9433 * 9434 * <b>Example Usage:</b> 9435 * This example defines a callback function that prints the name 9436 * of the target file every time an external link is followed, and 9437 * sets this callback function on \p lapl_id. 9438 * <pre> 9439 * herr_t elink_callback(const char *parent_file_name, const char 9440 * *parent_group_name, const char *child_file_name, const char 9441 * *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data) { 9442 * puts(child_file_name); 9443 * return 0; 9444 * } 9445 * int main(void) { 9446 * hid_t lapl_id = H5Pcreate(H5P_LINK_ACCESS); 9447 * H5Pset_elink_cb(lapl_id, elink_callback, NULL); 9448 * ... 9449 * } 9450 * </pre> 9451 * 9452 * 9453 * \since 1.8.3 9454 * 9455 */ 9456 H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data); 9457 /** 9458 * \ingroup LAPL 9459 * 9460 * \brief Sets a file access property list for use in accessing a file 9461 * pointed to by an external link 9462 * 9463 * \lapl_id 9464 * \fapl_id 9465 * 9466 * \return \herr_t 9467 * 9468 * \details H5Pset_elink_fapl() sets the file access property list, 9469 * \p fapl_id, to be used when accessing the target file of an 9470 * external link associated with \p lapl_id. 9471 * 9472 * \since 1.8.0 9473 * 9474 */ 9475 H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); 9476 /** 9477 * \ingroup LAPL 9478 * 9479 * \brief Sets prefix to be applied to external link paths 9480 * 9481 * \lapl_id{plist_id} 9482 * \param[in] prefix Prefix to be applied to external link paths 9483 * 9484 * \return \herr_t 9485 * 9486 * \details H5Pset_elink_prefix() sets the prefix to be applied to the 9487 * path of any external links traversed. The prefix is prepended 9488 * to the filename stored in the external link. 9489 * 9490 * The prefix is specified in the user-allocated buffer \p prefix 9491 * and set in the link access property list \p plist_id. The buffer 9492 * should not be freed until the property list has been closed. 9493 * 9494 * \since 1.8.0 9495 * 9496 */ 9497 H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); 9498 /** 9499 * \ingroup LAPL 9500 * 9501 * \brief Sets maximum number of soft or user-defined link traversals 9502 * 9503 * \lapl_id{plist_id} 9504 * \param[in] nlinks Maximum number of links to traverse 9505 * 9506 * \return \herr_t 9507 * 9508 * \details H5Pset_nlinks() sets the maximum number of soft or user-defined 9509 * link traversals allowed, \p nlinks, before the library assumes 9510 * it has found a cycle and aborts the traversal. This value is 9511 * set in the link access property list \p plist_id. 9512 * 9513 * The limit on the number of soft or user-defined link traversals 9514 * is designed to terminate link traversal if one or more links 9515 * form a cycle. User control is provided because some files may 9516 * have legitimate paths formed of large numbers of soft or 9517 * user-defined links. This property can be used to allow 9518 * traversal of as many links as desired. 9519 * 9520 * \since 1.8.0 9521 * 9522 */ 9523 H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); 9524 9525 /* Object copy property list (OCPYPL) routines */ 9526 /** 9527 * \ingroup OCPYPL 9528 * 9529 * \brief Adds a path to the list of paths that will be searched in the 9530 * destination file for a matching committed datatype 9531 * 9532 * \param[in] plist_id Object copy property list identifier 9533 * \param[in] path The path to be added 9534 * 9535 * \return \herr_t 9536 * 9537 * \details H5Padd_merge_committed_dtype_path() adds a path, \p path, 9538 * which points to a committed datatype, to the current list of 9539 * suggested paths stored in the object copy property list 9540 * \p plist_id. The search as described in the next paragraph is 9541 * effective only if the #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is 9542 * enabled in the object copy property list via 9543 * H5Pset_copy_object(). 9544 * 9545 * When copying a committed datatype, a dataset with a committed 9546 * datatype, or an object with an attribute of a committed 9547 * datatype, the default behavior of H5Ocopy() is to search for 9548 * a matching committed datatype: 9549 * <ol> 9550 * <li> First search the list of suggested paths in the object 9551 * copy property list.</li> 9552 * <li> Then, if no match has been found, search all the committed 9553 * datatypes in the destination file. 9554 * </ol> 9555 * The default Step 2 in this search process can be changed by 9556 * setting a callback function (see H5Pset_mcdt_search_cb()). 9557 * 9558 * Two datatypes are determined equal if their descriptions are 9559 * identical, in a manner similar to H5Tequal(). If either 9560 * committed datatype has one or more attributes, then all 9561 * attributes must be present in both committed datatypes and they 9562 * must be identical. Two attributes are considered identical if 9563 * their datatype description, dataspace, and raw data values are 9564 * the same. However, if an attribute uses a committed datatype, 9565 * that committed datatype's attributes will not be compared. 9566 * 9567 * If a match is found, H5Ocopy() will perform the following in 9568 * the destination file: 9569 * \li For a committed datatype, the library will create a hard 9570 * link to the found datatype. 9571 * \li For a dataset that uses a committed datatype, the library 9572 * will modify the copied dataset to use the found committed 9573 * datatype as its datatype. 9574 * \li For an object with an attribute of a committed datatype, 9575 * the library will modify the copied object's attribute to 9576 * use the found committed datatype as its datatype. 9577 * 9578 * If no match is found, H5Ocopy() will perform the following in 9579 * the destination file: 9580 * \li For a committed datatype, the library will copy it as it 9581 * would any other object, creating a named committed 9582 * datatype at the destination. That is, the library will 9583 * create a committed datatype that is accessible in the 9584 * file by a unique path. 9585 * \li For a dataset that uses a committed datatype, the 9586 * library will copy the datatype as an anonymous 9587 * committed datatype and use that as the dataset's 9588 * datatype. 9589 * \li For an object with an attribute of a committed datatype, 9590 * the library will copy the datatype as an anonymous 9591 * committed datatype and use that as the attribute's 9592 * datatype. 9593 * 9594 * \b Motivation: H5Padd_merge_committed_dtype_path() provides a 9595 * means to override the default behavior of H5Ocopy() when 9596 * #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is set in an object 9597 * copy property list. 9598 * H5Padd_merge_committed_dtype_path() is the mechanism for 9599 * suggesting search paths where H5Ocopy() will look for a 9600 * matching committed datatype. This can be substantially 9601 * faster than the default approach of searching the entire 9602 * destination file for a match. 9603 * 9604 * \b Example \b Usage: This example adds two paths to the object 9605 * copy property list. H5Ocopy() will search the two suggested 9606 * paths for a match before searching all the committed datatypes 9607 * in the destination file. 9608 * 9609 * <pre> 9610 * int main(void) { 9611 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9612 * 9613 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9614 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9615 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dset"); 9616 * H5Ocopy(...ocpypl_id...); 9617 * ... 9618 * ... 9619 * } 9620 * </pre> 9621 * 9622 * \note H5Padd_merge_committed_dtype_path() will fail if the object 9623 * copy property list is invalid. 9624 * It will also fail if there is insufficient memory when 9625 * duplicating \p path. 9626 * 9627 * \see 9628 * \li H5Ocopy() 9629 * \li #H5O_mcdt_search_cb_t 9630 * \li H5Padd_merge_committed_dtype_path() 9631 * \li H5Pfree_merge_committed_dtype_paths() 9632 * \li H5Pget_mcdt_search_cb() 9633 * \li H5Pset_copy_object() 9634 * \li H5Pset_mcdt_search_cb() 9635 * \li \ref_h5ocopy 9636 * 9637 * \since 1.8.9 9638 * 9639 */ 9640 H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); 9641 /** 9642 * \ingroup OCPYPL 9643 * 9644 * \brief Clears the list of paths stored in the object copy property list 9645 * 9646 * \param[in] plist_id Object copy property list identifier 9647 * 9648 * \return \herr_t 9649 * 9650 * \details H5Pfree_merge_committed_dtype_paths() clears the suggested 9651 * paths stored in the object copy property list \p plist_id. 9652 * These are the suggested paths previously set with 9653 * H5Padd_merge_committed_dtype_path(). 9654 * 9655 * \b Example \b Usage: This example adds a suggested path to the 9656 * object copy property list, does the copy, clears the list, and 9657 * then adds a new suggested path to the list for another copy. 9658 * 9659 * <pre> 9660 * int main(void) { 9661 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9662 * 9663 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9664 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9665 * H5Ocopy(...ocpypl_id...); 9666 * ... 9667 * ... 9668 * H5Pfree_merge_committed_dtype_paths(ocpypl_id); 9669 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dtypeB"); 9670 * H5Ocopy(...ocpypl_id...); 9671 * ... 9672 * ... 9673 * } 9674 * </pre> 9675 * 9676 * \note H5Pfree_merge_committed_dtype_paths() will fail if the 9677 * object copy property list is invalid. 9678 * 9679 * \see 9680 * \li H5Ocopy() 9681 * \li #H5O_mcdt_search_cb_t 9682 * \li H5Padd_merge_committed_dtype_path() 9683 * \li H5Pfree_merge_committed_dtype_paths() 9684 * \li H5Pget_mcdt_search_cb() 9685 * \li H5Pset_copy_object() 9686 * \li H5Pset_mcdt_search_cb() 9687 * 9688 * \since 1.8.9 9689 * 9690 */ 9691 H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); 9692 /** 9693 * \ingroup OCPYPL 9694 * 9695 * \brief Retrieves the properties to be used when an object is copied 9696 * 9697 * \param[in] plist_id Object copy property list identifier 9698 * \param[out] copy_options Copy option(s) set in the object copy property 9699 * list 9700 * 9701 * \return \herr_t 9702 * 9703 * \details H5Pget_copy_object() retrieves the properties currently 9704 * specified in the object copy property list \p plist_id, which 9705 * will be invoked when a new copy is made of an existing object. 9706 * 9707 * \p copy_options is a bit map indicating the flags, or 9708 * properties, governing object copying that are set in the 9709 * property list \p plist_id. 9710 * 9711 * The available flags are described in H5Pset_copy_object(). 9712 * 9713 * \since 1.8.0 9714 * 9715 */ 9716 H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *copy_options /*out*/); 9717 /** 9718 * \ingroup OCPYPL 9719 * 9720 * \brief Retrieves the callback function from the specified object copy 9721 * property list 9722 * 9723 * \param[in] plist_id Object copy property list identifier 9724 * \param[out] func User-defined callback function 9725 * \param[out] op_data User-defined data for the callback 9726 * function 9727 * 9728 * \return \herr_t 9729 * 9730 * \details H5Pget_mcdt_search_cb() retrieves the user-defined callback 9731 * function and the user data that are set via 9732 * H5Pset_mcdt_search_cb() in the object copy property list 9733 * \p plist_id. 9734 * 9735 * The callback function will be returned in the parameter \p func 9736 * and the user data will be returned in the parameter \p op_data. 9737 * 9738 * \note H5Pget_mcdt_search_cb() will fail if the object copy property 9739 * list is invalid. 9740 * 9741 * \see 9742 * \li H5Ocopy() 9743 * \li #H5O_mcdt_search_cb_t 9744 * \li H5Padd_merge_committed_dtype_path() 9745 * \li H5Pfree_merge_committed_dtype_paths() 9746 * \li H5Pget_mcdt_search_cb() 9747 * \li H5Pset_copy_object() 9748 * \li H5Pset_mcdt_search_cb() 9749 * \li \ref_h5ocopy 9750 * 9751 * \since 1.8.9 9752 * 9753 */ 9754 H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data); 9755 /** 9756 * \ingroup OCPYPL 9757 * 9758 * \brief Sets properties to be used when an object is copied 9759 * 9760 * \param[in] plist_id Object copy property list identifier 9761 * \param[out] copy_options Copy option(s) to be set 9762 * 9763 * \return \herr_t 9764 * 9765 * \details H5Pset_copy_object() sets properties in the object copy 9766 * property list \p plist_id. When an existing object is copied, 9767 * that property list will determine how the new copy is created. 9768 * 9769 * The following flags are available for use in an object copy 9770 * property list: 9771 * 9772 * <table> 9773 * <tr> 9774 * <td>#H5O_COPY_SHALLOW_HIERARCHY_FLAG</td> 9775 * <td>Copy only immediate members of a group<br /> 9776 * <em>Default behavior, without flag:</em> Recursively 9777 * copy all objects in and below the group.</td> 9778 * </tr> 9779 * <tr> 9780 * <td>#H5O_COPY_EXPAND_SOFT_LINK_FLAG</td> 9781 * <td>Expand soft links into new objects<br /> 9782 * <em>Default behavior, without flag:</em> Copy soft 9783 * links as they are.</td> 9784 * </tr> 9785 * <tr> 9786 * <td>#H5O_COPY_EXPAND_EXT_LINK_FLAG</td> 9787 * <td>Expand external link into new objects<br /> 9788 * <em>Default behavior, without flag:</em> Copy external 9789 * links as they are.</td> 9790 * </tr> 9791 * <tr> 9792 * <td>#H5O_COPY_EXPAND_REFERENCE_FLAG</td> 9793 * <td>Copy objects that are pointed to by references and 9794 * update reference values in destination file<br /> 9795 * <em>Default behavior, without flag:</em> Set reference 9796 * values in destination file to zero (0)</td> 9797 * </tr> 9798 * <tr> 9799 * <td>#H5O_COPY_WITHOUT_ATTR_FLAG</td> 9800 * <td>Copy object without copying attributes<br /> 9801 * <em>Default behavior, without flag:</em> Copy object 9802 * with all its attributes</td> 9803 * </tr> 9804 * <tr> 9805 * <td>#H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG</td> 9806 * <td>Use a matching committed datatype in the destination 9807 * file when copying a committed datatype, a dataset with 9808 * a committed datatype, or an object with an attribute 9809 * of committed datatype <br /> 9810 * <em>Default behavior without flag:</em> 9811 * 9812 * \li A committed datatype in the source will be copied to 9813 * the destination as a committed datatype. 9814 * \li If a dataset in the source uses a committed 9815 * datatype or an object in the source has an attribute 9816 * of a committed datatype, that committed datatype will 9817 * be written to the destination as an anonymous 9818 * committed datatype. 9819 * If copied in a single H5Ocopy() operation, objects 9820 * that share a committed datatype in the source will 9821 * share an anonymous committed datatype in the 9822 * destination copy. Subsequent H5Ocopy() operations, 9823 * however, will be unaware of prior anonymous committed 9824 * datatypes and will create new ones. 9825 * 9826 * See the “See Also” section immediately below for 9827 * functions related to the use of this flag.</td> 9828 * </tr> 9829 * </table> 9830 * 9831 * \see 9832 * Functions and a callback function used to tune committed datatype 9833 * copying behavior: 9834 * \li #H5O_mcdt_search_cb_t 9835 * \li H5Padd_merge_committed_dtype_path() 9836 * \li H5Pfree_merge_committed_dtype_paths() 9837 * \li H5Pget_mcdt_search_cb() 9838 * \li H5Pset_copy_object() 9839 * \li H5Pset_mcdt_search_cb() 9840 * \li \ref_h5ocopy 9841 * 9842 * \version 1.8.9 #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG added in this release. 9843 * 9844 * \since 1.8.0 9845 * 9846 */ 9847 H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned copy_options); 9848 /** 9849 * \ingroup OCPYPL 9850 * 9851 * \brief Sets the callback function that H5Ocopy() will invoke before 9852 * searching the entire destination file for a matching committed 9853 * datatype 9854 * 9855 * \param[in] plist_id Object copy property list identifier 9856 * \param[in] func User-defined callback function 9857 * \param[in] op_data User-defined input data for the callback function 9858 * 9859 * \return \herr_t 9860 * 9861 * \details H5Pset_mcdt_search_cb() allows an application to set a 9862 * callback function, \p func, that will be invoked before 9863 * searching the destination file for a matching committed 9864 * datatype. The default, global search process is described in 9865 * H5Padd_merge_committed_dtype_path(). 9866 * 9867 * The callback function must conform to the #H5O_mcdt_search_cb_t 9868 * prototype and will return an instruction for one of the 9869 * following actions: 9870 * 9871 * \li Continue the search for a matching committed datatype in 9872 * the destination file. 9873 * \li Discontinue the search for a matching committed datatype. 9874 * H5Ocopy() will then apply the default behavior of creating 9875 * an anonymous committed datatype. 9876 * \li Abort the copy operation and exit H5Ocopy(). 9877 * 9878 * \b Motivation: H5Pset_mcdt_search_cb() provides the means to 9879 * define a callback function. An application can then use that 9880 * callback to take an additional action before the default search 9881 * of all committed datatypes in the destination file or to take an 9882 * action that replaces the default search. This mechanism is 9883 * intended to improve performance when the global search might 9884 * take a long time. 9885 * 9886 * \b Example \b Usage: This example defines a callback function in 9887 * the object copy property list. 9888 * 9889 * <pre> 9890 * static H5O_mcdt_search_ret_t 9891 * mcdt_search_cb(void *_udata) 9892 * { 9893 * H5O_mcdt_search_ret_t action = *((H5O_mcdt_search_ret_t *)_udata); 9894 * 9895 * return(action); 9896 * } 9897 * 9898 * int main(void) { 9899 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9900 * 9901 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9902 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9903 * 9904 * action = H5O_MCDT_SEARCH_STOP; 9905 * H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &action); 9906 * H5Ocopy(...ocpypl_id...); 9907 * ... 9908 * ... 9909 * } 9910 * </pre> 9911 * 9912 * \note H5Pset_mcdt_search_cb() will fail if the 9913 * object copy property list is invalid. 9914 * 9915 * \warning If the callback function return value causes H5Ocopy() to 9916 * abort, the destination file may be left in an inconsistent or 9917 * corrupted state. 9918 * 9919 * \see 9920 * \li H5Ocopy() 9921 * \li #H5O_mcdt_search_cb_t 9922 * \li H5Padd_merge_committed_dtype_path() 9923 * \li H5Pfree_merge_committed_dtype_paths() 9924 * \li H5Pget_mcdt_search_cb() 9925 * \li H5Pset_copy_object() 9926 * \li H5Pset_mcdt_search_cb() 9927 * \li \ref_h5ocopy 9928 * 9929 * \since 1.8.9 9930 * 9931 */ 9932 H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data); 9933 9934 /* Symbols defined for compatibility with previous versions of the HDF5 API. 9935 * 9936 * Use of these symbols is deprecated. 9937 */ 9938 #ifndef H5_NO_DEPRECATED_SYMBOLS 9939 9940 /* Macros */ 9941 9942 /* We renamed the "root" of the property list class hierarchy */ 9943 #define H5P_NO_CLASS H5P_ROOT 9944 9945 /* Typedefs */ 9946 /** 9947 * \ingroup PLCRA 9948 * 9949 * \brief Registers a permanent property with a property list class 9950 * 9951 * \plistcls_id{cls_id} 9952 * \param[in] name Name of property to register 9953 * \param[in] size Size of property in bytes 9954 * \param[in] def_value Default value for property in newly created 9955 * property lists 9956 * \param[in] prp_create Callback routine called when a property list is 9957 * being created and the property value will be 9958 * initialized 9959 * \param[in] prp_set Callback routine called before a new value is 9960 * copied into the property's value 9961 * \param[in] prp_get Callback routine called when a property value is 9962 * retrieved from the property 9963 * \param[in] prp_del Callback routine called when a property is deleted 9964 * from a property list 9965 * \param[in] prp_copy Callback routine called when a property is copied 9966 * from a property list 9967 * \param[in] prp_close Callback routine called when a property list is 9968 * being closed and the property value will be 9969 * disposed of 9970 * 9971 * \return \herr_t 9972 * 9973 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 9974 * H5Pregister2() or the macro H5Pregister(). 9975 * 9976 * \details H5Pregister1() registers a new property with a property list 9977 * class. The property will exist in all property list objects 9978 * of that class after this routine is finished. The name of 9979 * the property must not already exist. The default property 9980 * value must be provided and all new property lists created 9981 * with this property will have the property value set to the 9982 * default provided. Any of the callback routines may be set 9983 * to NULL if they are not needed. 9984 * 9985 * Zero-sized properties are allowed and do not store any data in 9986 * the property list. These may be used as flags to indicate the 9987 * presence or absence of a particular piece of information. The 9988 * default pointer for a zero-sized property may be set to NULL. 9989 * The property \p prp_create and \p prp_close callbacks are called for 9990 * zero-sized properties, but the \p prp_set and \p prp_get callbacks 9991 * are never called. 9992 * 9993 * The \p prp_create routine is called when a new property list with 9994 * this property is being created. The #H5P_prp_create_func_t 9995 * callback function is defined as #H5P_prp_cb1_t. 9996 * 9997 * The \p prp_create routine may modify the value to be set and those 9998 * changes will be stored as the initial value of the property. 9999 * If the \p prp_create routine returns a negative value, the new 10000 * property value is not copied into the property and the 10001 * \p prp_create routine returns an error value. 10002 * 10003 * The \p prp_set routine is called before a new value is copied into 10004 * the property. The #H5P_prp_set_func_t callback function is defined 10005 * as #H5P_prp_cb2_t. 10006 * 10007 * The \p prp_set routine may modify the value pointer to be set and 10008 * those changes will be used when setting the property's value. 10009 * If the \p prp_set routine returns a negative value, the new property 10010 * value is not copied into the property and the \p prp_set routine 10011 * returns an error value. The \p prp_set routine will not be called 10012 * for the initial value; only the \p prp_create routine will be 10013 * called. 10014 * 10015 * \b Note: The \p prp_set callback function may be useful to range 10016 * check the value being set for the property or may perform some 10017 * transformation or translation of the value set. The \p prp_get 10018 * callback would then reverse the transformation or translation. 10019 * A single \p prp_get or \p prp_set callback could handle multiple 10020 * properties by performing different actions based on the property 10021 * name or other properties in the property list. 10022 * 10023 * The \p prp_get routine is called when a value is retrieved from a 10024 * property value. The #H5P_prp_get_func_t callback function is 10025 * defined as #H5P_prp_cb2_t. 10026 * 10027 * The \p prp_get routine may modify the value to be returned from the 10028 * query and those changes will be returned to the calling routine. 10029 * If the \p prp_set routine returns a negative value, the query 10030 * routine returns an error value. 10031 * 10032 * The \p prp_del routine is called when a property is being 10033 * deleted from a property list. The #H5P_prp_delete_func_t 10034 * callback function is defined as #H5P_prp_cb2_t. 10035 * 10036 * The \p prp_del routine may modify the value passed in, but the 10037 * value is not used by the library when the \p prp_del routine 10038 * returns. If the \p prp_del routine returns a negative value, 10039 * the property list deletion routine returns an error value but 10040 * the property is still deleted. 10041 * 10042 * The \p prp_copy routine is called when a new property list with 10043 * this property is being created through a \p prp_copy operation. 10044 * The #H5P_prp_copy_func_t callback function is defined as 10045 * #H5P_prp_cb1_t. 10046 * 10047 * The \p prp_copy routine may modify the value to be set and those 10048 * changes will be stored as the new value of the property. If 10049 * the \p prp_copy routine returns a negative value, the new 10050 * property value is not copied into the property and the \p prp_copy 10051 * routine returns an error value. 10052 * 10053 * The \p prp_close routine is called when a property list with this 10054 * property is being closed. The #H5P_prp_close_func_t callback 10055 * function is defined as #H5P_prp_cb1_t. 10056 * 10057 * The \p prp_close routine may modify the value passed in, but the 10058 * value is not used by the library when the \p prp_close routine 10059 * returns. If the \p prp_close routine returns a negative value, the 10060 * property list close routine returns an error value but the property 10061 * list is still closed. 10062 * 10063 * The #H5P_prp_cb1_t is as follows: 10064 * \snippet this H5P_prp_cb1_t_snip 10065 * 10066 * The #H5P_prp_cb2_t is as follows: 10067 * \snippet this H5P_prp_cb2_t_snip 10068 * 10069 * \since 1.4.0 10070 * 10071 */ 10072 10073 /* Function prototypes */ 10074 H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, 10075 H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, 10076 H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, 10077 H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); 10078 /** 10079 * \ingroup PLCRA 10080 * 10081 * \brief Registers a temporary property with a property list 10082 * 10083 * \plist_id 10084 * \param[in] name Name of property to create 10085 * \param[in] size Size of property in bytes 10086 * \param[in] value Initial value for the property 10087 * \param[in] prp_set Callback routine called before a new value is copied 10088 * into the property's value 10089 * \param[in] prp_get Callback routine called when a property value is 10090 * retrieved from the property 10091 * \param[in] prp_delete Callback routine called when a property is deleted 10092 * from a property list 10093 * \param[in] prp_copy Callback routine called when a property is copied 10094 * from an existing property list 10095 * \param[in] prp_close Callback routine called when a property list is 10096 * being closed and the property value will be disposed 10097 * of 10098 * 10099 * \return \herr_t 10100 * 10101 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 10102 * H5Pinsert2() or the macro H5Pinsert(). 10103 * 10104 * \details H5Pinsert1() creates a new property in a property 10105 * list. The property will exist only in this property list and 10106 * copies made from it. 10107 * 10108 * The initial property value must be provided in \p value and 10109 * the property value will be set accordingly. 10110 * 10111 * The name of the property must not already exist in this list, 10112 * or this routine will fail. 10113 * 10114 * The \p prp_set and \p prp_get callback routines may be set to NULL 10115 * if they are not needed. 10116 * 10117 * Zero-sized properties are allowed and do not store any data 10118 * in the property list. The default value of a zero-size 10119 * property may be set to NULL. They may be used to indicate the 10120 * presence or absence of a particular piece of information. 10121 * 10122 * The \p prp_set routine is called before a new value is copied 10123 * into the property. The #H5P_prp_set_func_t callback function 10124 * is defined as #H5P_prp_cb2_t. 10125 * The \p prp_set routine may modify the value pointer to be set and 10126 * those changes will be used when setting the property's value. 10127 * If the \p prp_set routine returns a negative value, the new property 10128 * value is not copied into the property and the \p set routine 10129 * returns an error value. The \p prp_set routine will be called for 10130 * the initial value. 10131 * 10132 * \b Note: The \p prp_set callback function may be useful to range 10133 * check the value being set for the property or may perform some 10134 * transformation or translation of the value set. The \p prp_get 10135 * callback would then reverse the transformation or translation. 10136 * A single \p prp_get or \p prp_set callback could handle multiple 10137 * properties by performing different actions based on the 10138 * property name or other properties in the property list. 10139 * 10140 * The \p prp_get routine is called when a value is retrieved from 10141 * a property value. The #H5P_prp_get_func_t callback function 10142 * is defined as #H5P_prp_cb2_t. 10143 * 10144 * The \p prp_get routine may modify the value to be returned from 10145 * the query and those changes will be preserved. If the \p prp_get 10146 * routine returns a negative value, the query routine returns 10147 * an error value. 10148 * 10149 * The \p prp_delete routine is called when a property is being 10150 * deleted from a property list. The #H5P_prp_delete_func_t 10151 * callback function is defined as #H5P_prp_cb2_t. 10152 * 10153 * The \p prp_copy routine is called when a new property list with 10154 * this property is being created through a \p prp_copy operation. 10155 * The #H5P_prp_copy_func_t callback function is defined as 10156 * #H5P_prp_cb1_t. 10157 * 10158 * The \p prp_copy routine may modify the value to be set and those 10159 * changes will be stored as the new value of the property. If the 10160 * \p prp_copy routine returns a negative value, the new property value 10161 * is not copied into the property and the prp_copy routine returns an 10162 * error value. 10163 * 10164 * The \p prp_close routine is called when a property list with this 10165 * property is being closed. 10166 * The #H5P_prp_close_func_t callback function is defined as 10167 * #H5P_prp_cb1_t. 10168 * 10169 * The \p prp_close routine may modify the value passed in, the 10170 * value is not used by the library when the close routine 10171 * returns. If the \p prp_close routine returns a negative value, 10172 * the property list \p prp_close routine returns an error value 10173 * but the property list is still closed. 10174 * 10175 * \b Note: There is no \p prp_create callback routine for temporary 10176 * property list objects; the initial value is assumed to 10177 * have any necessary setup already performed on it. 10178 * 10179 * The #H5P_prp_cb1_t is as follows: 10180 * \snippet this H5P_prp_cb1_t_snip 10181 * 10182 * The #H5P_prp_cb2_t is as follows: 10183 * \snippet this H5P_prp_cb2_t_snip 10184 * 10185 * \since 1.4.0 10186 * 10187 */ 10188 H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, 10189 H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, 10190 H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, 10191 H5P_prp_close_func_t prp_close); 10192 /** 10193 * \ingroup PLCRA 10194 * 10195 * \brief Encodes the property values in a property list into a binary 10196 * buffer 10197 * 10198 * \plist_id 10199 * \param[out] buf Buffer into which the property list will be encoded. 10200 * If the provided buffer is NULL, the size of the 10201 * buffer required is returned through \p nalloc; the 10202 * function does nothing more. 10203 * \param[out] nalloc The size of the required buffer 10204 * 10205 * \return \herr_t 10206 * 10207 * \deprecated As of HDF5-1.12 this function has been deprecated in favor of 10208 * H5Pencode2() or the macro H5Pencode(). 10209 * 10210 * \details H5Pencode1() encodes the property list \p plist_id into the 10211 * binary buffer \p buf. 10212 * 10213 * If the required buffer size is unknown, \p buf can be passed 10214 * in as NULL and the function will set the required buffer size 10215 * in \p nalloc. The buffer can then be created and the property 10216 * list encoded with a subsequent H5Pencode1() call. 10217 * 10218 * If the buffer passed in is not big enough to hold the encoded 10219 * properties, the H5Pencode1() call can be expected to fail with 10220 * a segmentation fault. 10221 * 10222 * Properties that do not have encode callbacks will be skipped. 10223 * There is currently no mechanism to register an encode callback for 10224 * a user-defined property, so user-defined properties cannot currently 10225 * be encoded. 10226 * 10227 * Some properties cannot be encoded, particularly properties that are 10228 * reliant on local context. 10229 * 10230 * \since 1.10.0 10231 * 10232 */ 10233 H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc); 10234 /** 10235 * \ingroup DCPL 10236 * 10237 * \brief Returns information about a filter in a pipeline (DEPRECATED) 10238 * 10239 * 10240 * 10241 * \plist_id{plist_id} 10242 * \param[in] filter Sequence number within the filter pipeline of 10243 * the filter for which information is sought 10244 * \param[out] flags Bit vector specifying certain general properties 10245 * of the filter 10246 * \param[in,out] cd_nelmts Number of elements in \p cd_values 10247 * \param[out] cd_values Auxiliary data for the filter 10248 * \param[in] namelen Anticipated number of characters in \p name 10249 * \param[out] name Name of the filter 10250 * 10251 * \return Returns the filter identifier if successful; Otherwise returns 10252 * a negative value. See: #H5Z_filter_t 10253 * 10254 * \deprecated When was this function deprecated? 10255 * 10256 * \details H5Pget_filter1() returns information about a filter, specified 10257 * by its filter number, in a filter pipeline, specified by the 10258 * property list with which it is associated. 10259 * 10260 * \p plist_id must be a dataset or group creation property list. 10261 * 10262 * \p filter is a value between zero and N-1, as described in 10263 * H5Pget_nfilters(). The function will return a negative value 10264 * if the filter number is out of range. 10265 * 10266 * The structure of the \p flags argument is discussed in 10267 * H5Pset_filter(). 10268 * 10269 * On input, \p cd_nelmts indicates the number of entries in the 10270 * \p cd_values array, as allocated by the caller; on return, 10271 * \p cd_nelmts contains the number of values defined by the filter. 10272 * 10273 * If \p name is a pointer to an array of at least \p namelen 10274 * bytes, the filter name will be copied into that array. The name 10275 * will be null terminated if \p namelen is large enough. The 10276 * filter name returned will be the name appearing in the file, the 10277 * name registered for the filter, or an empty string. 10278 * 10279 * \version 1.8.5 Function extended to work with group creation property 10280 * lists. 10281 * \version 1.8.0 N-bit and scale-offset filters added. 10282 * \version 1.8.0 Function H5Pget_filter() renamed to H5Pget_filter1() and 10283 * deprecated in this release. 10284 * \version 1.6.4 \p filter parameter type changed to unsigned. 10285 * 10286 * \since 1.0.0 10287 * 10288 */ 10289 H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/, 10290 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 10291 char name[]); 10292 /** 10293 * \ingroup DCPL 10294 * 10295 * \brief Returns information about the specified filter 10296 * 10297 * \plist_id{plist_id} 10298 * \param[in] id Filter identifier 10299 * \param[out] flags Bit vector specifying certain general properties 10300 * of the filter 10301 * \param[in,out] cd_nelmts Number of elements in \p cd_values 10302 * \param[out] cd_values Auxiliary data for the filter 10303 * \param[in] namelen Anticipated number of characters in \p name 10304 * \param[out] name Name of the filter 10305 * 10306 * 10307 * \return Returns a non-negative value if successful; Otherwise returns 10308 * a negative value. 10309 * 10310 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 10311 * H5Pget_filter_by_id2() or the macro H5Pget_filter_by_id(). 10312 * 10313 * \details H5Pget_filter_by_id1() returns information about a filter, specified 10314 * in \p id, a filter identifier. 10315 * 10316 * \p plist_id must be a dataset or group creation property list and 10317 * \p id must be in the associated filter pipeline. 10318 * 10319 * The \p id and \p flags parameters are used in the same 10320 * manner as described in the discussion of H5Pset_filter(). 10321 * 10322 * Aside from the fact that they are used for output, the parameters 10323 * \p cd_nelmts and \p cd_values[] are used in the same manner as 10324 * described in the discussion of H5Pset_filter(). 10325 * On input, the \p cd_nelmts parameter indicates the number of entries 10326 * in the \p cd_values[] array allocated by the calling program; 10327 * on exit it contains the number of values defined by the filter. 10328 * 10329 * On input, the \p namelen parameter indicates the number of 10330 * characters allocated for the filter name by the calling program 10331 * in the array \p name[]. On exit \p name[] contains the name of the 10332 * filter with one character of the name in each element of the array. 10333 * 10334 * If the filter specified in \p id is not set for the property 10335 * list, an error will be returned and this function will fail. 10336 * 10337 * 10338 * \version 1.8.5 Function extended to work with group creation property 10339 * lists. 10340 * \version 1.8.0 Function H5Pget_filter_by_id() renamed to 10341 * H5Pget_filter_by_id1() and deprecated in this release. 10342 * 10343 * \since 1.6.0 10344 * 10345 */ 10346 H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, 10347 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 10348 char name[] /*out*/); 10349 /** 10350 * \ingroup FCPL 10351 * 10352 * \brief Retrieves the version information of various objects 10353 * for a file creation property list(deprecated) 10354 * 10355 * \plist_id 10356 * \param[out] boot Pointer to location to return super block version number 10357 * \param[out] freelist Pointer to location to return global freelist version number 10358 * \param[out] stab Pointer to location to return symbol table version number 10359 * \param[out] shhdr Pointer to location to return shared object header version 10360 * number 10361 * 10362 * \return \herr_t 10363 * 10364 * \deprecated Deprecated in favor of the function H5Fget_info() 10365 * 10366 * \details H5Pget_version() retrieves the version information of various objects 10367 * for a file creation property list. Any pointer parameters which are 10368 * passed as NULL are not queried. 10369 * 10370 * \version 1.6.4 \p boot, \p freelist, \p stab, \p shhdr parameter types 10371 * changed to unsigned. 10372 * 10373 * \since 1.0.0 10374 * 10375 */ 10376 H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/, 10377 unsigned *stab /*out*/, unsigned *shhdr /*out*/); 10378 /** 10379 * \ingroup FCPL 10380 * 10381 * \brief Sets the file space handling strategy and the free-space section 10382 * size threshold. 10383 * 10384 * \fcpl_id{plist_id} 10385 * \param[in] strategy The file space handling strategy to be used. See: 10386 * #H5F_fspace_strategy_t 10387 * \param[in] threshold The smallest free-space section size that the free 10388 * space manager will track 10389 * 10390 * \return \herr_t 10391 * 10392 * \deprecated When was this function deprecated? 10393 * 10394 * \details Maps to the function H5Pset_file_space_strategy(). 10395 * 10396 * \since 1.10.0 10397 * 10398 */ 10399 H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); 10400 /** 10401 * \ingroup FCPL 10402 * 10403 * \brief Retrieves the file space handling strategy, and threshold value for 10404 * a file creation property list 10405 * 10406 * \fcpl_id{plist_id} 10407 * \param[out] strategy Pointer to the file space handling strategy 10408 * \param[out] threshold Pointer to the free-space section size threshold value 10409 * 10410 * \return \herr_t 10411 * 10412 * \deprecated When was this function deprecated? 10413 * 10414 * \details Maps to the function H5Pget_file_space_strategy() 10415 * 10416 * \since 1.10.0 10417 * 10418 */ 10419 H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); 10420 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 10421 10422 #ifdef __cplusplus 10423 } 10424 #endif 10425 #endif /* H5Ppublic_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |