![]() |
|
|||
File indexing completed on 2025-04-18 09:16:05
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 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, \ 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 VFL). 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 * <a href="https://\DOCURL/advanced_topics/file_image_ops.md"> 3712 * HDF5 File Image Operations</a>. 3713 * 3714 * 3715 * \since 1.8.9 3716 * 3717 */ 3718 H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr); 3719 /** 3720 * \ingroup FAPL 3721 * 3722 * \brief Retrieves callback routines for working with file images 3723 * 3724 * \fapl_id 3725 * \param[in,out] callbacks_ptr Pointer to the instance of the 3726 * #H5FD_file_image_callbacks_t struct in which the callback 3727 * routines are to be returned\n 3728 * Struct fields must be initialized to NULL before the call 3729 * is made.\n 3730 * Struct field contents upon return will match those passed in 3731 * in the last H5Pset_file_image_callbacks() call for the file 3732 * access property list \p fapl_id. 3733 * \return \herr_t 3734 * 3735 * \details H5Pget_file_image_callbacks() retrieves the callback routines set for 3736 * working with file images opened with the file access property list 3737 * \p fapl_id. 3738 * 3739 * The callbacks must have been previously set with 3740 * H5Pset_file_image_callbacks() in the file access property list. 3741 * 3742 * Upon the successful return of H5Pset_file_image_callbacks(), the 3743 * fields in the instance of the #H5FD_file_image_callbacks_t struct 3744 * pointed to by \p callbacks_ptr will contain the same values as were 3745 * passed in the most recent H5Pset_file_image_callbacks() call for the 3746 * file access property list \p fapl_id. 3747 * 3748 * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(), 3749 * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(), 3750 * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t, 3751 * <a href="https://\DOCURL/advanced_topics/file_image_ops.md"> 3752 * HDF5 File Image Operations</a>. 3753 * 3754 * \since 1.8.9 3755 * 3756 */ 3757 H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); 3758 /** 3759 * \ingroup FAPL 3760 * 3761 * \brief Retrieves the file locking property values 3762 * 3763 * \fapl_id 3764 * \param[out] use_file_locking File locking flag 3765 * \param[out] ignore_when_disabled Ignore when disabled flag 3766 * \return \herr_t 3767 * 3768 * \details H5Pget_file_locking() retrieves the file locking property values for 3769 * the file access property list specified by \p fapl_id. 3770 * 3771 * \since 1.10.7 3772 * 3773 */ 3774 H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); 3775 /** 3776 * \ingroup FAPL 3777 * 3778 * \brief Returns garbage collecting references setting 3779 * 3780 * \fapl_id 3781 * \param[out] gc_ref Flag returning the state of reference garbage 3782 * collection. A returned value of 1 indicates that 3783 * garbage collection is on while 0 indicates that 3784 * garbage collection is off. 3785 * 3786 * \return \herr_t 3787 * 3788 * \details H5Pget_gc_references() returns the current setting for the 3789 * garbage collection references property from the specified 3790 * file access property list. The garbage collection references 3791 * property is set by H5Pset_gc_references(). 3792 * 3793 * \since 1.2.0 3794 * 3795 */ 3796 H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/); 3797 /** 3798 * \ingroup FAPL 3799 * 3800 * \brief Retrieves library version bounds settings that indirectly control 3801 * the format versions used when creating objects 3802 * 3803 * \fapl_id{plist_id} 3804 * \param[out] low The earliest version of the library that will be used 3805 * for writing objects 3806 * \param[out] high The latest version of the library that will be used for 3807 * writing objects 3808 * 3809 * \return \herr_t 3810 * 3811 * \details H5Pget_libver_bounds() retrieves the lower and upper bounds on 3812 * the HDF5 library release versions that indirectly determine the 3813 * object format versions used when creating objects in the file. 3814 * 3815 * This property is retrieved from the file access property list 3816 * specified by the parameter \p fapl_id. 3817 * 3818 * The value returned in the parameters \p low and \p high is one 3819 * of the enumerated values in the #H5F_libver_t struct, which is 3820 * defined in H5Fpublic.h. 3821 * 3822 * \version 1.10.2 Add #H5F_LIBVER_V18 to the enumerated defines in 3823 * #H5F_libver_t 3824 * \since 1.8.0 3825 * 3826 */ 3827 H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); 3828 /** 3829 * \ingroup FAPL 3830 * 3831 * \brief Get the current initial metadata cache configuration from the 3832 * provided file access property list 3833 * 3834 * \fapl_id{plist_id} 3835 * \param[in,out] config_ptr Pointer to the instance of #H5AC_cache_config_t 3836 * in which the current metadata cache configuration is to be 3837 * reported 3838 * \return \herr_t 3839 * 3840 * \note The \c in direction applies only to the \ref H5AC_cache_config_t.version 3841 * field. All other fields are \c out parameters. 3842 * 3843 * \details The fields of the #H5AC_cache_config_t structure are shown 3844 * below: 3845 * \snippet H5ACpublic.h H5AC_cache_config_t_snip 3846 * \click4more 3847 * 3848 * H5Pget_mdc_config() gets the initial metadata cache configuration 3849 * contained in a file access property list and loads it into the 3850 * instance of #H5AC_cache_config_t pointed to by the \p config_ptr 3851 * parameter. This configuration is used when the file is opened. 3852 * 3853 * Note that the version field of \TText{*config_ptr} must be 3854 * initialized; this allows the library to support earlier versions of 3855 * the #H5AC_cache_config_t structure. 3856 * 3857 * See the overview of the metadata cache in the special topics section 3858 * of the user guide for details on the configuration data returned. If 3859 * you haven't read and understood that documentation, the results of 3860 * this call will not make much sense. 3861 * 3862 * \since 1.8.0 3863 * 3864 */ 3865 H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); /* out */ 3866 /** 3867 * \ingroup FAPL 3868 * 3869 * \brief Retrieves the metadata cache image configuration values for a file 3870 * access property list 3871 * 3872 * \fapl_id{plist_id} 3873 * \param[out] config_ptr Pointer to metadata cache image configuration values 3874 * \return \herr_t 3875 * 3876 * \details H5Pget_mdc_image_config() retrieves the metadata cache image values 3877 * into \p config_ptr for the file access property list specified in \p 3878 * plist_id. 3879 * 3880 * #H5AC_cache_image_config_t is defined as follows: 3881 * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip 3882 * \click4more 3883 * 3884 * \since 1.10.1 3885 */ 3886 H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); 3887 /** 3888 * \ingroup FAPL 3889 * 3890 * \brief Gets metadata cache logging options 3891 * 3892 * \fapl_id{plist_id} 3893 * \param[out] is_enabled Flag whether logging is enabled 3894 * \param[out] location Location of log in UTF-8/ASCII (file path/name) (On 3895 * Windows, this must be ASCII) 3896 * \param[out] location_size Size in bytes of the location string 3897 * \param[out] start_on_access Whether the logging begins as soon as the file is 3898 * opened or created 3899 * \return \herr_t 3900 * 3901 * \details The metadata cache is a central part of the HDF5 library through 3902 * which all file metadata reads and writes take place. File metadata 3903 * is normally invisible to the user and is used by the library for 3904 * purposes such as locating and indexing data. File metadata should 3905 * not be confused with user metadata, which consists of attributes 3906 * created by users and attached to HDF5 objects such as datasets via 3907 * \ref H5A API calls. 3908 * 3909 * Due to the complexity of the cache, a trace/logging feature has been 3910 * created that can be used by HDF5 developers for debugging and 3911 * performance analysis. The functions that control this functionality 3912 * will normally be of use to a very limited number of developers 3913 * outside of The HDF Group. The functions have been documented to help 3914 * users create logs that can be sent with bug reports. 3915 * 3916 * Control of the log functionality is straightforward. Logging is 3917 * enabled via the H5Pset_mdc_log_options() function, which will modify 3918 * the file access property list used to open or create a file. This 3919 * function has a flag that determines whether logging begins at file 3920 * open or starts in a paused state. Log messages can then be 3921 * controlled via the H5Fstart_mdc_logging() / H5Fstop_mdc_logging() 3922 * functions. H5Pget_mdc_log_options() can be used to examine a file 3923 * access property list, and H5Fget_mdc_logging_status() will return 3924 * the current state of the logging flags. 3925 * 3926 * The log format is described in the 3927 * <a href="https://bit.ly/2PG6fNv">Metadata Cache Logging</a> document. 3928 * 3929 * \since 1.10.0 3930 */ 3931 H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, 3932 size_t *location_size, hbool_t *start_on_access); 3933 /** 3934 * \ingroup FAPL 3935 * 3936 * \brief Returns the current metadata block size setting 3937 * 3938 * \fapl_id{fapl_id} 3939 * \param[out] size Minimum size, in bytes, of metadata block allocations 3940 * 3941 * \return \herr_t 3942 * 3943 * \details Returns the current minimum size, in bytes, of new 3944 * metadata block allocations. This setting is retrieved from the 3945 * file access property list \p fapl_id. 3946 * 3947 * This value is set by H5Pset_meta_block_size() and is 3948 * retrieved from the file access property list \p fapl_id. 3949 * 3950 * \since 1.4.0 3951 */ 3952 H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size); 3953 /** 3954 * \ingroup FAPL 3955 * 3956 * \brief Retrieves the number of read attempts from a file access 3957 * property list 3958 * 3959 * \fapl_id{plist_id} 3960 * \param[out] attempts The number of read attempts 3961 * 3962 * \return \herr_t 3963 * 3964 * \details H5Pget_metadata_read_attempts() retrieves the number of read 3965 * attempts that is set in the file access property list \p plist_id. 3966 * 3967 * For a default file access property list, the value retrieved 3968 * will depend on whether the user sets the number of attempts via 3969 * H5Pset_metadata_read_attempts(): 3970 * 3971 * <ul> 3972 * 3973 * <li>If the number of attempts is set to N, the value 3974 * returned will be N. 3975 * <li>If the number of attempts is not set, the value returned 3976 * will be the default for non-SWMR access (1). SWMR is short 3977 * for single-writer/multiple-reader. 3978 * </ul> 3979 * 3980 * For the file access property list of a specified HDF5 file, 3981 * the value retrieved will depend on how the file is opened 3982 * and whether the user sets the number of read attempts via 3983 * H5Pset_metadata_read_attempts(): 3984 * 3985 * <ul> 3986 * <li>For a file opened with SWMR access: 3987 * 3988 * <ul> 3989 * <li> If the number of attempts is set to N, the value 3990 * returned will be N. 3991 * <li> If the number of attempts is not set, the value 3992 * returned will be the default for SWMR access (100). 3993 * </ul> 3994 * <li>For a file opened without SWMR access, the value 3995 * retrieved will always be the default for non-SWMR access 3996 * (1). The value set via H5Pset_metadata_read_attempts() does 3997 * not have any effect on non-SWMR access. 3998 * </ul> 3999 * 4000 * \par Failure Modes 4001 * \parblock 4002 * 4003 * When the input property list is not a file access property list. 4004 * 4005 * When the library is unable to retrieve the number of read attempts from 4006 * the file access property list. 4007 * 4008 * \endparblock 4009 * 4010 * \par Examples 4011 * \parblock 4012 * 4013 * The first example illustrates the two cases for retrieving the number 4014 * of read attempts from a default file access property list. 4015 * 4016 * \include H5Pget_metadata_read_attempts.1.c 4017 * 4018 * The second example illustrates the two cases for retrieving the 4019 * number of read attempts from the file access property list of a file 4020 * opened with SWMR access. 4021 * 4022 * \include H5Pget_metadata_read_attempts.2.c 4023 * 4024 * The third example illustrates the two cases for retrieving the number 4025 * of read attempts from the file access property list of a file opened 4026 * with non-SWMR access. 4027 * 4028 * \include H5Pget_metadata_read_attempts.3.c 4029 * 4030 * \endparblock 4031 * 4032 * \since 1.10.0 4033 */ 4034 H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); 4035 /** 4036 * \ingroup FAPL 4037 * 4038 * \brief Retrieves type of data property for MULTI driver 4039 * 4040 * \param[in] fapl_id File access property list or data transfer property 4041 * list identifier 4042 * \param[out] type Type of data 4043 * 4044 * \return \herr_t 4045 * 4046 * \details H5Pget_multi_type() retrieves the type of data setting from 4047 * the file access or data transfer property list \p fapl_id. 4048 * This enables a user application to specify the type of data 4049 * the application wishes to access so that the application can 4050 * retrieve a file handle for low-level access to the particular 4051 * member of a set of MULTI files in which that type of data is 4052 * stored. The file handle is retrieved with a separate call to 4053 * H5Fget_vfd_handle() (or, in special circumstances, to 4054 * H5FDget_vfd_handle(); see the Virtual File Layer documentation 4055 * for more information. 4056 * 4057 * The type of data returned in \p type will be one of those 4058 * listed in the discussion of the \p type parameter in the 4059 * description of the function H5Pset_multi_type(). 4060 * 4061 * Use of this function is only appropriate for an HDF5 file 4062 * written as a set of files with the MULTI file driver. 4063 * 4064 * \since 1.6.0 4065 * 4066 */ 4067 H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); 4068 /** 4069 * \ingroup FAPL 4070 * 4071 * \brief Retrieves the object flush property values from the file access property list 4072 * 4073 * \fapl_id{plist_id} 4074 * \param[in] func The user-defined callback function 4075 * \param[in] udata The user-defined input data for the callback function 4076 * 4077 * \return \herr_t 4078 * 4079 * \details H5Pget_object_flush_cb() gets the user-defined callback 4080 * function that is set in the file access property list 4081 * \p fapl_id and stored in the parameter \p func. The callback is 4082 * invoked whenever an object flush occurs in the file. This 4083 * routine also obtains the user-defined input data that is 4084 * passed along to the callback function in the parameter 4085 * \p udata. 4086 * 4087 * \par Example 4088 * \parblock 4089 * The example below illustrates the usage of this routine to obtain the 4090 * object flush property values. 4091 * 4092 * \include H5Pget_object_flush_cb.c 4093 * \endparblock 4094 * 4095 * \since 1.10.0 4096 */ 4097 H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); 4098 /** 4099 * \ingroup FAPL 4100 * 4101 * \brief Retrieves the maximum size for the page buffer and the minimum 4102 percentage for metadata and raw data pages 4103 * 4104 * \fapl_id{plist_id} 4105 * \param[out] buf_size Maximum size, in bytes, of the page buffer 4106 * \param[out] min_meta_perc Minimum metadata percentage to keep in the 4107 * page buffer before allowing pages containing metadata to 4108 * be evicted 4109 * 4110 * \param[out] min_raw_perc Minimum raw data percentage to keep in the 4111 * page buffer before allowing pages containing raw data to 4112 * be evicted 4113 * 4114 * \return \herr_t 4115 * 4116 * \details H5Pget_page_buffer_size() retrieves \p buf_size, the maximum 4117 * size in bytes of the page buffer, \p min_meta_perc, the 4118 * minimum metadata percentage, and \p min_raw_perc, the 4119 * minimum raw data percentage. 4120 * 4121 * \since 1.10.1 4122 */ 4123 H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_perc, 4124 unsigned *min_raw_perc); 4125 /** 4126 * \ingroup FAPL 4127 * 4128 * \brief Returns maximum data sieve buffer size 4129 * 4130 * \fapl_id{fapl_id} 4131 * \param[out] size Maximum size, in bytes, of data sieve buffer 4132 * 4133 * \return \herr_t 4134 * 4135 * \details H5Pget_sieve_buf_size() retrieves, size, the current maximum 4136 * size of the data sieve buffer. 4137 * 4138 * This value is set by H5Pset_sieve_buf_size() and is retrieved 4139 * from the file access property list fapl_id. 4140 * 4141 * \version 1.6.0 The \p size parameter has changed from type \c hsize_t 4142 * to \c size_t 4143 * \since 1.4.0 4144 */ 4145 H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/); 4146 /** 4147 * \ingroup FAPL 4148 * 4149 * \brief Retrieves the current small data block size setting 4150 * 4151 * \fapl_id{fapl_id} 4152 * \param[out] size Maximum size, in bytes, of the small data block 4153 * 4154 * \result \herr_t 4155 * 4156 * \details H5Pget_small_data_block_size() retrieves the current setting 4157 * for the size of the small data block. 4158 * 4159 * If the returned value is zero (0), the small data block 4160 * mechanism has been disabled for the file. 4161 * 4162 * \since 1.4.4 4163 */ 4164 H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/); 4165 /** 4166 * \ingroup FAPL 4167 * 4168 * \brief Returns the identifier of the current VOL connector 4169 * 4170 * \fapl_id{plist_id} 4171 * \param[out] vol_id Current VOL connector identifier 4172 * 4173 * \return \herr_t 4174 * 4175 * \details H5Pget_vol_id() returns the VOL connector identifier \p vol_id for 4176 * the file access property list \p plist_id. This identifier should 4177 * be closed with H5VLclose(). 4178 * 4179 * \since 1.12.0 4180 * 4181 */ 4182 H5_DLL herr_t H5Pget_vol_id(hid_t plist_id, hid_t *vol_id); 4183 /** 4184 * \ingroup FAPL 4185 * 4186 * \brief Returns a copy of the VOL information for a connector 4187 * 4188 * \fapl_id{plist_id} 4189 * \param[out] vol_info The VOL information for a connector 4190 * 4191 * \return \herr_t 4192 * 4193 * \details H5Pget_vol_info() returns a copy of the VOL information \p vol_info 4194 * for a connector specified by the file access property list 4195 * \p plist_id. 4196 * 4197 * \since 1.12.0 4198 * 4199 */ 4200 H5_DLL herr_t H5Pget_vol_info(hid_t plist_id, void **vol_info); 4201 /** 4202 * \ingroup FAPL 4203 * 4204 * \brief Sets alignment properties of a file access property list 4205 * 4206 * \fapl_id 4207 * \param[in] threshold Threshold value. Note that setting the threshold 4208 * value to 0 (zero) has the effect of a special case, 4209 * forcing everything to be aligned 4210 * \param[in] alignment Alignment value 4211 * 4212 * \return \herr_t 4213 * 4214 * \details H5Pset_alignment() sets the alignment properties of a 4215 * file access property list so that any file object greater 4216 * than or equal in size to \p threshold bytes will be aligned 4217 * on an address that is a multiple of \p alignment. The 4218 * addresses are relative to the end of the user block; the 4219 * alignment is calculated by subtracting the user block size 4220 * from the absolute file address and then adjusting the address 4221 * to be a multiple of \p alignment. 4222 * 4223 * Default values for \p threshold and \p alignment are one, 4224 * implying no alignment. Generally the default values will 4225 * result in the best performance for single-process access to 4226 * the file. For MPI IO and other parallel systems, choose an 4227 * alignment that is a multiple of the disk block size. 4228 * 4229 * If the file space handling strategy is set to 4230 * #H5F_FSPACE_STRATEGY_PAGE, then the alignment set via this 4231 * routine is ignored. The file space handling strategy is set 4232 * by H5Pset_file_space_strategy(). 4233 * 4234 * \since 1.0.0 4235 * 4236 */ 4237 H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); 4238 /** 4239 * \ingroup FAPL 4240 * 4241 * \brief Sets the raw data chunk cache parameters 4242 * 4243 * \fapl_id{plist_id} 4244 * \param[in] mdc_nelmts No longer used; any value passed is ignored 4245 * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk 4246 * cache for this dataset. Increasing this value 4247 * reduces the number of cache collisions, but 4248 * slightly increases the memory used. Due to the 4249 * hashing strategy, this value should ideally be a 4250 * prime number. As a rule of thumb, this value 4251 * should be at least 10 times the number of chunks 4252 * that can fit in \p rdcc_nbytes bytes. For 4253 * maximum performance, this value should be set 4254 * approximately 100 times that number of chunks. 4255 * The default value is 521. 4256 * \param[in] rdcc_nbytes Total size of the raw data chunk cache in bytes. 4257 * The default size is 1 MB per dataset. 4258 * \param[in] rdcc_w0 The chunk preemption policy for all datasets. 4259 * This must be between 0 and 1 inclusive and 4260 * indicates the weighting according to which chunks 4261 * which have been fully read or written are 4262 * penalized when determining which chunks to flush 4263 * from cache. A value of 0 means fully read or 4264 * written chunks are treated no differently than 4265 * other chunks (the preemption is strictly LRU), 4266 * while a value of 1 means fully read or written 4267 * chunks are always preempted before other chunks. 4268 * If your application only reads or writes data once, 4269 * this can be safely set to 1. Otherwise, this should 4270 * be set lower depending on how often you re-read or 4271 * re-write the same data. The default value is 0.75. 4272 * If the value passed is #H5D_CHUNK_CACHE_W0_DEFAULT, 4273 * then the property will not be set on the dataset 4274 * access property list, and the parameter will come 4275 * from the file access property list. 4276 * 4277 * \return \herr_t 4278 * 4279 * \details H5Pset_cache() sets the number of elements, the total number of 4280 * bytes, and the preemption policy value for all datasets in a file 4281 * on the file's file access property list. 4282 * 4283 * The raw data chunk cache inserts chunks into the cache by first 4284 * computing a hash value using the address of a chunk and then by 4285 * using that hash value as the chunk's index into the table of 4286 * cached chunks. In other words, the size of this hash table and the 4287 * number of possible hash values are determined by the \p rdcc_nslots 4288 * parameter. If a different chunk in the cache has the same hash value, 4289 * a collision will occur, which will reduce efficiency. If inserting 4290 * the chunk into the cache would cause the cache to be too big, then 4291 * the cache will be pruned according to the \p rdcc_w0 parameter. 4292 * 4293 * The \p mdc_nelmts parameter is no longer used; any value passed 4294 * in that parameter will be ignored. 4295 * 4296 * \b Motivation: Setting raw data chunk cache parameters 4297 * can be done with H5Pset_cache(), H5Pset_chunk_cache(), 4298 * or a combination of both. H5Pset_cache() is used to 4299 * adjust the chunk cache parameters for all datasets via 4300 * a global setting for the file, and H5Pset_chunk_cache() 4301 * is used to adjust the chunk cache parameters for 4302 * individual datasets. When both are used, parameters 4303 * set with H5Pset_chunk_cache() will override any parameters 4304 * set with H5Pset_cache(). 4305 * 4306 * \note Optimum chunk cache parameters may vary widely depending 4307 * on different data layout and access patterns. For datasets 4308 * with low performance requirements for example, changing 4309 * the cache settings can save memory. 4310 * 4311 * \note Note: Raw dataset chunk caching is not currently 4312 * supported when using the MPI I/O and MPI POSIX file drivers 4313 * in read/write mode; see H5Pset_fapl_mpio(). When using this 4314 * file driver, all calls to H5Dread() and H5Dwrite() will access 4315 * the disk directly, and H5Pset_cache() will have no effect on 4316 * performance. 4317 * 4318 * \note Raw dataset chunk caching is supported when these drivers are 4319 * used in read-only mode. 4320 * 4321 * \version 1.8.0 The use of the \p mdc_nelmts parameter was discontinued. 4322 * Metadata cache configuration is managed with 4323 * H5Pset_mdc_config() and H5Pget_mdc_config(). 4324 * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nelmts parameters 4325 * changed from type int to size_t. 4326 * \since 1.0.0 4327 * 4328 */ 4329 H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, 4330 double rdcc_w0); 4331 /** 4332 * \ingroup FAPL 4333 * 4334 * \brief Sets write tracking information for core driver, #H5FD_CORE 4335 * 4336 * \fapl_id{fapl_id} 4337 * \param[in] is_enabled Boolean value specifying whether feature is 4338 enabled 4339 * \param[in] page_size Positive integer specifying size, in bytes, of 4340 * write aggregation pages Value of 1 (one) enables 4341 * tracking with no paging. 4342 * 4343 * \return \herr_t 4344 * 4345 * \details When a file is created or opened for writing using the core 4346 * virtual file driver (VFD) with the backing store option 4347 * turned on, the core driver can be configured to track 4348 * changes to the file and write out only the modified bytes. 4349 * 4350 * This write tracking feature is enabled and disabled with \p 4351 * is_enabled. The default setting is that write tracking is 4352 * disabled, or off. 4353 * 4354 * To avoid a large number of small writes, changes can 4355 * be aggregated into pages of a user-specified size, \p 4356 * page_size. 4357 * 4358 * Setting \p page_size to 1 enables tracking with no page 4359 * aggregation. 4360 * 4361 * The backing store option is set via the function 4362 * H5Pset_fapl_core. 4363 * 4364 * \attention 4365 * \parblock 4366 * This function is only for use with the core VFD and must 4367 * be used after the call to H5Pset_fapl_core(). It is an error 4368 * to use this function with any other VFD. 4369 * 4370 * It is an error to use this function when the backing store 4371 * flag has not been set using H5Pset_fapl_core(). 4372 * 4373 * This function only applies to the backing store write 4374 * operation which typically occurs when the file is flushed 4375 * or closed. This function has no relationship to the 4376 * increment parameter passed to H5Pset_fapl_core(). 4377 * 4378 * For optimum performance, the \p page_size parameter should be 4379 * a power of two. 4380 * 4381 * It is an error to set the page size to 0. 4382 * \endparblock 4383 * 4384 * \version 1.8.14 C function modified in this release to return error 4385 * if \p page_size is set to 0 (zero). 4386 * \since 1.8.13 4387 * 4388 */ 4389 H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); 4390 /** 4391 * \ingroup FAPL 4392 * 4393 * \brief Sets a file driver 4394 * 4395 * \plist_id 4396 * \param[in] driver_id The new driver identifier 4397 * \param[in] driver_info Optional struct containing driver properties 4398 * 4399 * \return \herr_t 4400 * 4401 * \details H5Pset_driver() sets the file driver, driver_id, for a file 4402 * access or data transfer property list, \p plist_id, and 4403 * supplies an optional struct containing the driver-specific 4404 * properties, \p driver_info. 4405 * 4406 * The driver properties will be copied into the property list 4407 * and the reference count on the driver will be incremented, 4408 * allowing the caller to close the driver identifier but still 4409 * use the property list. 4410 * 4411 * \version 1.8.2 Function publicized in this release; previous releases 4412 * described this function only in the virtual file driver 4413 * documentation. 4414 * 4415 * \since 1.4.0 4416 * 4417 */ 4418 H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); 4419 /** 4420 * \ingroup FAPL 4421 * 4422 * \brief Sets a file driver according to a given driver name 4423 * 4424 * \plist_id 4425 * \param[in] driver_name The new driver name 4426 * \param[in] driver_config Optional string containing driver properties 4427 * 4428 * \return \herr_t 4429 * 4430 * \details H5Pset_driver_by_name() sets the file driver, by the name 4431 * driver_name, for a file access or data transfer property list, 4432 * \p plist_id, and supplies an optional string containing the 4433 * driver-specific properties, \p driver_config. The driver 4434 * properties string will be copied into the property list. 4435 * 4436 * If the driver specified by \p driver_name is not currently 4437 * registered, an attempt will be made to load the driver as a 4438 * plugin. 4439 * 4440 * \since 1.14.0 4441 * 4442 */ 4443 H5_DLL herr_t H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *driver_config); 4444 /** 4445 * \ingroup FAPL 4446 * 4447 * \brief Sets a file driver according to a given driver value (ID). 4448 * 4449 * \plist_id 4450 * \param[in] driver_value The new driver value (ID) 4451 * \param[in] driver_config Optional string containing driver properties 4452 * 4453 * \return \herr_t 4454 * 4455 * \details H5Pset_driver_by_value() sets the file driver, by the value 4456 * driver_value, for a file access or data transfer property list, 4457 * \p plist_id, and supplies an optional string containing the 4458 * driver-specific properties, \p driver_config. The driver 4459 * properties string will be copied into the property list. 4460 * 4461 * If the driver specified by \p driver_value is not currently 4462 * registered, an attempt will be made to load the driver as a 4463 * plugin. 4464 * 4465 * \since 1.14.0 4466 * 4467 */ 4468 H5_DLL herr_t H5Pset_driver_by_value(hid_t plist_id, H5FD_class_value_t driver_value, 4469 const char *driver_config); 4470 /** 4471 * \ingroup FAPL 4472 * 4473 * \brief Sets the number of files that can be held open in an external 4474 * link open file cache 4475 * 4476 * \par Motivation 4477 * \parblock 4478 * The <em>external link open file cache</em> holds files open after 4479 * they have been accessed via an external link. This cache reduces 4480 * the number of times such files are opened when external links are 4481 * accessed repeatedly and can significantly improves performance in 4482 * certain heavy-use situations and when low-level file opens or closes 4483 * are expensive. 4484 * 4485 * H5Pset_elink_file_cache_size() sets the number of files 4486 * that will be held open in an external link open file 4487 * cache. H5Pget_elink_file_cache_size() retrieves the size of an existing 4488 * cache; and H5Fclear_elink_file_cache() clears an existing cache without 4489 * closing it. 4490 * \endparblock 4491 * 4492 * \fapl_id{plist_id} 4493 * \param[in] efc_size External link open file cache size in number of files 4494 * <em>Default setting is 0 (zero).</em> 4495 * 4496 * \return \herr_t 4497 * 4498 * \details H5Pset_elink_file_cache_size() specifies the number of files 4499 * that will be held open in an external link open file cache. 4500 * 4501 * The default external link open file cache size is 0 (zero), 4502 * meaning that files accessed via an external link are not 4503 * held open. Setting the cache size to a positive integer 4504 * turns on the cache; setting the size back to zero turns it 4505 * off. 4506 * 4507 * With this property set, files are placed in the external 4508 * link open file cache cache when they are opened via an 4509 * external link. Files are then held open until either 4510 * they are evicted from the cache or the parent file is 4511 * closed. This property setting can improve performance when 4512 * external links are repeatedly accessed. 4513 * 4514 * When the cache is full, files will be evicted using a least 4515 * recently used (LRU) scheme; the file which has gone the 4516 * longest time without being accessed through the parent file 4517 * will be evicted and closed if nothing else is holding that 4518 * file open. 4519 * 4520 * Files opened through external links inherit the parent 4521 * file's file access property list by default, and therefore 4522 * inherit the parent file's external link open file cache 4523 * setting. 4524 * 4525 * When child files contain external links of their own, the 4526 * caches can form a graph of cached external files. Closing 4527 * the last external reference to such a graph will recursively 4528 * close all files in the graph, even if cycles are present. 4529 * \par Example 4530 * \parblock 4531 * The following code sets up an external link open file cache that will 4532 * hold open up to 8 files reached through external links: 4533 * 4534 * \code 4535 * status = H5Pset_elink_file_cache_size(fapl_id, 8); 4536 * \endcode 4537 * \endparblock 4538 * 4539 * \since 1.8.7 4540 */ 4541 H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); 4542 /** 4543 * \ingroup FAPL 4544 * 4545 * \brief Controls the library's behavior of evicting metadata associated with 4546 * a closed object 4547 * 4548 * \fapl_id 4549 * \param[in] evict_on_close Whether the HDF5 object should be evicted on close 4550 * 4551 * \return \herr_t 4552 * 4553 * \details The library's metadata cache is fairly conservative about holding 4554 * on to HDF5 object metadata(object headers, chunk index structures, 4555 * etc.), which can cause the cache size to grow, resulting in memory 4556 * pressure on an application or system. When enabled, the "evict on 4557 * close" property will cause all metadata for an object to be evicted 4558 * from the cache as long as metadata is not referenced by any other 4559 * open object. 4560 * 4561 * This function only applies to file access property lists. 4562 * 4563 * The default library behavior is to not evict on object or file 4564 * close. 4565 * 4566 * When applied to a file access property list, any subsequently opened 4567 * object will inherit the "evict on close" property and will have 4568 * its metadata evicted when the object is closed. 4569 * 4570 * \since 1.10.1 4571 * 4572 */ 4573 H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); 4574 /** 4575 * \ingroup FAPL 4576 * 4577 * \brief Sets offset property for low-level access to a file in a family of 4578 * files 4579 * 4580 * \fapl_id 4581 * \param[in] offset Offset in bytes within the HDF5 file 4582 * 4583 * \return \herr_t 4584 * 4585 * \details H5Pset_family_offset() sets the offset property in the file access 4586 * property list \p fapl_id so that the user application can 4587 * retrieve a file handle for low-level access to a particular member 4588 * of a family of files. The file handle is retrieved with a separate 4589 * call to H5Fget_vfd_handle() (or, in special circumstances, to 4590 * H5FDget_vfd_handle(); see \ref VFL). 4591 * 4592 * The value of \p offset is an offset in bytes from the beginning of 4593 * the HDF5 file, identifying a user-determined location within the 4594 * HDF5 file. 4595 * The file handle the user application is seeking is for the specific 4596 * member-file in the associated family of files to which this offset 4597 * is mapped. 4598 * 4599 * Use of this function is only appropriate for an HDF5 file written as 4600 * a family of files with the \c FAMILY file driver. 4601 * 4602 * \since 1.6.0 4603 * 4604 */ 4605 H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); 4606 /** 4607 * \ingroup FAPL 4608 * 4609 * \brief Sets the file close degree 4610 * 4611 * \fapl_id 4612 * \param[in] degree Pointer to a location containing the file close 4613 * degree property, the value of \p degree 4614 * 4615 * \return \herr_t 4616 * 4617 * \details H5Pset_fclose_degree() sets the file close degree property 4618 * \p degree in the file access property list \p fapl_id. 4619 * 4620 * The value of \p degree determines how aggressively 4621 * H5Fclose() deals with objects within a file that remain open 4622 * when H5Fclose() is called to close that file. \p degree can 4623 * have any one of four valid values: 4624 * 4625 * <table> 4626 * <tr> 4627 * <th>Degree name</th> 4628 * <th>H5Fclose behavior with no open object in file</th> 4629 * <th>H5Fclose behavior with open object(s) in file</th> 4630 * </tr> 4631 * <tr> 4632 * <td>#H5F_CLOSE_WEAK</td> 4633 * <td>Actual file is closed.</td> 4634 * <td>Access to file identifier is terminated; actual file 4635 * close is delayed until all objects in file are closed 4636 * </td> 4637 * </tr> 4638 * <tr> 4639 * <td>#H5F_CLOSE_SEMI</td> 4640 * <td>Actual file is closed.</td> 4641 * <td>Function returns FAILURE</td> 4642 * </tr> 4643 * <tr> 4644 * <td>#H5F_CLOSE_STRONG</td> 4645 * <td>Actual file is closed.</td> 4646 * <td>All open objects remaining in the file are closed then 4647 * file is closed</td> 4648 * </tr> 4649 * <tr> 4650 * <td>#H5F_CLOSE_DEFAULT</td> 4651 * <td>The VFL driver chooses the behavior. Currently, all VFL 4652 * drivers set this value to #H5F_CLOSE_WEAK, except for the 4653 * MPI-I/O driver, which sets it to #H5F_CLOSE_SEMI.</td> 4654 * <td></td> 4655 * </tr> 4656 * 4657 * </table> 4658 * \warning If a file is opened multiple times without being closed, each 4659 * open operation must use the same file close degree setting. 4660 * For example, if a file is already open with #H5F_CLOSE_WEAK, 4661 * an H5Fopen() call with #H5F_CLOSE_STRONG will fail. 4662 * 4663 * \since 1.6.0 4664 * 4665 */ 4666 H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); 4667 /** 4668 * \ingroup FAPL 4669 * 4670 * \brief Sets an initial file image in a memory buffer 4671 * 4672 * \fapl_id 4673 * \param[in] buf_ptr Pointer to the initial file image, or 4674 * NULL if no initial file image is desired 4675 * \param[in] buf_len Size of the supplied buffer, or 4676 * 0 (zero) if no initial image is desired 4677 * 4678 * \return \herr_t 4679 * 4680 * \details H5Pset_file_image() allows an application to provide a file image 4681 * to be used as the initial contents of a file. 4682 * Calling H5Pset_file_image()makes a copy of the buffer specified in 4683 * \p buf_ptr of size \p buf_len. 4684 * 4685 * \par Motivation: 4686 * H5Pset_file_image() and other elements of HDF5 are 4687 * used to load an image of an HDF5 file into system memory and open 4688 * that image as a regular HDF5 file. An application can then use the 4689 * file without the overhead of disk I/O. 4690 * 4691 * \par Recommended Reading: 4692 * This function is part of the file image 4693 * operations feature set. It is highly recommended to study the guide 4694 * [<em>HDF5 File Image Operations</em>] 4695 * (https://\DOCURL/advanced_topics/file_image_ops.md 4696 * ) before using this feature set. See the “See Also” section below 4697 * for links to other elements of HDF5 file image operations. 4698 * 4699 * \see 4700 * \li H5LTopen_file_image() 4701 * \li H5Fget_file_image() 4702 * \li H5Pget_file_image() 4703 * \li H5Pset_file_image_callbacks() 4704 * \li H5Pget_file_image_callbacks() 4705 * 4706 * \li [HDF5 File Image Operations] 4707 * (https://\DOCURL/advanced_topics/file_image_ops.md) 4708 * in [Advanced Topics in HDF5] 4709 * (https://\DOCURL/advanced_topics_list.md) 4710 * 4711 * \li Within H5Pset_file_image_callbacks(): 4712 * \li Callback #H5FD_file_image_callbacks_t 4713 * \li Callback #H5FD_file_image_op_t 4714 * 4715 * \version 1.8.13 Fortran subroutine added in this release. 4716 * \since 1.8.9 4717 * 4718 */ 4719 H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); 4720 /** 4721 * \ingroup FAPL 4722 * 4723 * \brief Sets the callbacks for working with file images 4724 * 4725 * \note **Motivation:** H5Pset_file_image_callbacks() and other elements 4726 * of HDF5 are used to load an image of an HDF5 file into system 4727 * memory and open that image as a regular HDF5 file. An application 4728 * can then use the file without the overhead of disk I/O.\n 4729 * **Recommended Reading:** This function is part of the file 4730 * image operations feature set. It is highly recommended to study 4731 * the guide [HDF5 File Image Operations] 4732 * (https://\DOCURL/advanced_topics/file_image_ops.md 4733 * ) before using this feature set. See the “See Also” section below 4734 * for links to other elements of HDF5 file image operations. 4735 * 4736 * \fapl_id 4737 * \param[in,out] callbacks_ptr Pointer to the instance of the 4738 * #H5FD_file_image_callbacks_t structure 4739 * 4740 * \return \herr_t \n 4741 * **Failure Modes**: Due to interactions between this function and 4742 * H5Pset_file_image() and H5Pget_file_image(), 4743 * H5Pset_file_image_callbacks() will fail if a file image has 4744 * already been set in the target file access property list, \p fapl_id. 4745 * 4746 * \details H5Pset_file_image_callbacks() sets callback functions for working 4747 * with file images in memory. 4748 * 4749 * H5Pset_file_image_callbacks() allows an application to control the 4750 * management of file image buffers through user defined callbacks. 4751 * These callbacks can be used in the management of file image buffers 4752 * in property lists and with certain file drivers. 4753 * 4754 * H5Pset_file_image_callbacks() must be used before any file image has 4755 * been set in the file access property list. Once a file image has 4756 * been set, the function will fail. 4757 * 4758 * The callback routines set up by H5Pset_file_image_callbacks() are 4759 * invoked when a new file image buffer is allocated, when an existing 4760 * file image buffer is copied or resized, or when a file image buffer 4761 * is released from use. 4762 * 4763 * Some file drivers allow the use of user-defined callback functions 4764 * for allocating, freeing, and copying the driver's internal buffer, 4765 * potentially allowing optimizations such as avoiding large \c malloc 4766 * and \c memcpy operations, or to perform detailed logging. 4767 * 4768 * From the perspective of the HDF5 library, the operations of the 4769 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", 4770 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", 4771 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and 4772 * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks 4773 * must be identical to those of the 4774 * corresponding C standard library calls (\c malloc, \c memcpy, 4775 * \c realloc, and \c free). While the operations must be identical, 4776 * the file image callbacks have more parameters. The return values 4777 * of \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and 4778 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" are identical to 4779 * the return values of \c malloc and \c realloc. The return values of 4780 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and 4781 * \ref H5FD_file_image_callbacks_t.image_free "image_free" differ from the return 4782 * values of \c memcpy and \c free in that the return values of 4783 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" and 4784 * \ref H5FD_file_image_callbacks_t.image_free "image_free" can also indicate failure. 4785 * 4786 * The callbacks and their parameters, along with a struct and 4787 * an \c ENUM required for their use, are described below. 4788 * 4789 * <b>Callback struct and \c ENUM:</b> 4790 * 4791 * The callback functions set up by H5Pset_file_image_callbacks() use 4792 * a struct and an \c ENUM that are defined as follows 4793 * 4794 * The struct #H5FD_file_image_callbacks_t serves as a container 4795 * for the callback functions and a pointer to user-supplied data. 4796 * The struct is defined as follows: 4797 * \snippet H5FDpublic.h H5FD_file_image_callbacks_t_snip 4798 * 4799 * Elements of the #H5FD_file_image_op_t are used by the 4800 * callbacks to invoke certain operations on file images. The ENUM is 4801 * defined as follows: 4802 * \snippet H5FDpublic.h H5FD_file_image_op_t_snip 4803 * 4804 * The elements of the #H5FD_file_image_op_t are used in the following 4805 * callbacks: 4806 * 4807 * - The \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" callback 4808 * contains a pointer to a function that must appear to HDF5 to have 4809 * functionality identical to that of the standard C library \c malloc() call. 4810 * 4811 * - Signature in #H5FD_file_image_callbacks_t: 4812 * \snippet H5FDpublic.h image_malloc_snip 4813 * \n 4814 * - The \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" 4815 * callback contains a pointer to a function 4816 * that must appear to HDF5 to have functionality identical to that 4817 * of the standard C library \c memcopy() call, except that it returns 4818 * a \p NULL on failure. (The \c memcpy C Library routine is defined 4819 * to return the \p dest parameter in all cases.) 4820 * 4821 * - Setting \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" 4822 * to \c NULL indicates that HDF5 should invoke 4823 * the standard C library \c memcpy() routine when copying buffers. 4824 * 4825 * - Signature in #H5FD_file_image_callbacks_t: 4826 * \snippet H5FDpublic.h image_memcpy_snip 4827 * \n 4828 * - The \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" callback 4829 * contains a pointer to a function that must appear to HDF5 to have 4830 * functionality identical to that of the standard C library \c realloc() call. 4831 * 4832 * - Setting \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" 4833 * to \p NULL indicates that HDF5 should 4834 * invoke the standard C library \c realloc() routine when resizing 4835 * file image buffers. 4836 * 4837 * - Signature in #H5FD_file_image_callbacks_t: 4838 * \snippet H5FDpublic.h image_realloc_snip 4839 * \n 4840 * - The \ref H5FD_file_image_callbacks_t.image_free "image_free" callback contains 4841 * a pointer to a function that must appear to HDF5 to have functionality 4842 * identical to that of the standard C library \c free() call, except 4843 * that it will return \c 0 (\c SUCCEED) on success and \c -1 (\c FAIL) on failure. 4844 * 4845 * - Setting \ref H5FD_file_image_callbacks_t.image_free "image_free" 4846 * to \c NULL indicates that HDF5 should invoke 4847 * the standard C library \c free() routine when releasing file image 4848 * buffers. 4849 * 4850 * - Signature in #H5FD_file_image_callbacks_t: 4851 * \snippet H5FDpublic.h image_free_snip 4852 * \n 4853 * - The \ref H5FD_file_image_callbacks_t.udata_copy "udata_copy" 4854 * callback contains a pointer to a function 4855 * that, from the perspective of HDF5, allocates a buffer of suitable 4856 * size, copies the contents of the supplied \p udata into the new 4857 * buffer, and returns the address of the new buffer. The function 4858 * returns NULL on failure. This function is necessary if a non-NULL 4859 * \p udata parameter is supplied, so that property lists containing 4860 * the image callbacks can be copied. If the \p udata parameter below 4861 * is \c NULL, then this parameter should be \c NULL as well. 4862 * 4863 * - Signature in #H5FD_file_image_callbacks_t: 4864 * \snippet H5FDpublic.h udata_copy_snip 4865 * \n 4866 * - The \ref H5FD_file_image_callbacks_t.udata_free "udata_free" 4867 * callback contains a pointer to a function 4868 * that, from the perspective of HDF5, frees a user data block. This 4869 * function is necessary if a non-NULL udata parameter is supplied so 4870 * that property lists containing image callbacks can be discarded 4871 * without a memory leak. If the udata parameter below is \c NULL, 4872 * this parameter should be \c NULL as well. 4873 * 4874 * - Signature in #H5FD_file_image_callbacks_t: 4875 * \snippet H5FDpublic.h udata_free_snip 4876 * 4877 * - \p **udata**, the final field in the #H5FD_file_image_callbacks_t 4878 * struct, provides a pointer to user-defined data. This pointer will 4879 * be passed to the 4880 * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", 4881 * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", 4882 * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and 4883 * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks. 4884 * Define udata as \c NULL if no user-defined data is provided. 4885 * 4886 * \since 1.8.9 4887 * 4888 */ 4889 H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); 4890 /** 4891 * \ingroup FAPL 4892 * 4893 * \brief Sets the file locking property values 4894 * 4895 * \fapl_id 4896 * \param[in] use_file_locking Toggle to specify file locking (or not) 4897 * \param[in] ignore_when_disabled Toggle to ignore when disabled (or not) 4898 * 4899 * \return \herr_t 4900 * 4901 * \details H5Pset_file_locking() overrides the default file locking flag 4902 * setting that was set when the library was configured. 4903 * 4904 * This setting can be overridden by the \c HDF5_USE_FILE_LOCKING 4905 * environment variable. 4906 * 4907 * File locking is used when creating/opening a file to prevent 4908 * problematic file accesses. 4909 * 4910 * \since 1.10.7 4911 * 4912 */ 4913 H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled); 4914 /** 4915 * \ingroup FAPL 4916 * 4917 * \brief Sets garbage collecting references flag 4918 * 4919 * \fapl_id 4920 * \param[in] gc_ref Flag setting reference garbage collection to on (1) or off (0) 4921 * 4922 * \return \herr_t 4923 * 4924 * \details H5Pset_gc_references() sets the flag for garbage collecting 4925 * references for the file. 4926 * 4927 * Dataset region references and other reference types use space in an 4928 * HDF5 file's global heap. If garbage collection is on and the user 4929 * passes in an uninitialized value in a reference structure, the heap 4930 * might get corrupted. When garbage collection is off, however, and 4931 * the user re-uses a reference, the previous heap block will be 4932 * orphaned and not returned to the free heap space. 4933 * 4934 * When garbage collection is on, the user must initialize the 4935 * reference structures to 0 or risk heap corruption. 4936 * 4937 * The default value for garbage collecting references is off. 4938 * 4939 * \since 1.2.0 4940 * 4941 */ 4942 H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); 4943 /** 4944 * \ingroup FAPL 4945 * 4946 * \brief Controls the range of library release versions used when creating 4947 * objects in a file 4948 * 4949 * \fapl_id{plist_id} 4950 * \param[in] low The earliest version of the library that will be used 4951 * for writing objects 4952 * \param[in] high The latest version of the library that will be used for 4953 * writing objects 4954 * 4955 * \return \herr_t 4956 * 4957 * \details H5Pset_libver_bounds() controls the range of library release 4958 * versions that will be used when creating objects in a file. 4959 * The object format versions are determined indirectly from the 4960 * library release versions specified in the call. 4961 * 4962 * This property is set in the file access property list 4963 * specified by the parameter \p fapl_id. 4964 * 4965 * The parameter \p low sets the earliest possible format 4966 * versions that the library will use when creating objects in 4967 * the file. Note that earliest possible is different from 4968 * earliest, as some features introduced in library versions 4969 * later than 1.0.0 resulted in updates to object formats. 4970 * The parameter \p high sets the latest format versions that 4971 * the library will be allowed to use when creating objects in 4972 * the file. 4973 * 4974 * The parameters \p low and \p high must be one of the 4975 * enumerated values in the #H5F_libver_t struct, which is 4976 * defined in H5Fpublic.h. 4977 * 4978 * The macro #H5F_LIBVER_LATEST is aliased to the highest 4979 * enumerated value in #H5F_libver_t, indicating that this is 4980 * currently the latest format available. 4981 * 4982 * The library supports the following pairs of (\p low, \p high) 4983 * combinations as derived from the values in #H5F_libver_t: 4984 * 4985 * <table> 4986 * <tr> 4987 * <th>Value of \p low and \p high</th> 4988 * <th>Result</th> 4989 * </tr> 4990 * <tr> 4991 * <td>\p low=#H5F_LIBVER_EARLIEST<br /> 4992 * \p high=<any other version but not #H5F_LIBVER_LATEST></td> 4993 * <td> 4994 * \li The library will create objects with the earliest 4995 * possible format versions. 4996 * \li The library will allow objects to be created with the 4997 * latest format versions available to library release 4998 * specified in the \p high value. 4999 * \li API calls that create objects or features that are 5000 * available to versions of the library greater than the 5001 * specified version in \p high will fail.</td> 5002 * </tr> 5003 * <tr> 5004 * <td>\p low=#H5F_LIBVER_V18<br /> 5005 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5006 * <td> 5007 * \li The library will create objects with the latest format 5008 * versions available to library release 1.8.x. 5009 * \li The library will allow objects to be created with the latest 5010 * format versions available to library release specified 5011 * in the \p high value. 5012 * \li API calls that create objects or features that are 5013 * available to versions of the library greater than the 5014 * specified version in \p high will fail. 5015 * \li Earlier versions of the library may not be able to access 5016 * objects created with this setting.</td> 5017 * </tr> 5018 * <tr> 5019 * <td>\p low=#H5F_LIBVER_V110<br /> 5020 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5021 * <td> 5022 * \li The library will create objects with the latest format 5023 * versions available to library release 1.10.x. 5024 * \li The library will allow objects to be created with the latest 5025 * format versions available to library release specified 5026 * in the \p high value. 5027 * \li API calls that create objects or features that are available 5028 * to versions of the library greater than version specified in 5029 * \p high will fail. 5030 * \li Earlier versions of the library may not be able to access 5031 * objects created with this setting.</td> 5032 * </tr> 5033 * <tr> 5034 * <td>\p low=#H5F_LIBVER_V112<br /> 5035 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5036 * <td> 5037 * \li The library will create objects with the latest format 5038 * versions available to library release 1.12.x. 5039 * \li The library will allow objects to be created with the latest 5040 * format versions available to library release specified 5041 * in the \p high value. 5042 * \li API calls that create objects or features that are available 5043 * to versions of the library greater than version specified in 5044 * \p high will fail. 5045 * \li Earlier versions of the library may not be able to access 5046 * objects created with this setting.</td> 5047 * </tr> 5048 * <tr> 5049 * <td>\p low=#H5F_LIBVER_V114<br /> 5050 * \p high=<any version higher than \p low but not #H5F_LIBVER_LATEST></td> 5051 * <td> 5052 * \li The library will create objects with the latest format 5053 * versions available to library release 1.14.x. 5054 * \li The library will allow objects to be created with the latest 5055 * format versions available to library release specified 5056 * in the \p high value. 5057 * \li API calls that create objects or features that are available 5058 * to versions of the library greater than version specified in 5059 * \p high will fail. 5060 * \li Earlier versions of the library may not be able to access 5061 * objects created with this setting.</td> 5062 * </tr> 5063 * <tr> 5064 * <td>\p low=high </td> 5065 * <td> 5066 * \li The library will create objects with the latest format 5067 * versions available to library release specified. 5068 * \li The objects written with this setting may be 5069 * accessible to a smaller range of library versions than 5070 * would be the case if low is set to #H5F_LIBVER_EARLIEST. 5071 * \li API calls that create objects or features that are available 5072 * to versions of the library greater than the specified 5073 * release will fail. 5074 * \li Earlier versions of the library may not be able to access 5075 * objects created with this setting.</td> 5076 * </tr> 5077 * <tr> 5078 * <td>\p low=#H5F_LIBVER_EARLIEST<br /> 5079 * \p high=#H5F_LIBVER_LATEST</td> 5080 * <td> 5081 * \li The library will create objects with the earliest possible 5082 * format versions. 5083 * \li The library will allow objects to be created with the latest 5084 * format versions available to the latest release. See 5085 * note #H5F_LIBVER_LATEST below the table. 5086 * \li This is the library default setting and provides the greatest 5087 * format compatibility.</td> 5088 * </tr> 5089 * <tr> 5090 * <td>\p low=<any version lower than \p high><br/> 5091 * \p high=#H5F_LIBVER_LATEST</td> 5092 * <td> 5093 * \li The library will create objects with the latest format 5094 * versions available to library release \p low. 5095 * \li The library will allow objects to be created with the latest 5096 * format versions available to the latest release. See 5097 * note *H5F_LIBVER_LATEST* below the table. 5098 * \li This setting allows users to take advantage of the latest 5099 * features and performance enhancements in the library. 5100 * \li Earlier versions of the library may not be able to access 5101 * objects created with this setting.</td> 5102 * </tr> 5103 * <tr> 5104 * <td>\p low=#H5F_LIBVER_LATEST<br /> 5105 * \p high=#H5F_LIBVER_LATEST</td> 5106 * <td> 5107 * \li The library will create objects with the latest format 5108 * versions available to the latest release. 5109 * \li The library will allow objects to be created with the latest 5110 * format versions available to the latest release. See 5111 * note *H5F_LIBVER_LATEST* below the table. 5112 * \li This setting allows users to take advantage of the latest 5113 * features and performance enhancements in the library. 5114 * However, objects written with this setting may be 5115 * accessible to a smaller range of library versions than 5116 * would be the case if low is set to #H5F_LIBVER_EARLIEST. 5117 * \li Earlier versions of the library may not be able to access 5118 * objects created with this setting.</td> 5119 * </tr> 5120 * </table> 5121 * 5122 * \note *H5F_LIBVER_LATEST*:<br /> 5123 * Since 1.14.x is also #H5F_LIBVER_LATEST, there is no upper 5124 * limit on the format versions to use. That is, if a 5125 * newer format version is required to support a feature 5126 * in 1.14.x series, this setting will allow the object to be 5127 * created. 5128 * 5129 * \version 1.10.2 #H5F_LIBVER_V18 added to the enumerated defines in 5130 * #H5F_libver_t. 5131 * 5132 * \since 1.8.0 5133 * 5134 */ 5135 H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); 5136 /** 5137 * \ingroup FAPL 5138 * 5139 * \brief Set the initial metadata cache configuration in the indicated File 5140 * Access Property List to the supplied value 5141 * 5142 * \fapl_id{plist_id} 5143 * \param[in] config_ptr Pointer to the instance of \p H5AC_cache_config_t 5144 * containing the desired configuration 5145 * \return \herr_t 5146 * 5147 * \details The fields of the #H5AC_cache_config_t structure are shown 5148 * below: 5149 * \snippet H5ACpublic.h H5AC_cache_config_t_snip 5150 * \click4more 5151 * 5152 * \details H5Pset_mdc_config() attempts to set the initial metadata cache 5153 * configuration to the supplied value. It will fail if an invalid 5154 * configuration is detected. This configuration is used when the file 5155 * is opened. 5156 * 5157 * See the overview of the metadata cache in the special topics section 5158 * of the user manual for details on what is being configured. If you 5159 * have not read and understood that documentation, you really should 5160 * not be using this API call. 5161 * 5162 * \since 1.8.0 5163 * 5164 */ 5165 H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); 5166 /** 5167 * \ingroup FAPL 5168 * 5169 * \brief Sets metadata cache logging options 5170 * 5171 * \fapl_id{plist_id} 5172 * \param[in] is_enabled Whether logging is enabled 5173 * \param[in] location Location of log in UTF-8/ASCII (file path/name) 5174 * (On Windows, this must be ASCII) 5175 * \param[in] start_on_access Whether the logging will begin as soon as the 5176 * file is opened or created 5177 * 5178 * \return \herr_t 5179 * 5180 * \details The metadata cache is a central part of the HDF5 library through 5181 * which all file metadata reads and writes take place. File metadata 5182 * is normally invisible to the user and is used by the library for 5183 * purposes such as locating and indexing data. File metadata should 5184 * not be confused with user metadata, which consists of attributes 5185 * created by users and attached to HDF5 objects such as datasets via 5186 * H5A API calls. 5187 * 5188 * Due to the complexity of the cache, a trace/logging feature has 5189 * been created that can be used by HDF5 developers for debugging and 5190 * performance analysis. The functions that control this functionality 5191 * will normally be of use to a very limited number of developers 5192 * outside of The HDF Group. The functions have been documented to 5193 * help users create logs that can be sent with bug reports. 5194 * 5195 * Control of the log functionality is straightforward. Logging is 5196 * enabled via the H5Pset_mdc_log_options() function, 5197 * which will modify the file access property list used to open or 5198 * create a file. This function has a flag that determines whether 5199 * logging begins at file open or starts in a paused state. Log 5200 * messages can then be controlled via the H5Fstart_mdc_logging() 5201 * and H5Fstop_mdc_logging() function. 5202 * 5203 * H5Pget_mdc_log_options() can be used to examine a file access 5204 * property list, and H5Fget_mdc_logging_status() will return the 5205 * current state of the logging flags. 5206 * 5207 * The log format is described in [<em>Metadata Cache Logging</em>] 5208 * (https://\DOCURL/advanced_topics/FineTuningMetadataCache.md). 5209 * 5210 * \since 1.10.0 5211 * 5212 */ 5213 H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, 5214 hbool_t start_on_access); 5215 /** 5216 * \ingroup FAPL 5217 * 5218 * \brief Sets the minimum metadata block size 5219 * 5220 * \fapl_id{fapl_id} 5221 * \param[in] size Minimum size, in bytes, of metadata block allocations 5222 * 5223 * \return \herr_t 5224 * 5225 * \details H5Pset_meta_block_size() sets the minimum size, in bytes, of 5226 * metadata block allocations when #H5FD_FEAT_AGGREGATE_METADATA is set by a VFL 5227 * driver. 5228 5229 * Each raw metadata block is initially allocated to be of the given size. 5230 * Specific metadata objects (e.g., object headers, local heaps, B-trees) are then 5231 * sub-allocated from this block. 5232 * 5233 * The default setting is 2048 bytes, meaning that the library will 5234 * attempt to aggregate metadata in at least 2K blocks in the file. 5235 * Setting the value to zero (\TText{0}) with this function will turn 5236 * off metadata aggregation, even if the VFL driver attempts to use the 5237 * metadata aggregation strategy. 5238 * 5239 * Metadata aggregation reduces the number of small data objects in the file that 5240 * would otherwise be required for metadata. The aggregated block of metadata is 5241 * usually written in a single write action and always in a contiguous block, 5242 * potentially significantly improving library and application performance. 5243 * 5244 * \since 1.4.0 5245 */ 5246 H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); 5247 /** 5248 * \ingroup FAPL 5249 * 5250 * \brief Sets the number of read attempts in a file access property list 5251 * 5252 * \fapl_id{plist_id} 5253 * \param[in] attempts The number of read attempts. Must be a value greater than \TText{0} 5254 * 5255 * \return \herr_t 5256 * 5257 * \return Failure Modes: 5258 * - When the user sets the number of read attempts to \TText{0}. 5259 * - When the input property list is not a file access property list. 5260 * - When the library is unable to set the number of read attempts in the file access property list. 5261 * 5262 * \details H5Pset_metadata_read_attempts() sets the number of reads that the 5263 * library will try when reading checksummed metadata in an HDF5 file opened 5264 * with SWMR access. When reading such metadata, the library will compare the 5265 * checksum computed for the metadata just read with the checksum stored within 5266 * the piece of checksum. When performing SWMR operations on a file, the 5267 * checksum check might fail when the library reads data on a system that is not 5268 * atomic. To remedy such situations, the library will repeatedly read the piece 5269 * of metadata until the check passes or finally fails the read when the allowed 5270 * number of attempts is reached. 5271 * 5272 * The number of read attempts used by the library will depend on how the file is 5273 * opened and whether the user sets the number of read attempts via this routine: 5274 5275 * - For a file opened with SWMR access: 5276 * - If the user sets the number of attempts to \TText{N}, the library will use \TText{N}. 5277 * - If the user does not set the number of attempts, the library will use the 5278 * default for SWMR access (\TText{100}). 5279 * - For a file opened with non-SWMR access, the library will always use the default 5280 * for non-SWMR access (\TText{1}). The value set via this routine does not have any effect 5281 * during non-SWMR access. 5282 * 5283 * \b Example: The first example illustrates the case in setting the number of read attempts for a file 5284 * opened with SWMR access. 5285 * 5286 * \snippet H5Pset_metadata_read_attempts.c SWMR Access 5287 * 5288 * \b Example: The second example illustrates the case in setting the number of 5289 * read attempts for a file opened with non-SWMR access. The value 5290 * set in the file access property list does not have any effect. 5291 * 5292 * \snippet H5Pset_metadata_read_attempts.c non-SWMR Access 5293 * 5294 * \note \b Motivation: On a system that is not atomic, the library might 5295 * possibly read inconsistent metadata with checksum when performing 5296 * single-writer/multiple-reader (SWMR) operations for an HDF5 file. Upon 5297 * encountering such situations, the library will try reading the metadata 5298 * again to obtain consistent data. This routine provides the means to set 5299 * the number of read attempts other than the library default. 5300 * 5301 * \since 1.10.0 5302 */ 5303 H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); 5304 /** 5305 * \ingroup FAPL 5306 * 5307 * \brief Specifies type of data to be accessed via the \TText{MULTI} driver, 5308 * enabling more direct access 5309 * 5310 * \fapl_id{fapl_id} 5311 * \param[in] type Type of data to be accessed 5312 * 5313 * \return \herr_t 5314 * 5315 * \details H5Pset_multi_type() sets the \Emph{type of data} property in the file 5316 * access property list \p fapl_id. This setting enables a user 5317 * application to specify the type of data the application wishes to 5318 * access so that the application can retrieve a file handle for 5319 * low-level access to the particular member of a set of \TText{MULTI} 5320 * files in which that type of data is stored. The file handle is 5321 * retrieved with a separate call to H5Fget_vfd_handle() (or, in special 5322 * circumstances, to H5FDget_vfd_handle(); see \ref VFL. 5323 * 5324 * The type of data specified in \p type may be one of the following: 5325 * 5326 * <table> 5327 * <tr> 5328 * <td>#H5FD_MEM_SUPER</td> <td>Super block data</td> 5329 * </tr> 5330 * <tr> 5331 * <td>#H5FD_MEM_BTREE</td> <td>B-tree data</td> 5332 * </tr> 5333 * <tr> 5334 * <td>#H5FD_MEM_DRAW</td> <td>Dataset raw data</td> 5335 * </tr> 5336 * <tr> 5337 * <td>#H5FD_MEM_GHEAP</td> <td>Global heap data</td> 5338 * </tr> 5339 * <tr> 5340 * <td>#H5FD_MEM_LHEAP</td> <td>Local Heap data</td> 5341 * </tr> 5342 * <tr> 5343 * <td>#H5FD_MEM_OHDR</td> <td>Object header data</td> 5344 * </tr> 5345 * </table> 5346 * 5347 * This function is for use only when accessing an HDF5 file written as a set of 5348 * files with the \TText{MULTI} file driver. 5349 * 5350 * \since 1.6.0 5351 */ 5352 H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); 5353 /** 5354 * \ingroup FAPL 5355 * 5356 * \brief Sets a callback function to invoke when an object flush occurs in the file 5357 * 5358 * \fapl_id{plist_id} 5359 * \op{func} 5360 * \op_data_in{udata} 5361 * 5362 * \return \herr_t 5363 * 5364 * \details H5Pset_object_flush_cb() sets the callback function to invoke in the 5365 * file access property list \p plist_id whenever an object flush occurs in 5366 * the file. Library objects are group, dataset, and committed 5367 * datatype. 5368 * 5369 * The callback function \p func must conform to the prototype defined below: 5370 * \code 5371 * typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *user_data) 5372 * \endcode 5373 * 5374 * The parameters of the callback function, per the above prototypes, are defined as follows: 5375 * - \TText{object_id} is the identifier of the object which has just been flushed. 5376 * - \TText{user_data} is the user-defined input data for the callback function. 5377 * 5378 * \b Example: The example below illustrates the usage of this routine to set 5379 * the callback function to invoke when an object flush occurs. 5380 * 5381 * \include H5Pset_object_flush_cb.c 5382 * 5383 * \since 1.10.0 5384 */ 5385 H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); 5386 /** 5387 * \ingroup FAPL 5388 * 5389 * \brief Sets the maximum size of the data sieve buffer 5390 * 5391 * \fapl_id{fapl_id} 5392 * \param[in] size Maximum size, in bytes, of data sieve buffer 5393 * 5394 * \return \herr_t 5395 * 5396 * \details H5Pset_sieve_buf_size() sets \p size, the maximum size in bytes of the 5397 * data sieve buffer, which is used by file drivers that are capable of 5398 * using data sieving. 5399 * 5400 * The data sieve buffer is used when performing I/O on datasets in the 5401 * file. Using a buffer which is large enough to hold several pieces of 5402 * the dataset being read in for hyperslab selections boosts 5403 * performance by quite a bit. 5404 * 5405 * The default value is set to 64KB, indicating that file I/O for raw 5406 * data reads and writes will occur in at least 64KB blocks. Setting 5407 * the value to zero (\TText{0}) with this API function will turn off 5408 * the data sieving, even if the VFL driver attempts to use that 5409 * strategy. 5410 * 5411 * Internally, the library checks the storage sizes of the datasets in 5412 * the file. It picks the smaller one between the size from the file 5413 * access property and the size of the dataset to allocate the sieve 5414 * buffer for the dataset in order to save memory usage. 5415 * 5416 * \version 1.6.0 The \p size parameter has changed from type \TText{hsize_t} to \TText{size_t}. 5417 * 5418 * \since 1.4.0 5419 */ 5420 H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); 5421 /** 5422 * \ingroup FAPL 5423 * 5424 * \brief Sets the size of a contiguous block reserved for small data 5425 * 5426 * \fapl_id{fapl_id} 5427 * \param[in] size Maximum size, in bytes, of the small data block. 5428 The default size is \TText{2048}. 5429 * 5430 * \return \herr_t 5431 * 5432 * \details H5Pset_small_data_block_size() reserves blocks of \p size bytes for the 5433 * contiguous storage of the raw data portion of \Emph{small} datasets. The 5434 * HDF5 library then writes the raw data from small datasets to this 5435 * reserved space, thus reducing unnecessary discontinuities within 5436 * blocks of meta data and improving I/O performance. 5437 * 5438 * A small data block is actually allocated the first time a qualifying 5439 * small dataset is written to the file. Space for the raw data portion 5440 * of this small dataset is suballocated within the small data block. 5441 * The raw data from each subsequent small dataset is also written to 5442 * the small data block until it is filled; additional small data 5443 * blocks are allocated as required. 5444 * 5445 * The HDF5 library employs an algorithm that determines whether I/O 5446 * performance is likely to benefit from the use of this mechanism with 5447 * each dataset as storage space is allocated in the file. A larger 5448 * \p size will result in this mechanism being employed with larger 5449 * datasets. 5450 * 5451 * The small data block size is set as an allocation property in the 5452 * file access property list identified by \p fapl_id. 5453 * 5454 * Setting \p size to zero (\TText{0}) disables the small data block mechanism. 5455 * 5456 * \since 1.4.4 5457 */ 5458 H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); 5459 /** 5460 * \ingroup FAPL 5461 * 5462 * \brief Set the file VOL connector for a file access property list 5463 * 5464 * \fapl_id{plist_id} 5465 * \param[in] new_vol_id VOL connector identifier 5466 * \param[in] new_vol_info Optional VOL information 5467 * 5468 * \return \herr_t 5469 * 5470 * \details H5Pset_vol() sets the VOL connector \p new_vol_id for a file access 5471 * property list \p plist_id using the (optional) VOL information in 5472 * \p new_vol_info. 5473 * 5474 * \since 1.12.0 5475 * 5476 */ 5477 H5_DLL herr_t H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info); 5478 5479 /** 5480 * \ingroup FAPL 5481 * 5482 * \brief Query the capability flags for the VOL connector that will be used 5483 * with this file access property list (FAPL). 5484 * 5485 * \fapl_id{plist_id} 5486 * \param[out] cap_flags Flags that indicate the VOL connector capabilities 5487 * 5488 * \return \herr_t 5489 * 5490 * \details H5Pget_vol_cap_flags() queries the current VOL connector information 5491 * for a FAPL to retrieve the capability flags for the VOL 5492 * connector stack, as will be used by a file open or create 5493 * operation that uses this FAPL. 5494 * 5495 * \note This routine supports the use of the HDF5_VOL_CONNECTOR environment 5496 * variable to override the VOL connector set programmatically for the 5497 * FAPL (with H5Pset_vol). 5498 * 5499 * \note The H5VL_CAP_FLAG_ASYNC flag can be checked to see if asynchronous 5500 * operations are supported by the VOL connector stack. 5501 * 5502 * \since 1.14.0 5503 * 5504 */ 5505 H5_DLL herr_t H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags); 5506 5507 #ifdef H5_HAVE_PARALLEL 5508 /** 5509 * \ingroup GAPL 5510 * 5511 * \brief Sets metadata I/O mode for read operations to be collective or independent (default) 5512 * 5513 * \gacpl_id 5514 * \param[in] is_collective Boolean value indicating whether metadata reads are collective 5515 * (\TText{1}) or independent (\TText{0}). 5516 * Default mode: Independent (\TText{0}) 5517 * 5518 * \return \herr_t 5519 * 5520 * \details H5Pset_all_coll_metadata_ops() sets the metadata I/O mode for read 5521 * operations in the access property list \p plist_id. 5522 * 5523 * When engaging in parallel I/O, all metadata write operations must be 5524 * collective. If \p is_collective is \TText{1}, this property specifies 5525 * that the HDF5 library will perform all metadata read operations 5526 * collectively; if \p is_collective is \TText{0}, such operations may 5527 * be performed independently. 5528 * 5529 * Users must be aware that several HDF5 operations can potentially 5530 * issue metadata reads. These include opening a dataset, datatype, or 5531 * group; reading an attribute; or issuing a \Emph{get info} call such 5532 * as getting information for a group with H5Fget_info(). Collective 5533 * I/O requirements must be kept in mind when issuing such calls in the 5534 * context of parallel I/O. 5535 * 5536 * If this property is collective on a file access property list that 5537 * is used in creating or opening a file, then the HDF5 library will 5538 * assume that all metadata read operations issued on that file 5539 * identifier will be issued collectively from all ranks irrespective 5540 * of the individual setting of a particular operation. If this 5541 * assumption is not adhered to, corruption will be introduced in the 5542 * metadata cache and HDF5's behavior will be undefined. 5543 * 5544 * Alternatively, a user may wish to avoid setting this property 5545 * globally on the file access property list, and individually set it 5546 * on particular object access property lists (dataset, group, link, 5547 * datatype, attribute access property lists) for certain operations. 5548 * This will indicate that only the operations issued with such an 5549 * access property list will be called collectively and other 5550 * operations may potentially be called independently. There are, 5551 * however, several HDF5 operations that can issue metadata reads but 5552 * have no property list in their function signatures to allow passing 5553 * the collective requirement property. For those operations, the only 5554 * option is to set the global collective requirement property on the 5555 * file access property list; otherwise the metadata reads that can be 5556 * triggered from those operations will be done independently by each 5557 * process. 5558 * 5559 * Functions that do not accommodate an access property list but that 5560 * might issue metadata reads are listed in \ref maybe_metadata_reads. 5561 * 5562 * \attention As noted above, corruption will be introduced into the metadata 5563 * cache and HDF5 library behavior will be undefined when both of the following 5564 * conditions exist: 5565 * - A file is created or opened with a file access property list in which the 5566 * collective metadata I/O property is set to \TText{1}. 5567 * - Any function is called that triggers an independent metadata read while the 5568 * file remains open with that file access property list. 5569 * 5570 * \attention An approach that avoids this corruption risk is described above. 5571 * 5572 * \sa_metadata_ops 5573 * 5574 * \since 1.10.0 5575 */ 5576 H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective); 5577 /** 5578 * \ingroup GAPL 5579 * 5580 * \brief Retrieves metadata read mode setting 5581 * 5582 * \gacpl_id 5583 * \param[out] is_collective Pointer to a buffer containing the Boolean value indicating whether metadata 5584 * reads are collective (\TText{>0}) or independent (\TText{0}). 5585 * Default mode: Independent (\TText{0}) 5586 * 5587 * \return \herr_t 5588 * 5589 * \details H5Pget_all_coll_metadata_ops() retrieves the collective metadata read setting from the access 5590 * property list \p plist_id into \p is_collective. 5591 * 5592 * \sa_metadata_ops 5593 * 5594 * \since 1.10.0 5595 */ 5596 H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); 5597 /** 5598 * \ingroup FAPL 5599 * 5600 * \brief Sets metadata write mode to be collective or independent (default) 5601 * 5602 * \fapl_id{plist_id} 5603 * \param[out] is_collective Boolean value indicating whether metadata 5604 * writes are collective (\TText{>0}) or independent (\TText{0}). 5605 * \Emph{Default mode:} Independent (\TText{0}) 5606 * \return \herr_t 5607 * 5608 * \details H5Pset_coll_metadata_write() tells the HDF5 library whether to 5609 * perform metadata writes collectively (1) or independently (0). 5610 * 5611 * If collective access is selected, then on a flush of the metadata 5612 * cache, all processes will divide the metadata cache entries to be 5613 * flushed evenly among themselves and issue a single MPI-IO collective 5614 * write operation. This is the preferred method when the size of the 5615 * metadata created by the application is large. 5616 * 5617 * If independent access is selected, the library uses the default 5618 * method for doing metadata I/O either from process zero or 5619 * independently from each process. 5620 * 5621 * \sa_metadata_ops 5622 * 5623 * \since 1.10.0 5624 */ 5625 H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective); 5626 /** 5627 * \ingroup FAPL 5628 * 5629 * \brief Retrieves metadata write mode setting 5630 * 5631 * \fapl_id{plist_id} 5632 * \param[out] is_collective Pointer to a boolean value indicating whether 5633 * metadata writes are collective (\TText{>0}) or independent (\TText{0}). 5634 * \Emph{Default mode:} Independent (\TText{0}) 5635 * \return \herr_t 5636 * 5637 * \details H5Pget_coll_metadata_write() retrieves the collective metadata write 5638 * setting from the file access property into \p is_collective. 5639 * 5640 * \sa_metadata_ops 5641 * 5642 * \since 1.10.0 5643 */ 5644 H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective); 5645 5646 /** 5647 * \ingroup FAPL 5648 * 5649 * \brief Get the MPI communicator and info 5650 * 5651 * \fapl_id 5652 * \param[out] comm MPI communicator 5653 * \param[out] info MPI info object 5654 * \return \herr_t 5655 * 5656 * \details H5Pget_mpi_params() gets the MPI communicator and info stored in 5657 * the file access property list \p fapl_id. 5658 * 5659 * \since 1.12.0 5660 */ 5661 H5_DLL herr_t H5Pget_mpi_params(hid_t fapl_id, MPI_Comm *comm, MPI_Info *info); 5662 5663 /** 5664 * \ingroup FAPL 5665 * 5666 * \brief Set the MPI communicator and info 5667 * 5668 * \fapl_id 5669 * \param[in] comm MPI communicator 5670 * \param[in] info MPI info object 5671 * \return \herr_t 5672 * 5673 * \details H5Pset_mpi_params() sets the MPI communicator and info stored in 5674 * the file access property list \p fapl_id. 5675 * 5676 * \since 1.12.0 5677 * 5678 */ 5679 H5_DLL herr_t H5Pset_mpi_params(hid_t fapl_id, MPI_Comm comm, MPI_Info info); 5680 #endif /* H5_HAVE_PARALLEL */ 5681 5682 /** 5683 * \ingroup FAPL 5684 * 5685 * \brief Sets the metadata cache image option for a file access property list 5686 * 5687 * \fapl_id{plist_id} 5688 * \param[out] config_ptr Pointer to metadata cache image configuration values 5689 * \return \herr_t 5690 * 5691 * \details H5Pset_mdc_image_config() sets the metadata cache image option with 5692 * configuration values specified by \p config_ptr for the file access 5693 * property list specified in \p plist_id. 5694 * 5695 * #H5AC_cache_image_config_t is defined as follows: 5696 * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip 5697 * \click4more 5698 * 5699 * \par Limitations: While it is an obvious error to request a cache image when 5700 * opening the file read only, it is not in general possible to test for 5701 * this error in the H5Pset_mdc_image_config() call. Rather than fail the 5702 * subsequent file open, the library silently ignores the file image 5703 * request in this case.\n It is also an error to request a cache image on 5704 * a file that does not support superblock extension messages (i.e. a 5705 * superblock version less than 2). As above, it is not always possible to 5706 * detect this error in the H5Pset_mdc_image_config() call, and thus the 5707 * request for a cache image will fail silently in this case as well.\n 5708 * Creation of cache images is currently disabled in parallel -- as above, 5709 * any request for a cache image in this context will fail silently.\n 5710 * Files with cache images may be read in parallel applications, but note 5711 * that the load of the cache image is a collective operation triggered by 5712 * the first operation that accesses metadata after file open (or, if 5713 * persistent free space managers are enabled, on the first allocation or 5714 * deallocation of file space, or read of file space manager status, 5715 * whichever comes first). Thus the parallel process may deadlock if any 5716 * process does not participate in this access.\n 5717 * In long sequences of file closes and opens, infrequently accessed 5718 * metadata can accumulate in the cache image to the point where the cost 5719 * of storing and restoring this metadata exceeds the benefit of retaining 5720 * frequently used metadata in the cache image. When implemented, the 5721 * #H5AC_cache_image_config_t::entry_ageout should address this problem. In 5722 * the interim, not requesting a cache image every n file close/open cycles 5723 * may be an acceptable work around. The choice of \c n will be driven by 5724 * application behavior, but \TText{n = 10} seems a good starting point. 5725 * 5726 * \since 1.10.1 5727 */ 5728 H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); 5729 /** 5730 * \ingroup FAPL 5731 * 5732 * \brief Sets the maximum size for the page buffer and the minimum percentage 5733 * for metadata and raw data pages 5734 * 5735 * \fapl_id{plist_id} 5736 * \param[in] buf_size Maximum size, in bytes, of the page buffer 5737 * \param[in] min_meta_per Minimum metadata percentage to keep in the page buffer 5738 * before allowing pages containing metadata to be evicted (Default is 0) 5739 * \param[in] min_raw_per Minimum raw data percentage to keep in the page buffer 5740 * before allowing pages containing raw data to be evicted (Default is 0) 5741 * \return \herr_t 5742 * 5743 * \details H5Pset_page_buffer_size() sets buf_size, the maximum size in bytes 5744 * of the page buffer. The default value is zero, meaning that page 5745 * buffering is disabled. When a non-zero page buffer size is set, the 5746 * library will enable page buffering if that size is larger or equal 5747 * than a single page size if a paged file space strategy is enabled 5748 * using the functions H5Pset_file_space_strategy() and 5749 * H5Pset_file_space_page_size(). 5750 * 5751 * The page buffer layer captures all I/O requests before they are 5752 * issued to the VFD and "caches" them in fixed sized pages. Once the 5753 * total number of pages exceeds the page buffer size, the library 5754 * evicts pages from the page buffer by writing them to the VFD. At 5755 * file close, the page buffer is flushed writing all the pages to the 5756 * file. 5757 * 5758 * If a non-zero page buffer size is set, and the file space strategy 5759 * is not set to paged or the page size for the file space strategy is 5760 * larger than the page buffer size, the subsequent call to H5Fcreate() 5761 * using the \p plist_id will fail. 5762 * 5763 * \note As of HDF5 1.14.4, this property will be ignored when an existing 5764 * file is being opened and the file space strategy stored in the 5765 * file isn't paged. This was previously a failure. 5766 * 5767 * \note As of HDF5 1.14.4, if a file with a paged file space strategy is 5768 * opened with a page size that is smaller than the file's page size, 5769 * the page cache size will be rounded up to the file's page size. 5770 * This was previously a failure. 5771 * 5772 * The function also allows setting the minimum percentage of pages for 5773 * metadata and raw data to prevent a certain type of data to evict hot 5774 * data of the other type. 5775 * 5776 * \since 1.10.1 5777 * 5778 */ 5779 H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, 5780 unsigned min_raw_per); 5781 5782 /** 5783 * \ingroup FAPL 5784 * 5785 * \brief Relax file integrity checks that may issue errors for some valid files 5786 * 5787 * \fapl_id{plist_id} 5788 * \param[in] flags Relaxed integrity checks flag. Valid values are: 5789 * \li #H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS 5790 * suppresses integrity checks for detecting 5791 * unusually high values for the number of unused bits in 5792 * numeric datatype classes (H5T_INTEGER, H5T_FLOAT, and 5793 * H5T_BITFIELD). Integrity checks are triggered when 5794 * the precision for a datatype (i.e. the number of bits 5795 * containing actual data) is less than half of the 5796 * datatype's size and the datatype is greater than 5797 * 1 byte in size. For example, a datatype with a 5798 * precision of 15 bits and a size of 4 bytes (i.e. 32 bits) 5799 * will issue an error, but a datatype with 17 bits of 5800 * precision and a size of 4 bytes will not issue an 5801 * error, nor will a datatype with a precision of 1, 2, or 5802 * 3 bits and a size of 1 byte issue an error. 5803 * \li #H5F_RFIC_ALL relaxes all integrity checks above. 5804 * 5805 * \return \herr_t 5806 * 5807 * \details Incorrectly encoded or corrupted metadata in a native HDF5 5808 * format file can cause incorrect library behavior when the metadata 5809 * has no checksum. Integrity checks within the library detect these 5810 * circumstances and issue errors when incorrect metadata is found. 5811 * Unfortunately, some of the integrity checks for detecting these 5812 * circumstances may incorrectly issue an error for a valid HDF5 file 5813 * that was intentionally created with these configurations. 5814 * Setting the appropriate flag(s) with this routine will relax the 5815 * file integrity checks for these valid files and suppress errors 5816 * when accessing objects with these configurations. 5817 * 5818 * The library will also issue errors when these configurations are 5819 * used to create objects, preventing applications from unintentionally 5820 * creating them. Setting the appropriate flag with this routine will 5821 * also suppress those errors on creation, although using this routine 5822 * and the appropriate flag(s) will still be required when accessing 5823 * files created with these configurations. 5824 * 5825 * A more complete solution that avoids errors on both object creation 5826 * and access is to use the H5Pset_libver_bounds routine with a low 5827 * bound of at least #H5F_LIBVER_V18 when creating objects with these 5828 * configurations. This will cause the library to checksum a file's 5829 * metadata, allowing accidental data corruption to be correctly 5830 * detected and errors correctly issued without ambiguity. 5831 * 5832 * \since 1.14.4 5833 * 5834 */ 5835 H5_DLL herr_t H5Pset_relax_file_integrity_checks(hid_t plist_id, uint64_t flags); 5836 /** 5837 * \ingroup FAPL 5838 * 5839 * \brief Retrieve relaxed file integrity check flags 5840 * 5841 * \fapl_id{plist_id} 5842 * \param[out] flags Relaxed file integrity check flags 5843 * 5844 * \return \herr_t 5845 * 5846 * \details H5Pget_relax_file_integrity_checks() retrieves the relaxed file 5847 * integrity check value into \p flags for the file access property 5848 * list specified in \p plist_id. 5849 * 5850 * \since 1.14.4 5851 * 5852 */ 5853 H5_DLL herr_t H5Pget_relax_file_integrity_checks(hid_t plist_id, uint64_t *flags); 5854 5855 /* Dataset creation property list (DCPL) routines */ 5856 /** 5857 * \ingroup DCPL 5858 * 5859 * \brief Determines whether fill value is defined 5860 * 5861 * \dcpl_id{plist} 5862 * \param[out] status Status of fill value in property list 5863 * 5864 * \return \herr_t 5865 * 5866 * \details H5Pfill_value_defined() determines whether a fill value is 5867 * defined in the dataset creation property list \p plist. Valid 5868 * values returned in status are as follows: 5869 * 5870 * <table> 5871 * <tr> 5872 * <td>#H5D_FILL_VALUE_UNDEFINED</td> 5873 * <td>Fill value is undefined.</td> 5874 * </tr> 5875 * <tr> 5876 * <td>#H5D_FILL_VALUE_DEFAULT</td> 5877 * <td>Fill value is the library default.</td> 5878 * </tr> 5879 * <tr> 5880 * <td>#H5D_FILL_VALUE_USER_DEFINED</td> 5881 * <td>Fill value is defined by the application.</td> 5882 * </tr> 5883 * </table> 5884 * 5885 * \since 1.6.0 5886 * 5887 */ 5888 H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); 5889 /** 5890 * \ingroup DCPL 5891 * 5892 * \brief Retrieves the timing for storage space allocation 5893 * 5894 * \dcpl_id{plist_id} 5895 * \param[out] alloc_time The timing setting for allocating dataset 5896 * storage space 5897 * 5898 * \return \herr_t 5899 * 5900 * \details H5Pget_alloc_time() retrieves the timing for allocating storage 5901 * space for a dataset's raw data. This property is set in the 5902 * dataset creation property list \p plist_id. The timing setting 5903 * is returned in \p alloc_time as one of the following values: 5904 * 5905 * <table> 5906 * <tr> 5907 * <td>#H5D_ALLOC_TIME_DEFAULT<br /> </td> 5908 * <td>Uses the default allocation time, based on the dataset 5909 * storage method. <br />See the \p alloc_time description in 5910 * H5Pset_alloc_time() for default allocation times for 5911 * various storage methods.</td> 5912 * </tr> 5913 * <tr> 5914 * <td>#H5D_ALLOC_TIME_EARLY</td> 5915 * <td>All space is allocated when the dataset is created.</td> 5916 * </tr> 5917 * <tr> 5918 * <td>#H5D_ALLOC_TIME_INCR</td> 5919 * <td>Space is allocated incrementally as data is written 5920 * to the dataset.</td> 5921 * </tr> 5922 * <tr> 5923 * <td>#H5D_ALLOC_TIME_LATE</td> 5924 * <td>All space is allocated when data is first written to 5925 * the dataset.</td> 5926 * </tr> 5927 * </table> 5928 * 5929 * \note H5Pget_alloc_time() is designed to work in concert with the 5930 * dataset fill value and fill value write time properties, set 5931 * with the functions H5Pget_fill_value() and H5Pget_fill_time(). 5932 * 5933 * \since 1.6.0 5934 * 5935 */ 5936 H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); 5937 /** 5938 * \ingroup DCPL 5939 * 5940 * \brief Retrieves the size of chunks for the raw data of a chunked 5941 * layout dataset 5942 * 5943 * \dcpl_id{plist_id} 5944 * \param[in] max_ndims Size of the \p dims array 5945 * \param[out] dim Array to store the chunk dimensions 5946 * 5947 * \return Returns chunk dimensionality if successful; 5948 * otherwise returns a negative value. 5949 * 5950 * \details H5Pget_chunk() retrieves the size of chunks for the raw data 5951 * of a chunked layout dataset. This function is only valid for 5952 * dataset creation property lists. At most, \p max_ndims elements 5953 * of \p dim will be initialized. 5954 * 5955 * \since 1.0.0 5956 * 5957 */ 5958 H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/); 5959 /** 5960 * 5961 * \ingroup DCPL 5962 * 5963 * \brief Retrieves the edge chunk option setting from a dataset creation 5964 * property list 5965 * 5966 * \dcpl_id{plist_id} 5967 * \param[out] opts Edge chunk option flag. Valid values are described in 5968 * H5Pset_chunk_opts(). The option status can be 5969 * retrieved using the bitwise AND operator ( & ). For 5970 * example, the expression 5971 * (opts&#H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) will 5972 * evaluate to #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS if 5973 * that option has been enabled. Otherwise, it will 5974 * evaluate to 0 (zero). 5975 * 5976 * \return \herr_t 5977 * 5978 * \details H5Pget_chunk_opts() retrieves the edge chunk option setting 5979 * stored in the dataset creation property list \p plist_id. 5980 * 5981 * \since 1.10.0 5982 * 5983 */ 5984 H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); 5985 /** 5986 * \ingroup DCPL 5987 * 5988 * \brief Retrieves the setting for whether or not to create minimized 5989 * dataset object headers 5990 * 5991 * \dcpl_id 5992 * \param[out] minimize Flag indicating whether the library will or will 5993 * not create minimized dataset object headers 5994 * 5995 * \return \herr_t 5996 * 5997 * \details H5Pget_dset_no_attrs_hint() retrieves the 5998 * <i>no dataset attributes</i> hint setting for the dataset 5999 * creation property list \p dcpl_id. This setting is used to 6000 * inform the library to create minimized dataset object headers 6001 * when true. The setting value is returned in the boolean pointer 6002 * \p minimize. 6003 * 6004 * \since 1.10.5 6005 * 6006 */ 6007 H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); 6008 /** 6009 * \ingroup DCPL 6010 * 6011 * \brief Returns information about an external file 6012 * 6013 * \dcpl_id{plist_id} 6014 * \param[in] idx External file index 6015 * \param[in] name_size Maximum length of \p name array 6016 * \param[out] name Name of the external file 6017 * \param[out] offset Pointer to a location to return an offset value 6018 * \param[out] size Pointer to a location to return the size of the 6019 * external file data 6020 * 6021 * \return \herr_t 6022 * 6023 * \details H5Pget_external() returns information about an external file. 6024 * The external file is specified by its index, \p idx, which 6025 * is a number from zero to N-1, where N is the value returned 6026 * by H5Pget_external_count(). At most \p name_size characters 6027 * are copied into the \p name array. If the external file name 6028 * is longer than \p name_size with the null terminator, the 6029 * return value is not null terminated (similar to strncpy()). 6030 * 6031 * If \p name_size is zero or \p name is the null pointer, the 6032 * external file name is not returned. If \p offset or \p size 6033 * are null pointers then the corresponding information is not 6034 * returned. 6035 * 6036 * \note On Windows, off_t is typically a 32-bit signed long value, which 6037 * limits the valid offset that can be returned to 2 GiB. 6038 * 6039 * \version 1.6.4 \p idx parameter type changed to unsigned. 6040 * \since 1.0.0 6041 * 6042 */ 6043 H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, 6044 off_t *offset /*out*/, hsize_t *size /*out*/); 6045 /** 6046 * \ingroup DCPL 6047 * 6048 * \brief Returns the number of external files for a dataset 6049 * 6050 * \dcpl_id{plist_id} 6051 * 6052 * \return Returns the number of external files if successful; otherwise 6053 * returns a negative value. 6054 * 6055 * \details H5Pget_external_count() returns the number of external files 6056 * for the specified dataset. 6057 * 6058 * \since 1.0.0 6059 * 6060 */ 6061 H5_DLL int H5Pget_external_count(hid_t plist_id); 6062 /** 6063 * \ingroup DCPL 6064 * 6065 * \brief Retrieves the time when fill values are written to a dataset 6066 * 6067 * \dcpl_id{plist_id} 6068 * \param[out] fill_time Setting for the timing of writing fill values to 6069 * the dataset 6070 * 6071 * \return \herr_t 6072 * 6073 * \details H5Pget_fill_time() examines the dataset creation property list 6074 * \p plist_id to determine when fill values are to be written to 6075 * a dataset. Valid values returned in \p fill_time are as 6076 * follows: 6077 * 6078 * <table> 6079 * <tr> 6080 * <td>#H5D_FILL_TIME_IFSET</td> 6081 * <td>Fill values are written to the dataset when storage 6082 * space is allocated only if there is a user-defined fill 6083 * value, i.e., one set with H5Pset_fill_value(). (Default) 6084 * </td> 6085 * </tr> 6086 * <tr> 6087 * <td>#H5D_FILL_TIME_ALLOC</td> 6088 * <td>Fill values are written to the dataset when storage 6089 * space is allocated.</td> 6090 * </tr> 6091 * <tr> 6092 * <td>#H5D_FILL_TIME_NEVER</td> 6093 * <td>Fill values are never written to the dataset.</td> 6094 * </tr> 6095 * </table> 6096 * 6097 * \note H5Pget_fill_time() is designed to work in coordination with the 6098 * dataset fill value and dataset storage allocation time properties, 6099 * retrieved with the functions H5Pget_fill_value() and 6100 * H5Pget_alloc_time().type == H5FD_MEM_DRAW 6101 * 6102 * \since 1.6.0 6103 * 6104 */ 6105 H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/); 6106 /** 6107 * \ingroup DCPL 6108 * 6109 * \brief Retrieves a dataset fill value 6110 * 6111 * \dcpl_id{plist_id} 6112 * \param[in] type_id Datatype identifier for the value passed via 6113 * \p value 6114 * \param[out] value Pointer to buffer to contain the returned 6115 * fill value 6116 * 6117 * \return \herr_t 6118 * 6119 * \details H5Pget_fill_value() returns the dataset fill value defined in 6120 * the dataset creation property list \p plist_id. The fill value 6121 * is returned through the \p value pointer and will be converted 6122 * to the datatype specified by \p type_id. This datatype may 6123 * differ from the fill value datatype in the property list, but 6124 * the HDF5 library must be able to convert between the two 6125 * datatypes. 6126 * 6127 * If the fill value is undefined, i.e., set to NULL in the 6128 * property list, H5Pget_fill_value() will return an error. 6129 * H5Pfill_value_defined() should be used to check for this 6130 * condition before H5Pget_fill_value() is called. 6131 * 6132 * Memory must be allocated by the calling application. 6133 * 6134 * \note H5Pget_fill_value() is designed to coordinate with the dataset 6135 * storage allocation time and fill value write time properties, 6136 * which can be retrieved with the functions H5Pget_alloc_time() 6137 * and H5Pget_fill_time(), respectively. 6138 * 6139 * \since 1.0.0 6140 * 6141 */ 6142 H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/); 6143 /** 6144 * \ingroup DCPL 6145 * 6146 * \brief Returns the layout of the raw data for a dataset 6147 * 6148 * \dcpl_id{plist_id} 6149 * 6150 * \return Returns the layout type (a non-negative value) of a dataset 6151 * creation property list if successful. Valid return values are: 6152 * - #H5D_COMPACT: Raw data is stored in the object header in the 6153 * file. 6154 * - #H5D_CONTIGUOUS: Raw data is stored separately from the object 6155 * header in one contiguous chunk in the file. 6156 * - #H5D_CHUNKED: Raw data is stored separately from the object 6157 * header in chunks in separate locations in the 6158 * file. 6159 * - #H5D_VIRTUAL: Raw data is drawn from multiple datasets in 6160 * different files. 6161 * \return 6162 * Otherwise, returns a negative value indicating failure. 6163 * 6164 * \details H5Pget_layout() returns the layout of the raw data for a 6165 * dataset. This function is only valid for dataset creation 6166 * property lists. 6167 * 6168 * Note that a compact storage layout may affect writing data to 6169 * the dataset with parallel applications. See the H5Dwrite() 6170 * documentation for details. 6171 * 6172 * \version 1.10.0 #H5D_VIRTUAL added in this release. 6173 * 6174 * \since 1.0.0 6175 * 6176 */ 6177 H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); 6178 /** 6179 * \ingroup DCPL 6180 * 6181 * \brief Gets the number of mappings for the virtual dataset 6182 * 6183 * \dcpl_id 6184 * \param[out] count The number of mappings 6185 * 6186 * \return \herr_t 6187 * 6188 * \details H5Pget_virtual_count() gets the number of mappings for a 6189 * virtual dataset that has the creation property list specified 6190 * by \p dcpl_id. 6191 * 6192 * \see_virtual 6193 * 6194 * \since 1.10.0 6195 * 6196 */ 6197 H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); 6198 /** 6199 * \ingroup DCPL 6200 * 6201 * \brief Gets the name of a source dataset used in the mapping 6202 * 6203 * \dcpl_id 6204 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6205 * greater and less than \p count 6206 * (0 ≤ \p index < \p count), where \p count is the 6207 * number of mappings returned by H5Pget_virtual_count(). 6208 * \param[out] name A buffer containing the name of the source dataset 6209 * \param[in] size The size, in bytes, of the \p name buffer. Must be the 6210 * size of the dataset name in bytes plus 1 for a NULL 6211 * terminator 6212 * 6213 * \return Returns the length of the dataset name if successful; 6214 * otherwise returns a negative value. 6215 * 6216 * \details H5Pget_virtual_dsetname() takes the dataset creation property 6217 * list for the virtual dataset, \p dcpl_id, the mapping index, 6218 * \p index, the size of the dataset name for a source dataset, 6219 * \p size, and retrieves the name of the source dataset used in 6220 * the mapping. 6221 * 6222 * Up to \p size characters of the dataset name are returned in 6223 * \p name; additional characters, if any, are not returned to 6224 * the user application. 6225 * 6226 * \details_namelen{dataset,H5Pget_virtual_dsetname} 6227 * 6228 * \see_virtual 6229 * 6230 * \since 1.10.0 6231 * 6232 */ 6233 H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); 6234 /** 6235 * \ingroup DCPL 6236 * 6237 * \brief Gets the filename of a source dataset used in the mapping 6238 * 6239 * \dcpl_id 6240 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6241 * greater and less than \p count 6242 * (0 ≤ \p index < \p count), where \p count is the 6243 * number of mappings returned by H5Pget_virtual_count(). 6244 * \param[out] name A buffer containing the name of the file containing 6245 * the source dataset 6246 * \param[in] size The size, in bytes, of the name buffer. Must be the 6247 * size of the filename in bytes plus 1 for a NULL 6248 * terminator 6249 * 6250 * \return Returns the length of the filename if successful; otherwise 6251 * returns a negative value. 6252 * 6253 * \details H5Pget_virtual_filename() takes the dataset creation property 6254 * list for the virtual dataset, \p dcpl_id, the mapping index, 6255 * \p index, the size of the filename for a source dataset, 6256 * \p size, and retrieves the name of the file for a source dataset 6257 * used in the mapping. 6258 * 6259 * Up to \p size characters of the filename are returned in 6260 * \p name; additional characters, if any, are not returned to 6261 * the user application. 6262 * 6263 * \details_namelen{file,H5Pget_virtual_filename} 6264 * 6265 * \see_virtual 6266 * 6267 * \since 1.10.0 6268 * 6269 */ 6270 H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); 6271 /** 6272 * \ingroup DCPL 6273 * 6274 * \brief Gets a dataspace identifier for the selection within the source 6275 * dataset used in the mapping 6276 * 6277 * \dcpl_id 6278 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6279 * greater and less than \p count 6280 * (0 ≤ \p index < \p count), where \p count is the number 6281 * of mappings returned by H5Pget_virtual_count(). 6282 * 6283 * \return \hid_t{valid dataspace identifier} 6284 * 6285 * \details H5Pget_virtual_srcspace() takes the dataset creation property 6286 * list for the virtual dataset, \p dcpl_id, and the mapping 6287 * index, \p index, and returns a dataspace identifier for the 6288 * selection within the source dataset used in the mapping. 6289 * 6290 * \see_virtual 6291 * 6292 * \since 1.10.0 6293 * 6294 */ 6295 H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); 6296 /** 6297 * \ingroup DCPL 6298 * 6299 * \brief Gets a dataspace identifier for the selection within the virtual 6300 * dataset used in the mapping 6301 * 6302 * \dcpl_id 6303 * \param[in] index Mapping index. The value of \p index is 0 (zero) or 6304 * greater and less than \p count 6305 * (0 ≤ \p index < \p count), where \p count is the number 6306 * of mappings returned by H5Pget_virtual_count() 6307 * 6308 * \return \hid_t{valid dataspace identifier} 6309 * 6310 * \details H5Pget_virtual_vspace() takes the dataset creation property 6311 * list for the virtual dataset, \p dcpl_id, and the mapping 6312 * index, \p index, and returns a dataspace identifier for the 6313 * selection within the virtual dataset used in the mapping. 6314 * 6315 * \see_virtual 6316 * 6317 * \since 1.10.0 6318 * 6319 */ 6320 H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); 6321 /** 6322 * \ingroup DCPL 6323 * 6324 * \brief Sets the timing for storage space allocation 6325 * 6326 * \dcpl_id{plist_id} 6327 * \param[in] alloc_time When to allocate dataset storage space 6328 * 6329 * \return \herr_t 6330 * 6331 * \details H5Pset_alloc_time() sets up the timing for the allocation of 6332 * storage space for a dataset's raw data. This property is set 6333 * in the dataset creation property list \p plist_id. Timing is 6334 * specified in \p alloc_time with one of the following values: 6335 * 6336 * <table> 6337 * <tr> 6338 * <td>#H5D_ALLOC_TIME_DEFAULT</td> 6339 * <td>Allocate dataset storage space at the default time<br /> 6340 * (Defaults differ by storage method.)</td> 6341 * </tr> 6342 * <tr> 6343 * <td>#H5D_ALLOC_TIME_EARLY</td> 6344 * <td>Allocate all space when the dataset is created<br /> 6345 * (Default for compact datasets.)</td> 6346 * </tr> 6347 * <tr> 6348 * <td>#H5D_ALLOC_TIME_INCR</td> 6349 * <td>Allocate space incrementally, as data is written to 6350 * the dataset<br />(Default for chunked storage datasets.) 6351 * 6352 * \li Chunked datasets: Storage space allocation for each 6353 * chunk is deferred until data is written to the chunk. 6354 * \li Contiguous datasets: Incremental storage space 6355 * allocation for contiguous data is treated as late 6356 * allocation. 6357 * \li Compact datasets: Incremental allocation is not 6358 * allowed with compact datasets; H5Pset_alloc_time() 6359 * will return an error.</td> 6360 * </tr> 6361 * <tr> 6362 * <td>#H5D_ALLOC_TIME_LATE</td> 6363 * <td>Allocate all space when data is first written to the 6364 * dataset<br /> 6365 * (Default for contiguous datasets.)</td> 6366 * </tr> 6367 * </table> 6368 * 6369 * \note H5Pset_alloc_time() is designed to work in concert with the 6370 * dataset fill value and fill value write time properties, set 6371 * with the functions H5Pset_fill_value() and H5Pset_fill_time(). 6372 * 6373 * \note See H5Dcreate() for further cross-references. 6374 * 6375 * \since 1.6.0 6376 * 6377 */ 6378 H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); 6379 /** 6380 * \ingroup DCPL 6381 * 6382 * \brief Sets the size of the chunks used to store a chunked layout 6383 * dataset 6384 * 6385 * \dcpl_id{plist_id} 6386 * \param[in] ndims The number of dimensions of each chunk 6387 * \param[in] dim An array defining the size, in dataset elements, of 6388 * each chunk 6389 * 6390 * \return \herr_t 6391 * \details H5Pset_chunk() sets the size of the chunks used to store a 6392 * chunked layout dataset. This function is only valid for dataset 6393 * creation property lists. 6394 * 6395 * The \p ndims parameter currently must be the same size as the 6396 * rank of the dataset. 6397 * 6398 * The values of the \p dim array define the size of the chunks 6399 * to store the dataset's raw data. The unit of measure for \p dim 6400 * values is dataset elements. 6401 * 6402 * As a side-effect of this function, the layout of the dataset is 6403 * changed to #H5D_CHUNKED, if it is not already so set. 6404 * 6405 * \note Chunk size cannot exceed the size of a fixed-size dataset. For 6406 * example, a dataset consisting of a 5x4 fixed-size array cannot be 6407 * defined with 10x10 chunks. Chunk maximums: 6408 * - The maximum number of elements in a chunk is 2<sup>32</sup>-1 which 6409 * is equal to 4,294,967,295. If the number of elements in a chunk is 6410 * set via H5Pset_chunk() to a value greater than 2<sup>32</sup>-1, 6411 * then H5Pset_chunk() will fail. 6412 * - The maximum size for any chunk is 4GB. If a chunk that is larger 6413 * than 4GB attempts to be written with H5Dwrite(), then H5Dwrite() 6414 * will fail. 6415 * 6416 * \see H5Pset_layout(), H5Dwrite() 6417 * 6418 * \since 1.0.0 6419 * 6420 */ 6421 H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]); 6422 /** 6423 * \ingroup DCPL 6424 * 6425 * \brief Sets the edge chunk option in a dataset creation property list 6426 * 6427 * \dcpl_id{plist_id} 6428 * \param[in] opts Edge chunk option flag. Valid values are: 6429 * \li #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS 6430 * When enabled, filters are not applied to partial 6431 * edge chunks. When disabled, partial edge chunks are 6432 * filtered. Enabling this option will improve 6433 * performance when appending to the dataset and, when 6434 * compression filters are used, prevent reallocation 6435 * of these chunks. Datasets created with this option 6436 * enabled will be inaccessible with HDF5 library 6437 * versions before Release 1.10. Default: \e Disabled 6438 * \li 0 (zero) Disables option; partial edge chunks 6439 * will be compressed. 6440 * 6441 * \return \herr_t 6442 * 6443 * \details H5Pset_chunk_opts() sets the edge chunk option in the 6444 * dataset creation property list \p dcpl_id. 6445 * 6446 * The available option is detailed in the parameters section. 6447 * Only chunks that are not completely filled by the dataset's 6448 * dataspace are affected by this option. Such chunks are 6449 * referred to as partial edge chunks. 6450 * 6451 * \b Motivation: H5Pset_chunk_opts() is used to specify storage 6452 * options for chunks on the edge of a dataset's dataspace. This 6453 * capability allows the user to tune performance in cases where 6454 * the dataset size may not be a multiple of the chunk size and 6455 * the handling of partial edge chunks can impact performance. 6456 * 6457 * \since 1.10.0 6458 * 6459 */ 6460 H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); 6461 /** 6462 * \ingroup DCPL 6463 * 6464 * \brief Sets the flag to create minimized dataset object headers 6465 * 6466 * \dcpl_id 6467 * \param[in] minimize Flag for indicating whether or not a dataset's 6468 * object header will be minimized 6469 * 6470 * \return \herr_t 6471 * 6472 * \details H5Pset_dset_no_attrs_hint() sets the no dataset attributes 6473 * hint setting for the dataset creation property list \p dcpl_id. 6474 * Datasets created with the dataset creation property list 6475 * \p dcpl_id will have their object headers minimized if the 6476 * boolean flag \p minimize is set to true. By setting \p minimize 6477 * to true, the library expects that no attributes will be added 6478 * to the dataset. Attributes can be added, but they are appended 6479 * with a continuation message, which can reduce performance. 6480 * 6481 * This setting interacts with H5Fset_dset_no_attrs_hint(): if 6482 * either is set to true, then the created dataset's object header 6483 * will be minimized. 6484 * 6485 * \since 1.10.5 6486 * 6487 */ 6488 H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); 6489 /** 6490 * \ingroup DCPL 6491 * 6492 * \brief Adds an external file to the list of external files 6493 * 6494 * \dcpl_id{plist_id} 6495 * \param[in] name Name of an external file 6496 * \param[in] offset Offset, in bytes, from the beginning of the file to 6497 * the location in the file where the data starts 6498 * \param[in] size Number of bytes reserved in the file for the data 6499 * 6500 * \return \herr_t 6501 * 6502 * \details The first call to H5Pset_external() sets the external 6503 * storage property in the property list, thus designating that 6504 * the dataset will be stored in one or more non-HDF5 file(s) 6505 * external to the HDF5 file. This call also adds the file 6506 * \p name as the first file in the list of external files. 6507 * Subsequent calls to the function add the named file as the 6508 * next file in the list. 6509 * 6510 * If a dataset is split across multiple files, then the files 6511 * should be defined in order. The total size of the dataset is 6512 * the sum of the \p size arguments for all the external files. 6513 * If the total size is larger than the size of a dataset then 6514 * the dataset can be extended (provided the data space also 6515 * allows the extending). 6516 * 6517 * The \p size argument specifies the number of bytes reserved 6518 * for data in the external file. If \p size is set to 6519 * #H5F_UNLIMITED, the external file can be of unlimited size 6520 * and no more files can be added to the external files list. 6521 * If \p size is set to 0 (zero), no external file will actually 6522 * be created. 6523 * 6524 * All of the external files for a given dataset must be specified 6525 * with H5Pset_external() before H5Dcreate() is called to create 6526 * the dataset. If one these files does not exist on the system 6527 * when H5Dwrite() is called to write data to it, the library 6528 * will create the file. 6529 * 6530 * \note On Windows, off_t is typically a 32-bit signed long value, which 6531 * limits the valid offset that can be set to 2 GiB. 6532 * 6533 * \since 1.0.0 6534 * 6535 */ 6536 H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); 6537 /** 6538 * \ingroup DCPL 6539 * 6540 * \brief Sets the time when fill values are written to a dataset 6541 * 6542 * \dcpl_id{plist_id} 6543 * \param[in] fill_time When to write fill values to a dataset 6544 * 6545 * \return \herr_t 6546 * 6547 * \details H5Pset_fill_time() sets up the timing for writing fill values 6548 * to a dataset. This property is set in the dataset creation 6549 * property list \p plist_id. Timing is specified in \p fill_time 6550 * with one of the following values: 6551 * 6552 * <table> 6553 * <tr> 6554 * <td>#H5D_FILL_TIME_IFSET</td> 6555 * <td>Write fill values to the dataset when storage space is 6556 * allocated only if there is a user-defined fill value, 6557 * i.e.,one set with H5Pset_fill_value(). (Default)</td> 6558 * </tr> 6559 * <tr> 6560 * <td>#H5D_FILL_TIME_ALLOC</td> 6561 * <td>Write fill values to the dataset when storage space is 6562 * allocated.</td> 6563 * </tr> 6564 * <tr> 6565 * <td>#H5D_FILL_TIME_NEVER</td> 6566 * <td>Never write fill values to the dataset.</td> 6567 * </tr> 6568 * </table> 6569 * 6570 * \note H5Pset_fill_time() is designed for coordination with the dataset 6571 * fill value and dataset storage allocation time properties, set 6572 * with the functions H5Pset_fill_value() and H5Pset_alloc_time(). 6573 * See H5Dcreate() for further cross-references. 6574 * 6575 * \since 1.6.0 6576 * 6577 */ 6578 H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); 6579 /** 6580 * \ingroup DCPL 6581 * 6582 * \brief Sets the fill value for a dataset 6583 * 6584 * \dcpl_id{plist_id} 6585 * \param[in] type_id Datatype of \p value 6586 * \param[in] value Pointer to buffer containing value to use as 6587 * fill value 6588 * 6589 * \return \herr_t 6590 * 6591 * \details H5Pset_fill_value() sets the fill value for a dataset in the 6592 * dataset creation property list. \p value is interpreted as 6593 * being of datatype \p type_id. This datatype may differ from 6594 * that of the dataset, but the HDF5 library must be able to 6595 * convert \p value to the dataset datatype when the dataset is 6596 * created. 6597 * 6598 * The default fill value is 0 (zero), which is interpreted 6599 * according to the actual dataset datatype. 6600 * 6601 * Setting \p value to NULL indicates that the fill value is to 6602 * be undefined. 6603 * 6604 * \note Applications sometimes write data only to portions of an allocated 6605 * dataset. It is often useful in such cases to fill the unused space 6606 * with a known fill value. This function allows the user application 6607 * to set that fill value; the functions H5Dfill() and 6608 * H5Pset_fill_time(), respectively, provide the ability to apply the 6609 * fill value on demand or to set up its automatic application. 6610 * 6611 * \note A fill value should be defined so that it is appropriate for the 6612 * application. While the HDF5 default fill value is 0 (zero), it is 6613 * often appropriate to use another value. It might be useful, for 6614 * example, to use a value that is known to be impossible for the 6615 * application to legitimately generate. 6616 * 6617 * \note H5Pset_fill_value() is designed to work in concert with 6618 * H5Pset_alloc_time() and H5Pset_fill_time(). H5Pset_alloc_time() 6619 * and H5Pset_fill_time() govern the timing of dataset storage 6620 * allocation and fill value write operations and can be important in 6621 * tuning application performance. 6622 * 6623 * \note See H5Dcreate() for further cross-references. 6624 * 6625 * \since 1.0.0 6626 * 6627 */ 6628 H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); 6629 /** 6630 * \ingroup DCPL 6631 * 6632 * \brief Sets up use of the shuffle filter 6633 * 6634 * \dcpl_id{plist_id} 6635 * 6636 * \return \herr_t 6637 * 6638 * \par_compr_note 6639 * 6640 * \details H5Pset_shuffle() sets the shuffle filter, #H5Z_FILTER_SHUFFLE, 6641 * in the dataset creation property list \p plist_id. The shuffle 6642 * filter de-interlaces a block of data by reordering the bytes. 6643 * All the bytes from one consistent byte position of each data 6644 * element are placed together in one block; all bytes from a 6645 * second consistent byte position of each data element are placed 6646 * together a second block; etc. For example, given three data 6647 * elements of a 4-byte datatype stored as 012301230123, shuffling 6648 * will re-order data as 000111222333. This can be a valuable step 6649 * in an effective compression algorithm because the bytes in each 6650 * byte position are often closely related to each other and 6651 * putting them together can increase the compression ratio. 6652 * 6653 * As implied above, the primary value of the shuffle filter lies 6654 * in its coordinated use with a compression filter; it does not 6655 * provide data compression when used alone. When the shuffle 6656 * filter is applied to a dataset immediately prior to the use of 6657 * a compression filter, the compression ratio achieved is often 6658 * superior to that achieved by the use of a compression filter 6659 * without the shuffle filter. 6660 * 6661 * \since 1.6.0 6662 * 6663 */ 6664 H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); 6665 /** 6666 * \ingroup DCPL 6667 * 6668 * \brief Sets the type of storage used to store the raw data for a dataset 6669 * 6670 * \dcpl_id{plist_id} 6671 * \param[in] layout Type of storage layout for raw data 6672 * 6673 * \return \herr_t 6674 * \details H5Pset_layout() sets the type of storage used to store the raw 6675 * data for a dataset. This function is only valid for dataset 6676 * creation property lists. 6677 * 6678 * Valid values for \p layout are: 6679 * - #H5D_COMPACT: Store raw data in the dataset object header 6680 * in file. This should only be used for datasets 6681 * with small amounts of raw data. The raw data 6682 * size limit is 64K (65520 bytes). Attempting 6683 * to create a dataset with raw data larger than 6684 * this limit will cause the H5Dcreate() call to 6685 * fail. 6686 * - #H5D_CONTIGUOUS: Store raw data separately from the object 6687 * header in one large chunk in the file. 6688 * - #H5D_CHUNKED: Store raw data separately from the object header 6689 * as chunks of data in separate locations in 6690 * the file. 6691 * - #H5D_VIRTUAL: Draw raw data from multiple datasets in 6692 * different files. 6693 * 6694 * Note that a compact storage layout may affect writing data to 6695 * the dataset with parallel applications. See the note in 6696 * H5Dwrite() documentation for details. 6697 * \version 1.10.0 #H5D_VIRTUAL added in this release. 6698 * \since 1.0.0 6699 * 6700 */ 6701 H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); 6702 /** 6703 * \ingroup DCPL 6704 * 6705 * \brief Sets up the use of the N-Bit filter 6706 * 6707 * \dcpl_id{plist_id} 6708 * 6709 * \return \herr_t 6710 * 6711 * \par_compr_note 6712 * 6713 * \details H5Pset_nbit() sets the N-Bit filter, #H5Z_FILTER_NBIT, in the 6714 * dataset creation property list \p plist_id. 6715 * 6716 * The HDF5 user can create an N-Bit datatype with the following 6717 * code: 6718 * <pre> 6719 * hid_t nbit_datatype = H5Tcopy(H5T_STD_I32LE); 6720 * H5Tset_precision(nbit_datatype, 16); 6721 * H5Tset_offset(nbit_datatype, 4); 6722 * </pre> 6723 * 6724 * In memory, one value of the N-Bit datatype in the above example 6725 * will be stored on a little-endian machine as follows: 6726 * 6727 * <table> 6728 * <tr> 6729 * <td>byte 3</td> 6730 * <td>byte 2</td> 6731 * <td>byte 1</td> 6732 * <td>byte 0</td> 6733 * </tr> 6734 * <tr> 6735 * <td> ???????? </td> 6736 * <td> ????SPPP </td> 6737 * <td> PPPPPPPP </td> 6738 * <td> PPPP???? </td> 6739 * </tr> 6740 * </table> 6741 * Note: S - sign bit, P - significant bit, ? - padding bit; For 6742 * signed integer, the sign bit is included in the precision. 6743 * 6744 * When data of the above datatype is stored on disk using the 6745 * N-bit filter, all padding bits are chopped off and only 6746 * significant bits are stored. The values on disk will be 6747 * something like: 6748 * 6749 * <table> 6750 * <tr> 6751 * <td>1st value</td> 6752 * <td>2nd value</td> 6753 * <td>...</td> 6754 * </tr> 6755 * <tr> 6756 * <td>SPPPPPPPPPPPPPPP</td> 6757 * <td>SPPPPPPPPPPPPPPP</td> 6758 * <td>...</td> 6759 * </tr> 6760 * </table> 6761 * The N-Bit filter is used effectively for compressing data of 6762 * an N-Bit datatype as well as a compound and an array 6763 * datatype with N-Bit fields. However, the datatype classes of 6764 * the N-Bit datatype or the N-Bit field of the compound 6765 * datatype or the array datatype are limited to integer or 6766 * floating-point. 6767 * 6768 * The N-Bit filter supports complex situations where a compound 6769 * datatype contains member(s) of a compound datatype or an array 6770 * datatype that has a compound datatype as the base type. 6771 * However, it does not support the situation where an array 6772 * datatype has a variable-length or variable-length string as 6773 * its base datatype. The filter does support the situation where 6774 * a variable-length or variable-length string is a member of a 6775 * compound datatype. 6776 * 6777 * The N-Bit filter allows all other HDF5 datatypes (such as 6778 * time, string, bitfield, opaque, reference, enum, and variable 6779 * length) to pass through as a no-op. 6780 * 6781 * Like other I/O filters supported by the HDF5 library, 6782 * application using the N-Bit filter must store data with 6783 * chunked storage. 6784 * 6785 * By nature, the N-Bit filter should not be used together with 6786 * other I/O filters. 6787 * 6788 * \version 1.8.8 Fortran subroutine introduced in this release. 6789 * 6790 * \since 1.8.0 6791 * 6792 */ 6793 H5_DLL herr_t H5Pset_nbit(hid_t plist_id); 6794 /** 6795 * \ingroup DCPL 6796 * 6797 * \brief Sets up the use of the scale-offset filter 6798 * 6799 * \dcpl_id{plist_id} 6800 * \param[in] scale_type Flag indicating compression method 6801 * \param[in] scale_factor Parameter related to scale. Must be 6802 * non-negative 6803 * 6804 * \return \herr_t 6805 * 6806 * \par_compr_note 6807 * 6808 * \details H5Pset_scaleoffset() sets the scale-offset filter, 6809 * #H5Z_FILTER_SCALEOFFSET, for a dataset. 6810 * 6811 * Generally speaking, scale-offset compression performs a scale and/or 6812 * offset operation on each data value and truncates the resulting 6813 * value to a minimum number of bits (MinBits) before storing it. The 6814 * current scale-offset filter supports integer and floating-point 6815 * datatypes. 6816 * 6817 * For an integer datatype, the parameter \p scale_type should be set 6818 * to #H5Z_SO_INT (2). The parameter \p scale_factor denotes MinBits. 6819 * If the user sets it to H5Z_SO_INT_MINBITS_DEFAULT (0), the filter 6820 * will calculate MinBits. If \p scale_factor is set to a positive 6821 * integer, the filter does not do any calculation and just uses the 6822 * number as MinBits. However, if the user gives a MinBits that is less 6823 * than what would be generated by the filter, the compression will be 6824 * lossy. Also, the MinBits supplied by the user cannot exceed the 6825 * number of bits to store one value of the dataset datatype. 6826 * 6827 * For a floating-point datatype, the filter adopts the GRiB data 6828 * packing mechanism, which offers two alternate methods: E-scaling and 6829 * D-scaling. Both methods are lossy compression. If the parameter 6830 * \p scale_type is set to #H5Z_SO_FLOAT_DSCALE (0), the filter will 6831 * use the D-scaling method; if it is set to #H5Z_SO_FLOAT_ESCALE (1), 6832 * the filter will use the E-scaling method. Since only the D-scaling 6833 * method is implemented, \p scale_type should be set to 6834 * #H5Z_SO_FLOAT_DSCALE or 0. 6835 * 6836 * When the D-scaling method is used, the original data is "D" scaled 6837 * — multiplied by 10 to the power of \p scale_factor, and the 6838 * "significant" part of the value is moved to the left of the decimal 6839 * point. Care should be taken in setting the decimal \p scale_factor 6840 * so that the integer part will have enough precision to contain the 6841 * appropriate information of the data value. For example, if 6842 * \p scale_factor is set to 2, the number 104.561 will be 10456.1 6843 * after "D" scaling. The last digit 1 is not "significant" and is 6844 * thrown off in the process of rounding. The user should make sure that 6845 * after "D" scaling and rounding, the data values are within the range 6846 * that can be represented by the integer (same size as the 6847 * floating-point type). 6848 * 6849 * Valid values for scale_type are as follows: 6850 * 6851 * <table> 6852 * <tr> 6853 * <td>#H5Z_SO_FLOAT_DSCALE (0)</td> 6854 * <td>Floating-point type, using variable MinBits method</td> 6855 * </tr> 6856 * <tr> 6857 * <td>#H5Z_SO_FLOAT_ESCALE (1)</td> 6858 * <td>Floating-point type, using fixed MinBits method</td> 6859 * </tr> 6860 * <tr> 6861 * <td>#H5Z_SO_INT (2)</td> 6862 * <td>Integer type</td> 6863 * </tr> 6864 * </table> 6865 * 6866 * The meaning of \p scale_factor varies according to the value 6867 * assigned to \p scale_type: 6868 * 6869 * <table> 6870 * <tr> 6871 * <th>\p scale_type value</th> 6872 * <th>\p scale_factor description</th> 6873 * </tr> 6874 * <tr> 6875 * <td>#H5Z_SO_FLOAT_DSCALE</td> 6876 * <td>Denotes the decimal scale factor for D-scaling and can be 6877 * positive, negative or zero. This is the current 6878 * implementation of the library.</td> 6879 * </tr> 6880 * <tr> 6881 * <td>#H5Z_SO_FLOAT_ESCALE</td> 6882 * <td>Denotes MinBits for E-scaling and must be a positive integer. 6883 * This is not currently implemented by the library.</td> 6884 * </tr> 6885 * <tr> 6886 * <td>#H5Z_SO_INT</td> 6887 * <td>Denotes MinBits and it should be a positive integer or 6888 * #H5Z_SO_INT_MINBITS_DEFAULT (0). If it is less than 0, the 6889 * library will reset it to 0 since it is not implemented. 6890 * </td> 6891 * </tr> 6892 * </table> 6893 * Like other I/O filters supported by the HDF5 library, an 6894 * application using the scale-offset filter must store data with 6895 * chunked storage. 6896 * 6897 * \version 1.8.8 Fortran90 subroutine introduced in this release. 6898 * 6899 * \since 1.8.0 6900 * 6901 */ 6902 H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); 6903 /** 6904 * \ingroup DCPL 6905 * 6906 * \brief Sets up use of the SZIP compression filter 6907 * 6908 * \dcpl_id{plist_id} 6909 * \param[in] options_mask A bit-mask conveying the desired SZIP options; 6910 * Valid values are #H5_SZIP_EC_OPTION_MASK and 6911 * #H5_SZIP_NN_OPTION_MASK. 6912 * \param[in] pixels_per_block The number of pixels or data elements in each 6913 * data block (max #H5_SZIP_MAX_PIXELS_PER_BLOCK) 6914 * 6915 * \return \herr_t 6916 * 6917 * \par_compr_note 6918 * 6919 * \details H5Pset_szip() sets an SZIP compression filter, #H5Z_FILTER_SZIP, 6920 * for a dataset. SZIP is a compression method designed for use with 6921 * scientific data. 6922 * 6923 * Before proceeding, all users should review the “Limitations” 6924 * section below. 6925 * 6926 * Users familiar with SZIP outside the HDF5 context may benefit 6927 * from reviewing the Note “For Users Familiar with SZIP in Other 6928 * Contexts” below. 6929 * 6930 * In the text below, the term pixel refers to an HDF5 data element. 6931 * This terminology derives from SZIP compression's use with image 6932 * data, where pixel referred to an image pixel. 6933 * 6934 * The SZIP \p bits_per_pixel value (see Note, below) is automatically 6935 * set, based on the HDF5 datatype. SZIP can be used with atomic 6936 * datatypes that may have size of 8, 16, 32, or 64 bits. 6937 * Specifically, a dataset with a datatype that is 8-, 16-, 32-, or 6938 * 64-bit signed or unsigned integer; char; or 32- or 64-bit float 6939 * can be compressed with SZIP. See Note, below, for further 6940 * discussion of the SZIP \p bits_per_pixel setting. 6941 * 6942 * SZIP options are passed in an options mask, \p options_mask, 6943 * as follows. 6944 * 6945 * <table> 6946 * <tr> 6947 * <th>Option</th> 6948 * <th>Description (Mutually exclusive; select one)</th> 6949 * </tr> 6950 * <tr> 6951 * <td>#H5_SZIP_EC_OPTION_MASK</td> 6952 * <td>Selects entropy coding method</td> 6953 * </tr> 6954 * <tr> 6955 * <td>#H5_SZIP_NN_OPTION_MASK</td> 6956 * <td>Selects nearest neighbor preprocessing followed by entropy coding</td> 6957 * </tr> 6958 * </table> 6959 * 6960 * The following guidelines can be used in determining which 6961 * option to select: 6962 * 6963 * - The entropy coding method, the EC option specified by 6964 * #H5_SZIP_EC_OPTION_MASK, is best suited for data that has been 6965 * processed. The EC method works best for small numbers. 6966 * - The nearest neighbor coding method, the NN option specified 6967 * by #H5_SZIP_NN_OPTION_MASK, preprocesses the data then the 6968 * applies EC method as above. 6969 * 6970 * Other factors may affect results, but the above criteria 6971 * provides a good starting point for optimizing data compression. 6972 * 6973 * SZIP compresses data block by block, with a user-tunable block 6974 * size. This block size is passed in the parameter 6975 * \p pixels_per_block and must be even and not greater than 32, 6976 * with typical values being 8, 10, 16, or 32. This parameter 6977 * affects compression ratio; the more pixel values vary, the 6978 * smaller this number should be to achieve better performance. 6979 * 6980 * In HDF5, compression can be applied only to chunked datasets. 6981 * If \p pixels_per_block is bigger than the total number of 6982 * elements in a dataset chunk, H5Pset_szip() will succeed but 6983 * the subsequent call to H5Dcreate() will fail; the conflict 6984 * can be detected only when the property list is used. 6985 * 6986 * To achieve optimal performance for SZIP compression, it is 6987 * recommended that a chunk's fastest-changing dimension be equal 6988 * to N times \p pixels_per_block where N is the maximum number of 6989 * blocks per scan line allowed by the SZIP library. In the 6990 * current version of SZIP, N is set to 128. 6991 * 6992 * SZIP compression is an optional HDF5 filter. 6993 * 6994 * \b Limitations: 6995 * 6996 * - SZIP compression cannot be applied to compound, array, 6997 * variable-length, enumeration, or any other user-defined 6998 * datatypes. If an SZIP filter is set in a dataset creation 6999 * property list used to create a dataset containing a 7000 * non-allowed datatype, the call to H5Dcreate() will fail; the 7001 * conflict can be detected only when the property list is used. 7002 * - Users should be aware that there are factors that affect one's 7003 * rights and ability to use SZIP compression by reviewing the 7004 * SZIP copyright notice. (This limitation does not apply to the 7005 * libaec library). 7006 * 7007 * \note <b> For Users Familiar with SZIP in Other Contexts: </b> 7008 * 7009 * \note The following notes are of interest primarily to those who have 7010 * used SZIP compression outside of the HDF5 context. 7011 * In non-HDF5 applications, SZIP typically requires that the user 7012 * application supply additional parameters: 7013 * - \p pixels_in_object, the number of pixels in the object to 7014 * be compressed 7015 * - \p bits_per_pixel, the number of bits per pixel 7016 * - \p pixels_per_scanline, the number of pixels per scan line 7017 * 7018 * \note These values need not be independently supplied in the HDF5 7019 * environment as they are derived from the datatype and dataspace, 7020 * which are already known. In particular, HDF5 sets 7021 * \p pixels_in_object to the number of elements in a chunk and 7022 * \p bits_per_pixel to the size of the element or pixel datatype. 7023 * 7024 * \note The following algorithm is used to set \p pixels_per_scanline: 7025 * - If the size of a chunk's fastest-changing dimension, size, 7026 * is greater than 4K, set \p pixels_per_scanline to 128 times 7027 * \p pixels_per_block. 7028 * - If size is less than 4K but greater than \p pixels_per_block, 7029 * set \p pixels_per_scanline to the minimum of size and 128 7030 * times \p pixels_per_block. 7031 * - If size is less than \p pixels_per_block but greater than the 7032 * number elements in the chunk, set \p pixels_per_scanline to 7033 * the minimum of the number elements in the chunk and 128 times 7034 * \p pixels_per_block. 7035 * 7036 * \note The HDF5 datatype may have precision that is less than the full 7037 * size of the data element, e.g., an 11-bit integer can be defined 7038 * using H5Tset_precision(). To a certain extent, SZIP can take 7039 * advantage of the precision of the datatype to improve compression: 7040 * - If the HDF5 datatype size is 24-bit or less and the offset of 7041 * the bits in the HDF5 datatype is zero (see H5Tset_offset() or 7042 * H5Tget_offset()), the data is the in lowest N bits of the data 7043 * element. In this case, the SZIP \p bits_per_pixel is set to the 7044 * precision of the HDF5 datatype. 7045 * - If the offset is not zero, the SZIP \p bits_per_pixel will be 7046 * set to the number of bits in the full size of the data element. 7047 * - If the HDF5 datatype precision is 25-bit to 32-bit, the SZIP 7048 * \p bits_per_pixel will be set to 32. 7049 * - If the HDF5 datatype precision is 33-bit to 64-bit, the SZIP 7050 * \p bits_per_pixel will be set to 64. 7051 * 7052 * \note HDF5 always modifies the options mask provided by the user to set up 7053 * usage of RAW_OPTION_MASK, ALLOW_K13_OPTION_MASK, and one of 7054 * LSB_OPTION_MASK or MSB_OPTION_MASK, depending on endianness of the 7055 * datatype. 7056 * 7057 * \since 1.6.0 7058 * 7059 */ 7060 H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); 7061 7062 /** 7063 * \ingroup DCPL 7064 * 7065 * \brief Sets the mapping between virtual and source datasets 7066 * 7067 * \dcpl_id 7068 * \param[in] vspace_id The dataspace identifier with the selection within the 7069 * virtual dataset applied, possibly an unlimited selection 7070 * \param[in] src_file_name The name of the HDF5 file where the source dataset is 7071 * located or a \TText{"."} (period) for a source dataset in the same 7072 * file. The file might not exist yet. The name can be specified using 7073 * a C-style \c printf statement as described below. 7074 * \param[in] src_dset_name The path to the HDF5 dataset in the file specified by 7075 * \p src_file_name. The dataset might not exist yet. The dataset name 7076 * can be specified using a C-style \c printf statement as described below. 7077 * \param[in] src_space_id The source dataset's dataspace identifier with a 7078 * selection applied, possibly an unlimited selection 7079 * \return \herr_t 7080 * 7081 * \details H5Pset_virtual() maps elements of the virtual dataset (VDS) 7082 * described by the virtual dataspace identifier \p vspace_id to the 7083 * elements of the source dataset described by the source dataset 7084 * dataspace identifier \p src_space_id. The source dataset is 7085 * identified by the name of the file where it is located, 7086 * \p src_file_name, and the name of the dataset, \p src_dset_name. 7087 * 7088 * \par C-style \c printf Formatting Statements: 7089 * C-style \c printf formatting allows a pattern to be specified in the name 7090 * of a source file or dataset. Strings for the file and dataset names are 7091 * treated as literals except for the following substitutions: 7092 * <table> 7093 * <tr> 7094 * <td>\TText{"%%"}</td> 7095 * <td>Replaced with a single \TText{"%"} (percent) character.</td> 7096 * </tr> 7097 * <tr> 7098 * <td><code>"%<d>b"</code></td> 7099 * <td>Where <code>"<d>"</code> is the virtual dataset dimension axis (0-based) 7100 * and \TText{"b"} indicates that the block count of the selection in that 7101 * dimension should be used. The full expression (for example, \TText{"%0b"}) 7102 * is replaced with a single numeric value when the mapping is evaluated at 7103 * VDS access time. Example code for many source and virtual dataset mappings 7104 * is available in the "Examples of Source to Virtual Dataset Mapping" 7105 * chapter in the 7106 * <a href="https://\RFCURL/HDF5-VDS-requirements-use-cases-2014-12-10.pdf"> 7107 * RFC: HDF5 Virtual Dataset</a>. 7108 * </td> 7109 * </tr> 7110 * </table> 7111 * If the printf form is used for the source file or dataset names, the 7112 * selection in the source dataset's dataspace must be fixed-size. 7113 * 7114 * \par Source File Resolutions: 7115 * When a source dataset residing in a different file is accessed, the 7116 * library will search for the source file \p src_file_name as described 7117 * below: 7118 * \li If \p src_file_name is a \TText{"."} (period) then it refers to the 7119 * file containing the virtual dataset. 7120 * \li If \p src_file_name is a relative pathname, the following steps are 7121 * performed: 7122 * - The library will get the prefix(es) set in the environment 7123 * variable \c HDF5_VDS_PREFIX and will try to prepend each prefix 7124 * to \p src_file_name to form a new \p src_file_name. If the new 7125 * \p src_file_name does not exist or if \c HDF5_VDS_PREFIX is not 7126 * set, the library will get the prefix set via H5Pset_virtual_prefix() 7127 * and prepend it to \p src_file_name to form a new \p src_file_name. 7128 * If the new \p src_file_name does not exist or no prefix is being 7129 * set by H5Pset_virtual_prefix() then the path of the file containing 7130 * the virtual dataset is obtained. This path can be the absolute path 7131 * or the current working directory plus the relative path of that 7132 * file when it is created/opened. The library will prepend this path 7133 * to \p src_file_name to form a new \p src_file_name. 7134 * - If the new \p src_file_name does not exist, then the library will 7135 * look for \p src_file_name and will return failure/success accordingly. 7136 * \li If \p src_file_name is an absolute pathname, the library will first 7137 * try to find \p src_file_name. If \p src_file_name does not exist, 7138 * \p src_file_name is stripped of directory paths to form a new 7139 * \p src_file_name. The search for the new \p src_file_name then follows 7140 * the same steps as described above for a relative pathname. See 7141 * examples below illustrating how \p src_file_name is stripped to form 7142 * a new \p src_file_name. 7143 * \par 7144 * Note that \p src_file_name is considered to be an absolute pathname when 7145 * the following condition is true: 7146 * \li For Unix, the first character of \p src_file_name is a slash 7147 * (\TText{/}).\n For example, consider a \p src_file_name of 7148 * \TText{/tmp/A.h5}. If that source file does not exist, the new 7149 * \p src_file_name after stripping will be \TText{A.h5}. 7150 * \li For Windows, there are 6 cases: 7151 * 1. \p src_file_name is an absolute drive with absolute pathname.\n 7152 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7153 * If that source file does not exist, the new \p src_file_name 7154 * after stripping will be \TText{A.h5}. 7155 * 2. \p src_file_name is an absolute pathname without specifying 7156 * drive name.\n For example, consider a \p src_file_name of 7157 * \TText{/tmp/A.h5}. If that source file does not exist, the new 7158 * \p src_file_name after stripping will be \TText{A.h5}. 7159 * 3. \p src_file_name is an absolute drive with relative 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{tmp/A.h5}. 7163 * 4. \p src_file_name is in UNC (Uniform Naming Convention) format 7164 * with server name, share name, and 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 * 5. \p src_file_name is in Long UNC (Uniform Naming Convention) 7169 * format with server name, share name, and pathname.\n 7170 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7171 * If that source file does not exist, the new \p src_file_name 7172 * after stripping will be \TText{A.h5}. 7173 * 6. \p src_file_name is in Long UNC (Uniform Naming Convention) 7174 * format with an absolute drive and an absolute pathname.\n 7175 * For example, consider a \p src_file_name of \TText{/tmp/A.h5}. 7176 * If that source file does not exist, the new \p src_file_name 7177 * after stripping will be \TText{A.h5} 7178 * 7179 * \see <a href="https://\RFCURL/HDF5-VDS-requirements-use-cases-2014-12-10.pdf"> 7180 * Virtual Dataset Overview</a> 7181 * 7182 * \see_virtual 7183 * 7184 * \version 1.10.2 A change was made to the method of searching for VDS source files. 7185 * \since 1.10.0 7186 * 7187 */ 7188 H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, 7189 const char *src_dset_name, hid_t src_space_id); 7190 7191 /* Dataset access property list (DAPL) routines */ 7192 /** 7193 * \ingroup DAPL 7194 * 7195 * \brief Retrieves the values of the append property that is set up in 7196 * the dataset access property list 7197 * 7198 * \dapl_id 7199 * \param[in] dims The number of elements for \p boundary 7200 * \param[in] boundary The dimension sizes used to determine the boundary 7201 * \param[in] func The user-defined callback function 7202 * \param[in] udata The user-defined input data 7203 * 7204 * \return \herr_t 7205 * 7206 * \details H5Pget_append_flush() obtains the following information 7207 * from the dataset access property list, \p dapl_id. 7208 * 7209 * \p boundary consists of the sizes set up in the access 7210 * property list that are used to determine when a dataset 7211 * dimension size hits the boundary. Only at most \p dims 7212 * boundary sizes are retrieved, and \p dims will not exceed 7213 * the corresponding value that is set in the property list. 7214 * 7215 * \p func is the user-defined callback function to invoke when 7216 * a dataset's appended dimension size reaches a boundary and 7217 * \p udata is the user-defined input data for the callback 7218 * function. 7219 * 7220 * \since 1.10.0 7221 * 7222 */ 7223 H5_DLL herr_t H5Pget_append_flush(hid_t dapl_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func, 7224 void **udata); 7225 /** 7226 * \ingroup DAPL 7227 * 7228 * \brief Retrieves the raw data chunk cache parameters 7229 * 7230 * \dapl_id 7231 * \param[out] rdcc_nslots Number of chunk slots in the raw data chunk 7232 * cache hash table 7233 * \param[out] rdcc_nbytes Total size of the raw data chunk cache, in 7234 * bytes 7235 * \param[out] rdcc_w0 Preemption policy 7236 * 7237 * \return \herr_t 7238 * 7239 * \details H5Pget_chunk_cache() retrieves the number of chunk slots in 7240 * the raw data chunk cache hash table, the maximum possible 7241 * number of bytes in the raw data chunk cache, and the 7242 * preemption policy value. 7243 * 7244 * These values are retrieved from a dataset access property 7245 * list. If the values have not been set on the property list, 7246 * then values returned will be the corresponding values from 7247 * a default file access property list. 7248 * 7249 * Any (or all) pointer arguments may be null pointers, in which 7250 * case the corresponding data is not returned. 7251 * 7252 * \since 1.8.3 7253 * 7254 */ 7255 H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, 7256 double *rdcc_w0 /*out*/); 7257 /** 7258 * \ingroup DAPL 7259 * 7260 * \brief Retrieves the prefix for external raw data storage files as set 7261 * in the dataset access property list 7262 * 7263 * \dapl_id 7264 * \param[in,out] prefix Dataset external storage prefix in UTF-8 or 7265 * ASCII (\em Path and \em filename must be ASCII 7266 * on Windows systems.) 7267 * \param[in] size Size of prefix buffer in bytes 7268 * 7269 * \return Returns the size of \p prefix and the prefix string will be 7270 * stored in \p prefix if successful. 7271 * Otherwise returns a negative value and the contents of \p prefix 7272 * will be undefined. 7273 * 7274 * \details H5Pget_efile_prefix() retrieves the file system path prefix 7275 * for locating external files associated with a dataset that 7276 * uses external storage. This will be the value set with 7277 * H5Pset_efile_prefix() or the HDF5 library's default. 7278 * 7279 * The value of \p size is the size in bytes of the prefix, 7280 * including the NULL terminator. If the size is unknown, a 7281 * preliminary H5Pget_elink_prefix() call with the pointer 7282 * \p prefix set to NULL will return the size of the prefix 7283 * without the NULL terminator. 7284 * 7285 * The \p prefix buffer must be allocated by the caller. In a 7286 * call that retrieves the actual prefix, that buffer must be 7287 * of the size specified in \p size. 7288 * 7289 * \note See H5Pset_efile_prefix() for a more complete description of 7290 * file location behavior and for notes on the use of the 7291 * HDF5_EXTFILE_PREFIX environment variable. 7292 * 7293 * \since 1.8.17 7294 * 7295 */ 7296 H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); 7297 /** 7298 * \ingroup DAPL 7299 * 7300 * \brief Retrieves prefix applied to VDS source file paths 7301 * 7302 * \dapl_id 7303 * \param[out] prefix Prefix applied to VDS source file paths 7304 * \param[in] size Size of prefix, including null terminator 7305 * 7306 * \return If successful, returns a non-negative value specifying the size 7307 * in bytes of the prefix without the NULL terminator; otherwise 7308 * returns a negative value. 7309 * 7310 * \details H5Pget_virtual_prefix() retrieves the prefix applied to the 7311 * path of any VDS source files traversed. 7312 * 7313 * When an VDS source file is traversed, the prefix is retrieved 7314 * from the dataset access property list \p dapl_id, returned 7315 * in the user-allocated buffer pointed to by \p prefix, and 7316 * prepended to the filename stored in the VDS virtual file, set 7317 * with H5Pset_virtual(). 7318 * 7319 * The size in bytes of the prefix, including the NULL terminator, 7320 * is specified in \p size. If \p size is unknown, a preliminary 7321 * H5Pget_virtual_prefix() call with the pointer \p prefix set to 7322 * NULL will return the size of the prefix without the NULL 7323 * terminator. 7324 * 7325 * \see_virtual 7326 * 7327 * \since 1.10.2 7328 * 7329 */ 7330 H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); 7331 /** 7332 * \ingroup DAPL 7333 * 7334 * \brief Returns the maximum number of missing source files and/or datasets 7335 * with the printf-style names when getting the extent for an unlimited 7336 * virtual dataset 7337 * 7338 * \dapl_id 7339 * \param[out] gap_size Maximum number of the files and/or datasets 7340 * allowed to be missing for determining the extent 7341 * of an unlimited virtual dataset with printf-style 7342 * mappings. (\em Default: 0) 7343 * 7344 * \return \herr_t 7345 * 7346 * \details H5Pget_virtual_printf_gap() returns the maximum number of 7347 * missing printf-style files and/or datasets for determining the 7348 * extent of an unlimited virtual dataaset, \p gap_size, using 7349 * the access property list for the virtual dataset, \p dapl_id. 7350 * 7351 * The default library value for \p gap_size is 0 (zero). 7352 * 7353 * \since 1.10.0 7354 * 7355 */ 7356 H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t dapl_id, hsize_t *gap_size); 7357 /** 7358 * \ingroup DAPL 7359 * 7360 * \brief Retrieves the view of a virtual dataset accessed with 7361 * \p dapl_id 7362 * 7363 * \dapl_id 7364 * \param[out] view The flag specifying the view of the virtual dataset. 7365 * 7366 * \return \herr_t 7367 * 7368 * \details H5Pget_virtual_view() takes the virtual dataset access property 7369 * list, \p dapl_id, and retrieves the flag, \p view, set by the 7370 * H5Pset_virtual_view() call. 7371 * 7372 * \see_virtual 7373 * 7374 * \since 1.10.0 7375 * 7376 */ 7377 H5_DLL herr_t H5Pget_virtual_view(hid_t dapl_id, H5D_vds_view_t *view); 7378 /** 7379 * \ingroup DAPL 7380 * 7381 * \brief Sets two actions to perform when the size of a dataset's 7382 * dimension being appended reaches a specified boundary 7383 * 7384 * \dapl_id 7385 * \param[in] ndims The number of elements for boundary 7386 * \param[in] boundary The dimension sizes used to determine the boundary 7387 * \param[in] func The user-defined callback function 7388 * \param[in] udata The user-defined input data 7389 * 7390 * \return \herr_t 7391 * 7392 * \details H5Pset_append_flush() sets the following two actions to 7393 * perform for a dataset associated with the dataset access 7394 * property list \p dapl_id: 7395 * 7396 * \li Call the callback function \p func set in the property 7397 * list 7398 * \li Flush the dataset associated with the dataset access 7399 * property list 7400 * 7401 * When a user is appending data to a dataset via H5DOappend() 7402 * and the dataset's newly extended dimension size hits a 7403 * specified boundary, the library will perform the first action 7404 * listed above. Upon return from the callback function, the 7405 * library will then perform the second action listed above and 7406 * return to the user. If no boundary is hit or set, the two 7407 * actions above are not invoked. 7408 * 7409 * The specified boundary is indicated by the parameter 7410 * \p boundary. It is a 1-dimensional array with \p ndims 7411 * elements, which should be the same as the rank of the 7412 * dataset's dataspace. While appending to a dataset along a 7413 * particular dimension index via H5Dappend(), the library 7414 * determines a boundary is reached when the resulting dimension 7415 * size is divisible by \p boundary[index]. A zero value for 7416 * \p boundary[index] indicates no boundary is set for that 7417 * dimension index. 7418 * 7419 * The setting of this property will apply only for a chunked 7420 * dataset with an extendible dataspace. A dataspace is extendible 7421 * when it is defined with either one of the following: 7422 * 7423 * \li A dataspace with fixed current and maximum dimension sizes 7424 * \li A dataspace with at least one unlimited dimension for its 7425 * maximum dimension size 7426 * 7427 * When creating or opening a chunked dataset, the library will 7428 * check whether the boundary as specified in the access property 7429 * list is set up properly. The library will fail the dataset 7430 * create or open if the following conditions are true: 7431 * 7432 * \li \p ndims, the number of elements for boundary, is not the 7433 * same as the rank of the dataset's dataspace. 7434 * \li A non-zero boundary value is specified for a non-extendible 7435 * dimension. 7436 * 7437 * The callback function \p func must conform to the following 7438 * prototype: 7439 * \snippet H5Dpublic.h H5D_append_cb_t_snip 7440 * 7441 * The parameters of the callback function, per the above 7442 * prototype, are defined as follows: 7443 * 7444 * \li \p dataset_id is the dataset identifier. 7445 * \li \p cur_dims is the dataset's current dimension sizes when 7446 * a boundary is hit. 7447 * \li \p user_data is the user-defined input data. 7448 * 7449 * \since 1.10.0 7450 * 7451 */ 7452 H5_DLL herr_t H5Pset_append_flush(hid_t dapl_id, unsigned ndims, const hsize_t boundary[], 7453 H5D_append_cb_t func, void *udata); 7454 /** 7455 * \ingroup DAPL 7456 * 7457 * \brief Sets the raw data chunk cache parameters 7458 * 7459 * \dapl_id 7460 * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk 7461 * cache for this dataset. Increasing this value 7462 * reduces the number of cache collisions, but 7463 * slightly increases the memory used. Due to the 7464 * hashing strategy, this value should ideally be a 7465 * prime number. As a rule of thumb, this value 7466 * should be at least 10 times the number of chunks 7467 * that can fit in \p rdcc_nbytes bytes. For maximum 7468 * performance, this value should be set 7469 * approximately 100 times that number of chunks. 7470 * The default value is 521. If the value passed is 7471 * #H5D_CHUNK_CACHE_NSLOTS_DEFAULT, then the 7472 * property will not be set on \p dapl_id and the 7473 * parameter will come from the file access 7474 * property list used to open the file. 7475 * \param[in] rdcc_nbytes The total size of the raw data chunk cache for 7476 * this dataset. In most cases increasing this 7477 * number will improve performance, as long as 7478 * you have enough free memory. 7479 * The default size is 1 MB. If the value passed is 7480 * #H5D_CHUNK_CACHE_NBYTES_DEFAULT, then the 7481 * property will not be set on \p dapl_id and the 7482 * parameter will come from the file access 7483 * property list. 7484 * \param[in] rdcc_w0 The chunk preemption policy for this dataset. 7485 * This must be between 0 and 1 inclusive and 7486 * indicates the weighting according to which chunks 7487 * which have been fully read or written are 7488 * penalized when determining which chunks to flush 7489 * from cache. A value of 0 means fully read or 7490 * written chunks are treated no differently than 7491 * other chunks (the preemption is strictly LRU) 7492 * while a value of 1 means fully read or written 7493 * chunks are always preempted before other chunks. 7494 * If your application only reads or writes data 7495 * once, this can be safely set to 1. Otherwise, 7496 * this should be set lower, depending on how often 7497 * you re-read or re-write the same data. 7498 * The default value is 0.75. If the value passed is 7499 * #H5D_CHUNK_CACHE_W0_DEFAULT, then the property 7500 * will not be set on \p dapl_id and the parameter 7501 * will come from the file access property list. 7502 * 7503 * \return \herr_t 7504 * 7505 * \details H5Pset_chunk_cache() sets the number of elements, the total 7506 * number of bytes, and the preemption policy value in the raw 7507 * data chunk cache on a dataset access property list. After 7508 * calling this function, the values set in the property list 7509 * will override the values in the file's file access property 7510 * list. 7511 * 7512 * The raw data chunk cache inserts chunks into the cache 7513 * by first computing a hash value using the address of a chunk, 7514 * then using that hash value as the chunk's index into the table 7515 * of cached chunks. The size of this hash table, i.e., and the 7516 * number of possible hash values, is determined by the 7517 * \p rdcc_nslots parameter. If a different chunk in the cache 7518 * has the same hash value, this causes a collision, which 7519 * reduces efficiency. If inserting the chunk into cache would 7520 * cause the cache to be too big, then the cache is pruned 7521 * according to the \p rdcc_w0 parameter. 7522 * 7523 * \b Motivation: H5Pset_chunk_cache() is used to adjust the chunk 7524 * cache parameters on a per-dataset basis, as opposed to a global 7525 * setting for the file using H5Pset_cache(). The optimum chunk 7526 * cache parameters may vary widely with different data layout and 7527 * access patterns, so for optimal performance they must be set 7528 * individually for each dataset. It may also be beneficial to 7529 * reduce the size of the chunk cache for datasets whose 7530 * performance is not important in order to save memory space. 7531 * 7532 * \b Example \b Usage: The following code sets the chunk cache to 7533 * use a hash table with 12421 elements and a maximum size of 7534 * 16 MB, while using the preemption policy specified for the 7535 * entire file: 7536 * \TText{ 7537 * H5Pset_chunk_cache(dapl_id, 12421, 16*1024*1024, 7538 * H5D_CHUNK_CACHE_W0_DEFAULT);} 7539 * 7540 * \b Usage \b Notes: The chunk cache size is a property for 7541 * accessing a dataset and is not stored with a dataset or a 7542 * file. To guarantee the same chunk cache settings each time 7543 * the dataset is opened, call H5Dopen() with a dataset access 7544 * property list where the chunk cache size is set by calling 7545 * H5Pset_chunk_cache() for that property list. The property 7546 * list can be used for multiple accesses in the same 7547 * application. 7548 * 7549 * For files where the same chunk cache size will be 7550 * appropriate for all or most datasets, H5Pset_cache() can 7551 * be called with a file access property list to set the 7552 * chunk cache size for accessing all datasets in the file. 7553 * 7554 * Both methods can be used in combination, in which case 7555 * the chunk cache size set by H5Pset_cache() will apply 7556 * except for specific datasets where H5Dopen() is called 7557 * with dataset property list with the chunk cache size 7558 * set by H5Pset_chunk_cache(). 7559 * 7560 * In the absence of any cache settings, H5Dopen() will 7561 * by default create a 1 MB chunk cache for the opened 7562 * dataset. If this size happens to be appropriate, no 7563 * call will be needed to either function to set the 7564 * chunk cache size. 7565 * 7566 * It is also possible that a change in access pattern 7567 * for later access to a dataset will change the 7568 * appropriate chunk cache size. 7569 * 7570 * \since 1.8.3 7571 * 7572 */ 7573 H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); 7574 /** 7575 * \ingroup DAPL 7576 * 7577 * \brief Sets the external dataset storage file prefix in the dataset 7578 * access property list 7579 * 7580 * \dapl_id 7581 * \param[in] prefix Dataset external storage prefix in UTF-8 or ASCII 7582 * (<em>Path and filename must be ASCII on Windows systems.</em>) 7583 * 7584 * \return \herr_t 7585 * 7586 * \details H5Pset_efile_prefix() sets the prefix used to locate raw data 7587 * files for a dataset that uses external storage. This prefix 7588 * can provide either an absolute path or a relative path to the 7589 * external files. 7590 * 7591 * H5Pset_efile_prefix() is used in conjunction with 7592 * H5Pset_external() to control the behavior of the HDF5 library 7593 * when searching for the raw data files associated with a dataset 7594 * that uses external storage: 7595 * 7596 * \li The default behavior of the library is to search for the 7597 * dataset's external storage raw data files in the current 7598 * working directory of the program. 7599 * \li If the prefix is set to an absolute path, the target 7600 * directory will be searched for the dataset's external 7601 * storage raw data files. 7602 * \li If the prefix is set to a relative path, the target 7603 * directory, relative to the current working directory, will 7604 * be searched for the dataset's external storage raw data 7605 * files. 7606 * \li If the prefix is set to a relative path that begins with 7607 * the special token ${ORIGIN}, that directory, relative to 7608 * the HDF5 file containing the dataset, will be searched for 7609 * the dataset's external storage raw data files. 7610 * 7611 * The HDF5_EXTFILE_PREFIX environment variable can be used to 7612 * override the above behavior (the environment variable 7613 * supersedes the API call). Setting the variable to a path 7614 * string and calling H5Dcreate() or H5Dopen() is the equivalent 7615 * of calling H5Pset_efile_prefix() and calling the same create 7616 * or open function. The environment variable is checked at the 7617 * time of the create or open action and copied so it can be 7618 * safely changed after the H5Dcreate() or H5Dopen() call. 7619 * 7620 * Calling H5Pset_efile_prefix() with \p prefix set to NULL or 7621 * the empty string returns the search path to the default. The 7622 * result would be the same as if H5Pset_efile_prefix() had never 7623 * been called. 7624 * 7625 * \note If the external file prefix is not an absolute path and the HDF5 7626 * file is moved, the external storage files will also need to be 7627 * moved so they can be accessed at the new location. 7628 * 7629 * \note As stated above, the use of the HDF5_EXTFILE_PREFIX environment 7630 * variable overrides any property list setting. 7631 * H5Pset_efile_prefix() and H5Pget_efile_prefix(), being property 7632 * functions, set and retrieve only the property list setting; they 7633 * are unaware of the environment variable. 7634 * 7635 * \note On Windows, the prefix must be an ASCII string since the Windows 7636 * standard C library's I/O functions cannot handle UTF-8 file names. 7637 * 7638 * \since 1.8.17 7639 * 7640 */ 7641 H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix); 7642 /** 7643 * \ingroup DAPL 7644 * 7645 * \brief Sets prefix to be applied to VDS source file paths 7646 * 7647 * \dapl_id 7648 * \param[in] prefix Prefix to be applied to VDS source file paths 7649 * 7650 * \return \herr_t 7651 * 7652 * \details H5Pset_virtual_prefix() sets the prefix to be applied to the 7653 * path of any VDS source files traversed. The prefix is prepended 7654 * to the filename stored in the VDS virtual file, set with 7655 * H5Pset_virtual(). 7656 * 7657 * The prefix is specified in the user-allocated buffer \p prefix 7658 * and set in the dataset access property list \p dapl_id. The 7659 * buffer should not be freed until the property list has been 7660 * closed. 7661 * 7662 * \see_virtual 7663 * 7664 * \since 1.10.2 7665 * 7666 */ 7667 H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix); 7668 /** 7669 * \ingroup DAPL 7670 * 7671 * \brief Sets the maximum number of missing source files and/or datasets 7672 * with the printf-style names when getting the extent of an 7673 * unlimited virtual dataset 7674 * 7675 * \dapl_id 7676 * \param[in] gap_size Maximum number of files and/or datasets allowed to 7677 * be missing for determining the extent of an 7678 * unlimited virtual dataset with printf-style 7679 * mappings (<em>Default value</em>: 0) 7680 * 7681 * \return \herr_t 7682 * 7683 * \details H5Pset_virtual_printf_gap() sets the access property list for 7684 * the virtual dataset, \p dapl_id, to instruct the library to 7685 * stop looking for the mapped data stored in the files and/or 7686 * datasets with the printf-style names after not finding 7687 * \p gap_size files and/or datasets. The found source files and 7688 * datasets will determine the extent of the unlimited virtual 7689 * dataset with the printf-style mappings. 7690 * 7691 * Consider the following examples where the regularly spaced 7692 * blocks of a virtual dataset are mapped to datasets with the 7693 * names d-1, d-2, d-3, ..., d-N, ... : 7694 * 7695 * \li If the dataset d-2 is missing and \p gap_size is set to 0, 7696 * then the virtual dataset will contain only data found 7697 * in d-1. 7698 * \li If d-2 and d-3 are missing and \p gap_size is set to 2, 7699 * then the virtual dataset will contain the data from 7700 * d-1, d-3, ..., d-N, ... . The blocks that are mapped to 7701 * d-2 and d-3 will be filled according to the virtual 7702 * dataset's fill value setting. 7703 * 7704 * \see_virtual 7705 * 7706 * \since 1.10.0 7707 * 7708 */ 7709 H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t dapl_id, hsize_t gap_size); 7710 /** 7711 * \ingroup DAPL 7712 * 7713 * \brief Sets the view of the virtual dataset (VDS) to include or exclude 7714 * missing mapped elements 7715 * 7716 * \dapl_id 7717 * \param[in] view Flag specifying the extent of the data to be included 7718 * in the view. 7719 * 7720 * \return \herr_t 7721 * 7722 * \details H5Pset_virtual_view() takes the access property list for the 7723 * virtual dataset, \p dapl_id, and the flag, \p view, and sets 7724 * the VDS view according to the flag value. 7725 * 7726 * If \p view is set to #H5D_VDS_FIRST_MISSING, the view includes 7727 * all data before the first missing mapped data. This setting 7728 * provides a view containing only the continuous data starting 7729 * with the dataset's first data element. Any break in 7730 * continuity terminates the view. 7731 * 7732 * If \p view is set to #H5D_VDS_LAST_AVAILABLE, the view 7733 * includes all available mapped data. 7734 * 7735 * Missing mapped data is filled with the fill value set in the 7736 * VDS creation property list. 7737 * 7738 * \see_virtual 7739 * 7740 * \since 1.10.0 7741 * 7742 */ 7743 H5_DLL herr_t H5Pset_virtual_view(hid_t dapl_id, H5D_vds_view_t view); 7744 7745 /* Dataset xfer property list (DXPL) routines */ 7746 /** 7747 * 7748 * \ingroup DXPL 7749 * 7750 * \brief Gets B-tree split ratios for a dataset transfer property list 7751 * 7752 * \dxpl_id{plist_id} 7753 * \param[out] left The B-tree split ratio for left-most nodes 7754 * \param[out] middle The B-tree split ratio for right-most nodes and lone nodes 7755 * \param[out] right The B-tree split ratio for all other nodes 7756 * \return \herr_t 7757 * 7758 * \details H5Pget_btree_ratios() returns the B-tree split ratios for a dataset 7759 * transfer property list. 7760 * 7761 * The B-tree split ratios are returned through the non-NULL arguments 7762 * \p left, \p middle, and \p right, as set by the H5Pset_btree_ratios() 7763 * function. 7764 * 7765 * \since 1.0.0 7766 * 7767 */ 7768 H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/, 7769 double *right /*out*/); 7770 /** 7771 * 7772 * \ingroup DXPL 7773 * 7774 * \brief Reads buffer settings 7775 * 7776 * \param[in] plist_id Identifier for the dataset transfer property list 7777 * \param[out] tconv Address of the pointer to application-allocated type 7778 * conversion buffer 7779 * \param[out] bkg Address of the pointer to application-allocated 7780 * background buffer 7781 * 7782 * \return Returns buffer size, in bytes, if successful; otherwise 0 on failure. 7783 * 7784 * \details H5Pget_buffer() reads values previously set with H5Pset_buffer(). 7785 * 7786 * \version 1.6.0 The return type changed from \p hsize_t to \p size_t. 7787 * \version 1.4.0 The return type changed to \p hsize_t. 7788 * 7789 * \since 1.0.0 7790 * 7791 */ 7792 H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/); 7793 /** 7794 * 7795 * \ingroup DXPL 7796 * 7797 * \brief Retrieves a data transform expression 7798 * 7799 * \param[in] plist_id Identifier of the property list or class 7800 * \param[out] expression Pointer to memory where the transform expression will 7801 * be copied 7802 * \param[in] size Number of bytes of the transform expression to copy 7803 * to 7804 * 7805 * \return Success: the size of the transform expression. Failure: a negative 7806 * value. 7807 * 7808 * \details H5Pget_data_transform() retrieves the data transform expression 7809 * previously set in the dataset transfer property list \p plist_id 7810 * by H5Pset_data_transform(). 7811 * 7812 * H5Pget_data_transform() can be used to both retrieve the transform 7813 * expression and query its size. 7814 * 7815 * If \p expression is non-NULL, up to \p size bytes of the data 7816 * transform expression are written to the buffer. If \p expression 7817 * is NULL, \p size is ignored, and the function does not write 7818 * anything to the buffer. The function always returns the size of 7819 * the data transform expression. 7820 * 7821 * If 0 is returned for the size of the expression, no data transform 7822 * expression exists for the property list. 7823 * 7824 * If an error occurs, the buffer pointed to by \p expression is 7825 * unchanged, and the function returns a negative value. 7826 * 7827 * \since 1.8.0 7828 * 7829 */ 7830 H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size); 7831 /** 7832 * 7833 * \ingroup DXPL 7834 * 7835 * \brief Determines whether error-detection is enabled for dataset reads 7836 * 7837 * \param[in] plist_id Dataset transfer property list identifier 7838 * 7839 * \return Returns \p H5Z_ENABLE_EDC or \p H5Z_DISABLE_EDC if successful; 7840 * otherwise returns a negative value. 7841 * 7842 * \details H5Pget_edc_check() queries the dataset transfer property 7843 * list \p plist to determine whether error detection is enabled for 7844 * data read operations. 7845 * 7846 * \since 1.6.0 7847 * 7848 */ 7849 H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); 7850 /** 7851 * 7852 * \ingroup DXPL 7853 * 7854 * \brief Retrieves number of I/O vectors to be read/written in hyperslab I/O 7855 * 7856 * \param[in] fapl_id Dataset transfer property list identifier 7857 * \param[out] size Number of I/O vectors to accumulate in memory for I/O operations 7858 * 7859 * \return \herr_t 7860 * 7861 * \details H5Pget_hyper_vector_size() retrieves the number of I/O vectors to be accumulated in 7862 * memory before being issued to the lower levels of the HDF5 library for reading or 7863 * writing the actual data. 7864 * 7865 * The number of I/O vectors set in the dataset transfer property list \p fapl_id is 7866 * returned in \p size. Unless the default value is in use, \p size was 7867 * previously set with a call to H5Pset_hyper_vector_size(). 7868 * 7869 * \since 1.6.0 7870 * 7871 */ 7872 H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/); 7873 /** 7874 * 7875 * \ingroup DXPL 7876 * 7877 * \brief Checks status of the dataset transfer property list (\b DEPRECATED) 7878 * 7879 * \deprecated{H5Pget_preserve() is deprecated as it is no longer useful; 7880 * compound datatype field preservation is now core functionality 7881 * in the HDF5 library.} 7882 * 7883 * \param[in] plist_id Identifier for the dataset transfer property list 7884 * 7885 * \return Returns 1 or 0 if successful; otherwise returns a negative value. 7886 * 7887 * \details H5Pget_preserve() checks the status of the dataset transfer 7888 * property list. 7889 * 7890 * \since 1.0.0 7891 * 7892 * \version 1.6.0 The flag parameter was changed from INTEGER to LOGICAL to 7893 * better match the C API. (Fortran 90) 7894 * \version 1.8.2 Deprecated. 7895 * 7896 */ 7897 H5_DLL int H5Pget_preserve(hid_t plist_id); 7898 /** 7899 * 7900 * \ingroup DXPL 7901 * 7902 * \brief Gets user-defined datatype conversion callback function 7903 * 7904 * \param[in] dxpl_id Dataset transfer property list identifier 7905 * \param[out] op User-defined type conversion callback function 7906 * \param[out] operate_data User-defined input data for the callback function 7907 * 7908 * \return \herr_t 7909 * 7910 * \details H5Pget_type_conv_cb() gets the user-defined datatype conversion 7911 * callback function \p op in the dataset transfer property list 7912 * \p dxpl_id. 7913 * 7914 * The parameter \p operate_data is a pointer to user-defined input 7915 * data for the callback function. 7916 * 7917 * The callback function \p op defines the actions an application is 7918 * to take when there is an exception during datatype conversion. 7919 * 7920 * Please refer to the function H5Pset_type_conv_cb() for more details. 7921 * 7922 * \since 1.8.0 7923 * 7924 */ 7925 H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data); 7926 /** 7927 * 7928 * \ingroup DXPL 7929 * 7930 * \brief Gets the memory manager for variable-length datatype allocation in H5Dread() and H5Dvlen_reclaim() 7931 * 7932 * \param[in] plist_id Identifier for the dataset transfer property list 7933 * \param[out] alloc_func User's allocate routine, or NULL for system malloc 7934 * \param[out] alloc_info Extra parameter for user's allocation routine. 7935 * Contents are ignored if preceding 7936 * parameter is NULL \param[out] free_func User's free routine, or NULL for 7937 * system free \param[out] free_info 7938 * Extra parameter for user's free routine. Contents are ignored if preceding 7939 * parameter is NULL 7940 * 7941 * \return \herr_t 7942 * 7943 * \details H5Pget_vlen_mem_manager() is the companion function to 7944 * H5Pset_vlen_mem_manager(), returning the parameters set by 7945 * that function. 7946 * 7947 * \since 1.0.0 7948 * 7949 */ 7950 H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info, 7951 H5MM_free_t *free_func, void **free_info); 7952 /** 7953 * 7954 * \ingroup DXPL 7955 * 7956 * \brief Sets B-tree split ratios for a dataset transfer property list 7957 * 7958 * \param[in] plist_id The dataset transfer property list identifier 7959 * \param[in] left The B-tree split ratio for left-most nodes 7960 * \param[in] middle The B-tree split ratio for all other nodes 7961 * \param[in] right The B-tree split ratio for right-most nodes and lone 7962 * nodes 7963 * 7964 * \return \herr_t 7965 * 7966 * \details H5Pset_btree_ratios() sets the B-tree split ratios for a dataset 7967 * transfer property list. The split ratios determine what percent of 7968 * children go in the first node when a node splits. 7969 * 7970 * The ratio \p left is used when the splitting node is the left-most 7971 * node at its level in the tree; 7972 * the ratio \p right is used when the splitting node is the right-most 7973 * node at its level; and 7974 * the ratio \p middle is used for all other cases. 7975 * 7976 * A node that is the only node at its level in the tree uses the 7977 * ratio \p right when it splits. 7978 * 7979 * All ratios are real numbers between 0 and 1, inclusive. 7980 * 7981 * \since 1.0.0 7982 * 7983 */ 7984 H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); 7985 7986 /** 7987 * 7988 * \ingroup DXPL 7989 * 7990 * \brief Sets type conversion and background buffers 7991 * 7992 * \dxpl_id{plist_id} 7993 * \param[in] size Size, in bytes, of the type conversion and background buffers 7994 * \param[in] tconv Pointer to application-allocated type conversion buffer 7995 * \param[in] bkg Pointer to application-allocated background buffer 7996 * \return \herr_t 7997 * 7998 * \details Given a dataset transfer property list, H5Pset_buffer() sets the 7999 * maximum size for the type conversion buffer and background buffer 8000 * and optionally supplies pointers to application-allocated 8001 * buffers. If the buffer size is smaller than the entire amount of 8002 * data being transferred between the application and the file, and a 8003 * type conversion buffer or background buffer is required, then strip 8004 * mining will be used. 8005 * 8006 * Note that there are minimum size requirements for the buffer. Strip 8007 * mining can only break the data up along the first dimension, so the 8008 * buffer must be large enough to accommodate a complete slice that 8009 * encompasses all of the remaining dimensions. For example, when strip 8010 * mining a \TText{100x200x300} hyperslab of a simple data space, the 8011 * buffer must be large enough to hold \TText{1x200x300} data 8012 * elements. When strip mining a \TText{100x200x300x150} hyperslab of a 8013 * simple data space, the buffer must be large enough to hold 8014 * \TText{1x200x300x150} data elements. 8015 * 8016 * If \p tconv and/or \p bkg are null pointers, then buffers will be 8017 * allocated and freed during the data transfer. 8018 * 8019 * The default value for the maximum buffer is 1 MiB. 8020 * 8021 * \version 1.6.0 The \p size parameter has changed from type hsize_t to \c size_t. 8022 * \version 1.4.0 The \p size parameter has changed to type hsize_t. 8023 * 8024 * \since 1.0.0 8025 * 8026 */ 8027 H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); 8028 8029 /** 8030 * \ingroup DXPL 8031 * 8032 * \brief Sets a data transform expression 8033 * 8034 * \dxpl_id{plist_id} 8035 * \param[in] expression Pointer to the null-terminated data transform 8036 * expression 8037 * \return \herr_t 8038 * 8039 * \details H5Pset_data_transform() sets the data transform to be used for 8040 * reading and writing data. This function operates on the dataset 8041 * transfer property list \p plist_id. 8042 * 8043 * The \p expression parameter is a string containing an algebraic 8044 * expression, such as \TText{(5/9.0)*(x-32)} or \TText{x*(x-5)}. When a 8045 * dataset is read or written with this property list, the transform 8046 * expression is applied with the \c x being replaced by the values in 8047 * the dataset. When reading data, the values in the file are not 8048 * changed and the transformed data is returned to the user. 8049 * 8050 * Data transforms can only be applied to integer or 8051 * floating-point datasets. Order of operations is obeyed and 8052 * the only supported operations are +, -, *, and /. Parentheses 8053 * can be nested arbitrarily and can be used to change precedence. 8054 * When writing data back to the dataset, the transformed data is 8055 * written to the file and there is no way to recover the original 8056 * values to which the transform was applied. 8057 * 8058 * \since 1.8.0 8059 * 8060 */ 8061 H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression); 8062 8063 /** 8064 * \ingroup DXPL 8065 * 8066 * \brief Sets the dataset transfer property list to enable or disable error 8067 * detection when reading data 8068 * 8069 * \dxpl_id{plist_id} 8070 * \param[in] check Specifies whether error checking is enabled or disabled 8071 * for dataset read operations 8072 * \return \herr_t 8073 * 8074 * \details H5Pset_edc_check() sets the dataset transfer property list \p plist 8075 * to enable or disable error detection when reading data. 8076 * 8077 * Whether error detection is enabled or disabled is specified in the 8078 * \p check parameter. Valid values are #H5Z_ENABLE_EDC (default) and 8079 * #H5Z_DISABLE_EDC. 8080 * 8081 * \note The initial error detection implementation, Fletcher32 checksum, 8082 * supports error detection for chunked datasets only. 8083 * 8084 * \attention The Fletcher32 EDC checksum filter, set with H5Pset_fletcher32(), 8085 * was added in HDF5 Release 1.6.0. In the original implementation, 8086 * however, the checksum value was calculated incorrectly on 8087 * little-endian systems. The error was fixed in HDF5 Release 1.6.3.\n 8088 * As a result of this fix, an HDF5 library of Release 1.6.0 through 8089 * Release 1.6.2 cannot read a dataset created or written with 8090 * Release 1.6.3 or later if the dataset was created with the 8091 * checksum filter and the filter is enabled in the reading 8092 * library. (Libraries of Release 1.6.3 and later understand the 8093 * earlier error and compensate appropriately.)\n 8094 * \Bold{Work-around:} An HDF5 library of Release 1.6.2 or earlier 8095 * will be able to read a dataset created or written with the 8096 * checksum filter by an HDF5 library of Release 1.6.3 or later if 8097 * the checksum filter is disabled for the read operation. This can 8098 * be accomplished via an H5Pset_edc_check() call with the value 8099 * #H5Z_DISABLE_EDC in the second parameter. This has the obvious 8100 * drawback that the application will be unable to verify the 8101 * checksum, but the data does remain accessible. 8102 * 8103 * \version 1.6.3 Error in checksum calculation on little-endian systems 8104 * corrected in this release. 8105 * \since 1.6.0 8106 * 8107 */ 8108 H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); 8109 8110 /** 8111 * \ingroup DXPL 8112 * 8113 * \brief Sets user-defined filter callback function 8114 * 8115 * \dxpl_id{plist_id} 8116 * \param[in] func User-defined filter callback function 8117 * \param[in] op_data User-defined input data for the callback function 8118 * \return \herr_t 8119 * 8120 * \details H5Pset_filter_callback() sets the user-defined filter callback 8121 * function \p func in the dataset transfer property list \p plist_id. 8122 * 8123 * The parameter \p op_data is a pointer to user-defined input data for 8124 * the callback function and will be passed through to the callback 8125 * function. 8126 * 8127 * The callback function \p func defines the actions an application is 8128 * to take when a filter fails. The function prototype is as follows: 8129 * \snippet H5Zpublic.h H5Z_filter_func_t_snip 8130 * where \c filter indicates which filter has failed, \c buf and \c buf_size 8131 * are used to pass in the failed data, and op_data is the required 8132 * input data for this callback function. 8133 * 8134 * Valid callback function return values are #H5Z_CB_FAIL and #H5Z_CB_CONT. 8135 * 8136 * \since 1.6.0 8137 * 8138 */ 8139 H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data); 8140 8141 /** 8142 * \ingroup DXPL 8143 * 8144 * \brief Sets number of I/O vectors to be read/written in hyperslab I/O 8145 * 8146 * \dxpl_id{plist_id} 8147 * \param[in] size Number of I/O vectors to accumulate in memory for I/O 8148 * operations\n 8149 * Must be greater than 1 (one)\n 8150 * Default value: 1024 8151 * \return \herr_t 8152 * 8153 * \details H5Pset_hyper_vector_size() sets the number of I/O vectors to be 8154 * accumulated in memory before being issued to the lower levels of 8155 * the HDF5 library for reading or writing the actual data. 8156 * 8157 * The I/O vectors are hyperslab offset and length pairs and are 8158 * generated during hyperslab I/O. 8159 * 8160 * The number of I/O vectors is passed in \p size to be set in the 8161 * dataset transfer property list \p plist_id. \p size must be 8162 * greater than 1 (one). 8163 * 8164 * H5Pset_hyper_vector_size() is an I/O optimization function; 8165 * increasing vector_size should provide better performance, but the 8166 * library will use more memory during hyperslab I/O. The default value 8167 * of \p size is 1024. 8168 * 8169 * \since 1.6.0 8170 * 8171 */ 8172 H5_DLL herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t size); 8173 8174 /** 8175 * \ingroup DXPL 8176 * 8177 * \brief Sets the dataset transfer property list \p status 8178 * 8179 * \dxpl_id{plist_id} 8180 * \param[in] status Status toggle of the dataset transfer property list 8181 * \return \herr_t 8182 * 8183 * \deprecated This function is deprecated as it no longer has any effect; 8184 * compound datatype field preservation is now core functionality in 8185 * the HDF5 library. 8186 * 8187 * \details H5Pset_preserve() sets the dataset transfer property list status to 8188 * \c 1 or \c 0. 8189 * 8190 * When reading or writing compound datatypes and the destination is 8191 * partially initialized and the read/write is intended to initialize 8192 * the other members, one must set this property to \c 1. Otherwise the 8193 * I/O pipeline treats the destination datapoints as completely 8194 * uninitialized. 8195 * 8196 * \since 1.0.0 8197 * 8198 * \version 1.8.2 Deprecated. 8199 * 8200 */ 8201 H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); 8202 8203 /** 8204 * \ingroup DXPL 8205 * 8206 * \brief Sets user-defined datatype conversion callback function 8207 * 8208 * \dxpl_id 8209 * \param[in] op User-defined type conversion callback function 8210 * \param[in] operate_data User-defined input data for the callback function 8211 * \return \herr_t 8212 * 8213 * \details H5Pset_type_conv_cb() sets the user-defined datatype conversion 8214 * callback function \p op in the dataset transfer property list \p 8215 * dxpl_id 8216 * 8217 * The parameter operate_data is a pointer to user-defined input data 8218 * for the callback function and will be passed through to the callback 8219 * function. 8220 * 8221 * The callback function \p op defines the actions an application is to 8222 * take when there is an exception during datatype conversion. The 8223 * function prototype is as follows: 8224 * \snippet H5Tpublic.h H5T_conv_except_func_t_snip 8225 * 8226 * \since 1.8.0 8227 * 8228 */ 8229 H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data); 8230 8231 /** 8232 * \ingroup DXPL 8233 * 8234 * \brief Sets the memory manager for variable-length datatype allocation in 8235 * H5Dread() and H5Dvlen_reclaim() 8236 * 8237 * \dxpl_id{plist_id} 8238 * \param[in] alloc_func User's allocate routine, or \c NULL for system \c malloc 8239 * \param[in] alloc_info Extra parameter for user's allocation routine. 8240 * Contents are ignored if preceding parameter is \c NULL. 8241 * \param[in] free_func User's free routine, or \c NULL for system \c free 8242 * \param[in] free_info Extra parameter for user's free routine. Contents are 8243 * ignored if preceding parameter is \c NULL 8244 * \return \herr_t 8245 * 8246 * \details H5Pset_vlen_mem_manager() sets the memory manager for 8247 * variable-length datatype allocation in H5Dread() and free in 8248 * H5Dvlen_reclaim(). 8249 * 8250 * The \p alloc_func and \p free_func parameters identify the memory 8251 * management routines to be used. If the user has defined custom 8252 * memory management routines, \p alloc_func and/or free_func should be 8253 * set to make those routine calls (i.e., the name of the routine is 8254 * used as the value of the parameter); if the user prefers to use the 8255 * system's \c malloc and/or \c free, the \p alloc_func and \p 8256 * free_func parameters, respectively, should be set to \c NULL 8257 * 8258 * The prototypes for these user-defined functions are as follows: 8259 * \snippet H5MMpublic.h H5MM_allocate_t_snip 8260 * 8261 * \snippet H5MMpublic.h H5MM_free_t_snip 8262 * 8263 * The \p alloc_info and \p free_info parameters can be used to pass 8264 * along any required information to the user's memory management 8265 * routines. 8266 * 8267 * In summary, if the user has defined custom memory management 8268 * routines, the name(s) of the routines are passed in the \p 8269 * alloc_func and \p free_func parameters and the custom routines' 8270 * parameters are passed in the \p alloc_info and \p free_info 8271 * parameters. If the user wishes to use the system \c malloc and \c 8272 * free functions, the \p alloc_func and/or \p free_func parameters are 8273 * set to \c NULL and the \p alloc_info and \p free_info parameters are 8274 * ignored. 8275 * 8276 * \since 1.0.0 8277 * 8278 */ 8279 H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, 8280 H5MM_free_t free_func, void *free_info); 8281 8282 #ifdef H5_HAVE_PARALLEL 8283 /** 8284 * \ingroup DXPL 8285 * 8286 * \brief Retrieves the type of chunk optimization that HDF5 actually performed 8287 * on the last parallel I/O call (not necessarily the type requested) 8288 * 8289 * \dxpl_id{plist_id} 8290 * \param[out] actual_chunk_opt_mode The type of chunk optimization performed by HDF5 8291 * \return \herr_t 8292 * 8293 * \par Motivation: 8294 * A user can request collective I/O via a data transfer property list 8295 * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). 8296 * However, HDF5 will sometimes ignore this request and perform independent 8297 * I/O instead. This property allows the user to see what kind of I/O HDF5 8298 * actually performed. Used in conjunction with H5Pget_mpio_actual_io_mode(), 8299 * this property allows the user to determine exactly what HDF5 did when 8300 * attempting collective I/O. 8301 * 8302 * \details H5Pget_mpio_actual_chunk_opt_mode() retrieves the type of chunk 8303 * optimization performed when collective I/O was requested. This 8304 * property is set before I/O takes place, and will be set even if I/O 8305 * fails. 8306 * 8307 * Valid values returned in \p actual_chunk_opt_mode: 8308 * \snippet this H5D_mpio_actual_chunk_opt_mode_t_snip 8309 * \click4more 8310 * 8311 * \since 1.8.8 8312 * 8313 */ 8314 H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, 8315 H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); 8316 /** 8317 * \ingroup DXPL 8318 * 8319 * \brief Retrieves the type of I/O that HDF5 actually performed on the last 8320 * parallel I/O call (not necessarily the type requested) 8321 * 8322 * \dxpl_id{plist_id} 8323 * \param[out] actual_io_mode The type of I/O performed by this process 8324 * \return \herr_t 8325 * 8326 * \par Motivation: 8327 * A user can request collective I/O via a data transfer property list 8328 * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). 8329 * However, HDF5 will sometimes ignore this request and perform independent 8330 * I/O instead. This property allows the user to see what kind of I/O HDF5 8331 * actually performed. Used in conjunction with H5Pget_mpio_actual_chunk_opt_mode(), 8332 * this property allows the user to determine exactly HDF5 did when 8333 * attempting collective I/O. 8334 * 8335 * \details H5Pget_mpio_actual_io_mode() retrieves the type of I/O performed on 8336 * the selection of the current process. This property is set after all 8337 * I/O is completed; if I/O fails, it will not be set. 8338 * 8339 * Valid values returned in \p actual_io_mode: 8340 * \snippet this H5D_mpio_actual_io_mode_t_snip 8341 * \click4more 8342 * 8343 * \attention All processes do not need to have the same value. For example, if 8344 * I/O is being performed using the multi chunk optimization scheme, 8345 * one process's selection may include only chunks accessed 8346 * collectively, while another may include chunks accessed 8347 * independently. In this case, the first process will report 8348 * #H5D_MPIO_CHUNK_COLLECTIVE while the second will report 8349 * #H5D_MPIO_CHUNK_INDEPENDENT. 8350 * 8351 * \see H5Pget_mpio_no_collective_cause(), H5Pget_mpio_actual_chunk_opt_mode() 8352 * 8353 * \since 1.8.8 8354 * 8355 */ 8356 H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); 8357 /** 8358 * \ingroup DXPL 8359 * 8360 * \brief Retrieves local and global causes that broke collective I/O on the last 8361 * parallel I/O call 8362 * 8363 * \dxpl_id{plist_id} 8364 * \param[out] local_no_collective_cause An enumerated set value indicating the 8365 * causes that prevented collective I/O in the local process 8366 * \param[out] global_no_collective_cause An enumerated set value indicating 8367 * the causes across all processes that prevented collective I/O 8368 * \return \herr_t 8369 * 8370 * \par Motivation: 8371 * A user can request collective I/O via a data transfer property list (DXPL) 8372 * that has been suitably modified with H5P_SET_DXPL_MPIO. However, there are 8373 * conditions that can cause HDF5 to forgo collective I/O and perform 8374 * independent I/O. Such causes can be different across the processes of a 8375 * parallel application. This function allows the user to determine what 8376 * caused the HDF5 library to skip collective I/O locally, that is in the 8377 * local process, and globally, across all processes. 8378 * 8379 * \details H5Pget_mpio_no_collective_cause() serves two purposes. It can be 8380 * used to determine whether collective I/O was used for the last 8381 * preceding parallel I/O call. If collective I/O was not used, the 8382 * function retrieves the local and global causes that broke collective 8383 * I/O on that parallel I/O call. The properties retrieved by this 8384 * function are set before I/O takes place and are retained even when 8385 * I/O fails. 8386 * 8387 * Valid values returned in \p local_no_collective_cause and \p 8388 * global_no_collective_cause are as follows or, if there are multiple 8389 * causes, a bitwise OR of the relevant causes; the numbers in the 8390 * center column are the bitmask values: 8391 * \snippet this H5D_mpio_no_collective_cause_t_snip 8392 * \click4more 8393 * 8394 * \attention Each process determines whether it can perform collective I/O and 8395 * broadcasts the result. Those results are combined to make a 8396 * collective decision; collective I/O will be performed only if all 8397 * processes can perform collective I/O.\n 8398 * If collective I/O was not used, the causes that prevented it are 8399 * reported by individual process by means of an enumerated set. The 8400 * causes may differ among processes, so H5Pget_mpio_no_collective_cause() 8401 * returns two property values. The first value is the one produced 8402 * by the local process to report local causes. This local information 8403 * is encoded in an enumeration, the \ref H5D_mpio_no_collective_cause_t 8404 * described above, with all individual causes combined into a single 8405 * enumeration value by means of a bitwise OR operation. The second 8406 * value reports global causes; this global value is the result of a 8407 * bitwise-OR operation across the values returned by all the processes. 8408 * 8409 * \since 1.8.10 8410 * 8411 */ 8412 H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, 8413 uint32_t *global_no_collective_cause); 8414 #endif /* H5_HAVE_PARALLEL */ 8415 /** 8416 * 8417 * \ingroup DXPL 8418 * 8419 * \brief Sets a hyperslab file selection for a dataset I/O operation 8420 * 8421 * \param[in] plist_id Property list identifier 8422 * \param[in] rank Number of dimensions of selection 8423 * \param[in] op Operation to perform on current selection 8424 * \param[in] start Offset of start of hyperslab 8425 * \param[in] stride Hyperslab stride 8426 * \param[in] count Number of blocks included in hyperslab 8427 * \param[in] block Size of block in hyperslab 8428 * 8429 * \return \herr_t 8430 * 8431 * \details H5Pset_dataset_io_hyperslab_selection() is designed to be used 8432 * in conjunction with using #H5S_PLIST for the file dataspace 8433 * ID when making a call to H5Dread() or H5Dwrite(). When used 8434 * with #H5S_PLIST, the selection created by one or more calls to 8435 * this routine is used for determining which dataset elements to 8436 * access. 8437 * 8438 * \p rank is the dimensionality of the selection and determines 8439 * the size of the \p start, \p stride, \p count, and \p block arrays. 8440 * \p rank must be between 1 and #H5S_MAX_RANK, inclusive. 8441 * 8442 * The \p op, \p start, \p stride, \p count, and \p block parameters 8443 * behave identically to their behavior for H5Sselect_hyperslab(), 8444 * please see the documentation for that routine for details about 8445 * their use. 8446 * 8447 * \since 1.14.0 8448 * 8449 */ 8450 H5_DLL herr_t H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper_t op, 8451 const hsize_t start[], const hsize_t stride[], 8452 const hsize_t count[], const hsize_t block[]); 8453 8454 /** 8455 * 8456 * \ingroup DXPL 8457 * 8458 * \brief Sets the selection I/O mode 8459 * 8460 * \dxpl_id{plist_id} 8461 * \param[in] selection_io_mode The selection I/O mode to be set 8462 * 8463 * \return \herr_t 8464 * 8465 * \details H5Pset_selection_io() sets the selection I/O mode 8466 * \p selection_io_mode in the dataset transfer property 8467 * list \p plist_id. 8468 * 8469 * This can be used to enable collective I/O with type conversion, or 8470 * with custom VFDs that support vector or selection I/O. 8471 * 8472 * Values that can be set in \p selection_io_mode: 8473 * \snippet this H5D_selection_io_mode_t_snip 8474 * \click4more 8475 * 8476 * \note The library may not perform selection I/O as it asks for if the 8477 * layout callback determines that it is not feasible to do so. Please 8478 * refer to H5Pget_no_selection_io_cause() for details. 8479 * 8480 * When used with type conversion, selection I/O requires the type 8481 * conversion buffer (and the background buffer if applicable) be large 8482 * enough to hold the entirety of the data involved in the I/O. For 8483 * read operations, the library will use the application's read buffer 8484 * as the type conversion buffer if the memory type is not smaller than 8485 * the file type, eliminating the need for a separate type conversion 8486 * buffer (a background buffer may still be required). For write 8487 * operations, the library will similarly use the write buffer as a 8488 * type conversion buffer, but only if H5Pset_modify_write_buf() is 8489 * used to allow the library to modify the contents of the write 8490 * buffer. 8491 * 8492 * \since 1.14.1 8493 * 8494 */ 8495 H5_DLL herr_t H5Pset_selection_io(hid_t plist_id, H5D_selection_io_mode_t selection_io_mode); 8496 8497 /** 8498 * 8499 * \ingroup DXPL 8500 * 8501 * \brief Retrieves the selection I/O mode 8502 * 8503 * \dxpl_id{plist_id} 8504 * \param[out] selection_io_mode The selection I/O mode 8505 * 8506 * \return \herr_t 8507 * 8508 * \details H5Pget_selection_io() queries the selection I/O mode set in 8509 * in the dataset transfer property list \p plist_id. 8510 * 8511 * Values returned in \p selection_io_mode: 8512 * \snippet this H5D_selection_io_mode_t_snip 8513 * \click4more 8514 * 8515 * \note The library may not perform selection I/O as it asks for if the 8516 * layout callback determines that it is not feasible to do so. Please 8517 * refer to H5Pget_no_selection_io_cause() for details. 8518 * 8519 * \since 1.14.1 8520 * 8521 */ 8522 H5_DLL herr_t H5Pget_selection_io(hid_t plist_id, H5D_selection_io_mode_t *selection_io_mode); 8523 8524 /** 8525 * \ingroup DXPL 8526 * 8527 * \brief Retrieves the cause for not performing selection or vector I/O on the 8528 * last parallel I/O call 8529 * 8530 * \dxpl_id{plist_id} 8531 * \param[out] no_selection_io_cause A bitwise set value indicating the relevant 8532 * causes that prevented selection I/O from 8533 * being performed 8534 * \return \herr_t 8535 * 8536 * \par Motivation: 8537 * A user can request selection I/O to be performed via a data transfer 8538 * property list (DXPL). This can be used to enable collective I/O with 8539 * type conversion, or with custom VFDs that support vector or selection 8540 * I/O. However, there are conditions that can cause HDF5 to forgo 8541 * selection or vector I/O and perform legacy (scalar) I/O instead. 8542 * 8543 * \details H5Pget_no_selection_io_cause() can be used to determine whether 8544 * selection or vector I/O was applied for the last preceding I/O call. 8545 * If selection or vector I/O was not used, this function retrieves the 8546 * cause(s) that prevent selection or vector I/O to be performed on 8547 * that I/O call. The properties retrieved by this function are set 8548 * before I/O takes place and are retained even when I/O fails. 8549 * 8550 * If a selection I/O request falls back to vector I/O, that is not 8551 * considered "breaking" selection I/O by this function, since vector 8552 * I/O still passes all information to the file driver in a single 8553 * callback. 8554 * 8555 * Valid values returned in \p no_selection_io_cause are listed 8556 * as follows. If there are multiple causes, it is a bitwise OR of 8557 * the relevant causes. 8558 * 8559 * - #H5D_SEL_IO_DISABLE_BY_API 8560 * Selection I/O was not performed because the feature was disabled by the API 8561 * - #H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET 8562 * Selection I/O was not performed because the dataset was neither contiguous nor chunked 8563 * - #H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER 8564 * Selection I/O was not performed because of sieve buffer for contiguous dataset 8565 * - #H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB 8566 * Selection I/O was not performed because the VFD does not have vector or selection I/O callback 8567 * - #H5D_SEL_IO_PAGE_BUFFER 8568 * Selection I/O was not performed because of page buffer 8569 * - #H5D_SEL_IO_DATASET_FILTER 8570 * Selection I/O was not performed because of dataset filters 8571 * - #H5D_SEL_IO_CHUNK_CACHE 8572 * Selection I/O was not performed because of chunk cache 8573 * - #H5D_SEL_IO_TCONV_BUF_TOO_SMALL 8574 * Selection I/O was not performed because the type conversion buffer is too small 8575 * - #H5D_SEL_IO_BKG_BUF_TOO_SMALL 8576 * Selection I/O was not performed because the type conversion background buffer is too small 8577 * - #H5D_SEL_IO_DEFAULT_OFF 8578 * Selection I/O was not performed because the selection I/O mode is DEFAULT and the library chose it 8579 * to be off for this case 8580 * 8581 * \since 1.14.1 8582 * 8583 */ 8584 H5_DLL herr_t H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause); 8585 8586 /** 8587 * \ingroup DXPL 8588 * 8589 * \brief Retrieves the type(s) of I/O that HDF5 actually performed on raw data 8590 * during the last I/O call 8591 * 8592 * \dxpl_id{plist_id} 8593 * \param[out] actual_selection_io_mode A bitwise set value indicating the 8594 * type(s) of I/O performed 8595 * \return \herr_t 8596 * 8597 * \par Motivation: 8598 * A user can request selection I/O to be performed via a data transfer 8599 * property list (DXPL). This can be used to enable collective I/O with 8600 * type conversion, or with custom VFDs that support vector or selection 8601 * I/O. However, there are conditions that can cause HDF5 to forgo 8602 * selection or vector I/O and perform legacy (scalar) I/O instead. 8603 * This function allows the user to determine which type or types of 8604 * I/O were actually performed. 8605 * 8606 * \details H5Pget_actual_selection_io_mode() allows the user to determine which 8607 * type(s) of I/O were actually performed on raw data during the last 8608 * I/O operation which used \p plist_id. This property is set after 8609 * all I/O is completed; if I/O fails, it will not be set. 8610 * 8611 * H5Pget_no_selection_io_cause() can be used to determine the reason 8612 * why selection or vector I/O was not performed. 8613 * 8614 * Valid bitflags returned in \p actual_selection_io_mode are listed 8615 * as follows. 8616 * 8617 * - #H5D_SCALAR_IO 8618 * Scalar (or legacy MPIO) I/O was performed 8619 * - #H5D_VECTOR_IO 8620 * Vector I/O was performed 8621 * - #H5D_SELECTION_IO 8622 * Selection I/O was performed 8623 * 8624 * 0 or more of these can be present in \p actual_selection_io_mode in 8625 * a bitwise fashion, since a single operation can trigger multiple 8626 * instances of I/O, possibly with different types. A value of \p 0 8627 * indicates no raw data I/O was performed during the operation. 8628 * 8629 * Be aware that this function will only include raw data I/O performed 8630 * to/from disk as part of the last I/O operation. Any metadata 8631 * I/O, including attribute and compact dataset I/O, is disregarded. 8632 * It is also possible that data was cached in the dataset chunk cache 8633 * or sieve buffer, which may prevent I/O from hitting the disk, and 8634 * thereby prevent it from being counted by this function. 8635 * 8636 * \since 1.14.3 8637 * 8638 */ 8639 H5_DLL herr_t H5Pget_actual_selection_io_mode(hid_t plist_id, uint32_t *actual_selection_io_mode); 8640 8641 /** 8642 * 8643 * \ingroup DXPL 8644 * 8645 * \brief Allows the library to modify the contents of the write buffer 8646 * 8647 * \dxpl_id{plist_id} 8648 * \param[in] modify_write_buf Whether the library can modify the contents of the write buffer 8649 * 8650 * \return \herr_t 8651 * 8652 * \details H5Pset_modify_write_buf() sets whether the library is allowed to 8653 * modify the contents of write buffers passed to HDF5 API routines 8654 * that are passed the dataset transfer property list \p plist_id. The 8655 * default value for modify_write_buf is false. 8656 * 8657 * This function can be used to allow the library to perform in-place 8658 * type conversion on write operations to save memory space. After making an 8659 * API call with this parameter set to true, the contents of the write buffer 8660 * are undefined. 8661 * 8662 * \note When modify_write_buf is set to true the library may violate the 8663 * const qualifier on the API parameter for the write buffer. 8664 * 8665 * \since 1.14.1 8666 * 8667 */ 8668 H5_DLL herr_t H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf); 8669 8670 /** 8671 * 8672 * \ingroup DXPL 8673 * 8674 * \brief Retrieves the "modify write buffer" property 8675 * 8676 * \dxpl_id{plist_id} 8677 * \param[out] modify_write_buf Whether the library can modify the contents of the write buffer 8678 * 8679 * \return \herr_t 8680 * 8681 * \details H5Pget_modify_write_buf() gets the "modify write buffer" property 8682 * from the dataset transfer property list \p plist_id. This property 8683 * determines whether the library is allowed to modify the contents of 8684 * write buffers passed to HDF5 API routines that are passed 8685 * \p plist_id. The default value for modify_write_buf is false. 8686 * 8687 * \since 1.14.1 8688 * 8689 */ 8690 H5_DLL herr_t H5Pget_modify_write_buf(hid_t plist_id, hbool_t *modify_write_buf); 8691 8692 /** 8693 * \ingroup LCPL 8694 * 8695 * \brief Determines whether property is set to enable creating missing 8696 * intermediate groups 8697 * 8698 * \lcpl_id{plist_id} 8699 * \param[out] crt_intmd Flag specifying whether to create intermediate 8700 * groups upon creation of an object 8701 * 8702 * \return \herr_t 8703 * 8704 * \details H5Pget_create_intermediate_group() determines whether the link 8705 * creation property list \p plist_id is set to allow functions 8706 * that create objects in groups different from the current 8707 * working group to create intermediate groups that may be 8708 * missing in the path of a new or moved object. 8709 * 8710 * Functions that create objects in or move objects to a group 8711 * other than the current working group make use of this 8712 * property. H5Gcreate_anon() and H5Lmove() are examples of such 8713 * functions. 8714 * 8715 * If \p crt_intmd is positive, missing intermediate groups will 8716 * be created; if \p crt_intmd is non-positive, missing intermediate 8717 * groups will not be created. 8718 * 8719 * \since 1.8.0 8720 * 8721 */ 8722 H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/); 8723 /** 8724 * \ingroup LCPL 8725 * 8726 * \brief Specifies in property list whether to create missing 8727 * intermediate groups 8728 * 8729 * \lcpl_id{plist_id} 8730 * \param[in] crt_intmd Flag specifying whether to create intermediate 8731 * groups upon the creation of an object 8732 * 8733 * \return \herr_t 8734 * 8735 * \details H5Pset_create_intermediate_group() 8736 * 8737 * \since 1.8.0 8738 * 8739 */ 8740 H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); 8741 8742 /* Group creation property list (GCPL) routines */ 8743 8744 /** 8745 * \ingroup GCPL 8746 * 8747 * \brief Returns the estimated link count and average link name length in a group 8748 * 8749 * \gcpl_id{plist_id} 8750 * \param[out] est_num_entries The estimated number of links in the group 8751 * referenced by \p plist_id 8752 * \param[out] est_name_len The estimated average length of line names in the group 8753 * referenced by \p plist_id 8754 * \return \herr_t 8755 * 8756 * \details H5Pget_est_link_info() retrieves two settings from the group creation 8757 * property list \p plist_id: the estimated number of links that are 8758 * expected to be inserted into a group created with the property list 8759 * and the estimated average length of those link names. 8760 * 8761 * The estimated number of links is returned in \p est_num_entries. The 8762 * limit for \p est_num_entries is 64 K. 8763 * 8764 * The estimated average length of the anticipated link names is returned 8765 * in \p est_name_len. The limit for \p est_name_len is 64 K. 8766 * 8767 * See \ref_group_impls for a discussion of the available types of HDF5 8768 * group structures. 8769 * 8770 * \since 1.8.0 8771 * 8772 */ 8773 H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */, 8774 unsigned *est_name_len /* out */); 8775 /** 8776 * \ingroup GCPL 8777 * 8778 * \brief Queries whether link creation order is tracked and/or indexed in 8779 * a group 8780 * 8781 * \param[in] plist_id Group or file creation property list 8782 * identifier 8783 * \param[out] crt_order_flags Creation order flag(s) 8784 * 8785 * \return \herr_t 8786 * 8787 * \details H5Pget_link_creation_order() queries the group or file creation 8788 * property list, \p plist_id, and returns a flag indicating whether 8789 * link creation order is tracked and/or indexed in a group. 8790 * 8791 * See H5Pset_link_creation_order() for a list of valid creation 8792 * order flags, as passed in \p crt_order_flags, and their 8793 * meanings. 8794 * 8795 * \since 1.8.0 8796 * 8797 */ 8798 H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */); 8799 /** 8800 * \ingroup GCPL 8801 * 8802 * \brief Queries the settings for conversion between compact and dense 8803 * groups 8804 * 8805 * \gcpl_id{plist_id} 8806 * \param[out] max_compact Maximum number of links for compact storage 8807 * \param[out] min_dense Minimum number of links for dense storage 8808 * 8809 * \return \herr_t 8810 * 8811 * \details H5Pget_link_phase_change() queries the maximum number of 8812 * entries for a compact group and the minimum number of links 8813 * to require before converting a group to a dense form. 8814 * 8815 * In the compact format, links are stored as messages in the 8816 * group's header. In the dense format, links are stored in a 8817 * fractal heap and indexed with a version 2 B-tree. 8818 * 8819 * \p max_compact is the maximum number of links to store as 8820 * header messages in the group header before converting the 8821 * group to the dense format. Groups that are in the compact 8822 * format and exceed this number of links are automatically 8823 * converted to the dense format. 8824 * 8825 * \p min_dense is the minimum number of links to store in the 8826 * dense format. Groups which are in dense format and in which 8827 * the number of links falls below this number are automatically 8828 * converted back to the compact format. 8829 * 8830 * In the compact format, links are stored as messages in the 8831 * group's header. In the dense format, links are stored in a 8832 * fractal heap and indexed with a version 2 B-tree. 8833 * 8834 * See H5Pset_link_phase_change() for a discussion of 8835 * traditional, compact, and dense group storage. 8836 * 8837 * \since 1.8.0 8838 * 8839 */ 8840 H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, 8841 unsigned *min_dense /*out*/); 8842 /** 8843 * \ingroup GCPL 8844 * 8845 * \brief Retrieves the anticipated size of the local heap for original-style 8846 * groups 8847 * 8848 * \gcpl_id{plist_id} 8849 * \param[out] size_hint Anticipated size of local heap 8850 * \return \herr_t 8851 * 8852 * \details H5Pget_local_heap_size_hint() queries the group creation property 8853 * list, \p plist_id, for the anticipated size of the local heap, \p 8854 * size_hint, for original-style groups, i.e., for groups of the style 8855 * used prior to HDF5 Release 1.8.0. See H5Pset_local_heap_size_hint() 8856 * for further discussion. 8857 * 8858 * \since 1.8.0 8859 * 8860 */ 8861 H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/); 8862 /** 8863 * \ingroup GCPL 8864 * 8865 * \brief Sets estimated number of links and length of link names in a group 8866 * 8867 * \gcpl_id{plist_id} 8868 * \param[in] est_num_entries Estimated number of links to be inserted into group 8869 * \param[in] est_name_len Estimated average length of link names 8870 * \return \herr_t 8871 * 8872 * \details H5Pset_est_link_info() inserts two settings into the group creation 8873 * property list plist_id: the estimated number of links that are 8874 * expected to be inserted into a group created with the property list 8875 * and the estimated average length of those link names. 8876 * 8877 * The estimated number of links is passed in \p est_num_entries. The 8878 * limit for \p est_num_entries is 64 K. 8879 * 8880 * The estimated average length of the anticipated link names is passed 8881 * in \p est_name_len. The limit for \p est_name_len is 64 K. 8882 * 8883 * The values for these two settings are multiplied to compute the 8884 * initial local heap size (for old-style groups, if the local heap 8885 * size hint is not set) or the initial object header size for 8886 * (new-style compact groups; see \ref_group_impls). Accurately setting 8887 * these parameters will help reduce wasted file space. 8888 * 8889 * If a group is expected to have many links and to be stored in dense 8890 * format, set \p est_num_entries to 0 (zero) for maximum 8891 * efficiency. This will prevent the group from being created in the 8892 * compact format. 8893 * 8894 * See \ref_group_impls for a discussion of the available types of HDF5 8895 * group structures. 8896 * 8897 * \since 1.8.0 8898 * 8899 */ 8900 H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); 8901 /** 8902 * \ingroup GCPL 8903 * 8904 * \brief Sets creation order tracking and indexing for links in a group 8905 * 8906 * \param[in] plist_id Group or file creation property list 8907 * identifier 8908 * \param[out] crt_order_flags Creation order flag(s) 8909 * 8910 * \return \herr_t 8911 * 8912 * \details H5Pset_link_creation_order() sets flags for tracking and 8913 * indexing links on creation order in groups created with the 8914 * group (or file) creation property list \p plist_id. 8915 * 8916 * \p crt_order_flags contains flags with the following meanings: 8917 * 8918 * <table> 8919 * <tr> 8920 * <td>#H5P_CRT_ORDER_TRACKED</td> 8921 * <td>Link creation order is tracked but not necessarily 8922 * indexed</td> 8923 * </tr> 8924 * <tr> 8925 * <td>#H5P_CRT_ORDER_INDEXED</td> 8926 * <td>Link creation order is indexed (requires 8927 * #H5P_CRT_ORDER_TRACKED)</td> 8928 * </tr> 8929 * </table> 8930 * 8931 * The default behavior is that links are tracked and indexed by 8932 * name, and link creation order is neither tracked nor indexed. 8933 * The name is always the primary index for links in a group. 8934 * 8935 * H5Pset_link_creation_order() can be used to set link creation 8936 * order tracking, or to set link creation order tracking and 8937 * indexing. 8938 * 8939 * If (#H5P_CRT_ORDER_TRACKED | #H5P_CRT_ORDER_INDEXED) is 8940 * specified for \p crt_order_flags, then links will be tracked 8941 * and indexed by creation order. The creation order is added as 8942 * a secondary index and enables faster queries and iterations 8943 * by creation order. 8944 * 8945 * If just #H5P_CRT_ORDER_TRACKED is specified for 8946 * \p crt_order_flags, then links will be tracked by creation 8947 * order, but not indexed by creation order. Queries and iterations 8948 * by creation order will work but will be much slower for large 8949 * groups than if #H5P_CRT_ORDER_INDEXED had been included. 8950 * 8951 * \note If a creation order index is to be built, it must be specified in 8952 * the group creation property list. HDF5 currently provides no 8953 * mechanism to turn on link creation order tracking at group 8954 * creation time and to build the index later. 8955 * 8956 * \since 1.8.0 8957 * 8958 */ 8959 H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); 8960 /** 8961 * \ingroup GCPL 8962 * 8963 * \brief Sets the parameters for conversion between compact and dense 8964 * groups 8965 * 8966 * \gcpl_id{plist_id} 8967 * \param[in] max_compact Maximum number of links for compact storage 8968 * (\a Default: 8) 8969 * \param[in] min_dense Minimum number of links for dense storage 8970 * (\a Default: 6) 8971 * 8972 * \return \herr_t 8973 * 8974 * \details H5Pset_link_phase_change() sets the maximum number of entries 8975 * for a compact group and the minimum number of links to allow 8976 * before converting a dense group back to the compact format. 8977 * 8978 * \p max_compact is the maximum number of links to store as 8979 * header messages in the group header before converting the 8980 * group to the dense format. Groups that are in compact format 8981 * and which exceed this number of links are automatically 8982 * converted to dense format. 8983 * 8984 * \p min_dense is the minimum number of links to store in the 8985 * dense format. Groups which are in dense format and in which 8986 * the number of links falls below this threshold are 8987 * automatically converted to compact format. 8988 * 8989 * \since 1.8.0 8990 * 8991 */ 8992 H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); 8993 /** 8994 * \ingroup GCPL 8995 * 8996 * \brief Specifies the anticipated maximum size of a local heap 8997 * 8998 * \gcpl_id{plist_id} 8999 * \param[in] size_hint Anticipated maximum size in bytes of local heap 9000 * \return \herr_t 9001 * 9002 * \details H5Pset_local_heap_size_hint() is used with original-style HDF5 9003 * groups (see “Motivation” below) to specify the anticipated maximum 9004 * local heap size, size_hint, for groups created with the group 9005 * creation property list \p plist_id. The HDF5 library then uses \p 9006 * size_hint to allocate contiguous local heap space in the file for 9007 * each group created with \p plist_id. 9008 * 9009 * For groups with many members or very few members, an appropriate 9010 * initial value of \p size_hint would be the anticipated number of 9011 * group members times the average length of group member names, plus a 9012 * small margin: 9013 * \code 9014 * size_hint = max_number_of_group_members * 9015 * (average_length_of_group_member_link_names + 2) 9016 * \endcode 9017 * If it is known that there will be groups with zero members, the use 9018 * of a group creation property list with \p size_hint set to to 1 (one) 9019 * will guarantee the smallest possible local heap for each of those groups. 9020 * 9021 * Setting \p size_hint to zero (0) causes the library to make a 9022 * reasonable estimate for the default local heap size. 9023 * 9024 * \par Motivation: 9025 * In situations where backward-compatibility is required, specifically, when 9026 * libraries prior to HDF5 Release 1.8.0 may be used to read the file, groups 9027 * must be created and maintained in the original style. This is HDF5's default 9028 * behavior. If backward compatibility with pre-1.8.0 libraries is not a concern, 9029 * greater efficiencies can be obtained with the new-format compact and indexed 9030 * groups. See <a href="https://\DOXURL/group___h5_g.html">Group 9031 * implementations in HDF5</a> in the \ref H5G API introduction (at the bottom).\n 9032 * H5Pset_local_heap_size_hint() is useful for tuning file size when files 9033 * contain original-style groups with either zero members or very large 9034 * numbers of members.\n 9035 * The original style of HDF5 groups, the only style available prior to HDF5 9036 * Release 1.8.0, was well-suited for moderate-sized groups but was not optimized 9037 * for either very small or very large groups. This original style remains the 9038 * default, but two new group implementations were introduced in HDF5 Release 1.8.0: 9039 * compact groups to accommodate zero to small numbers of members and indexed groups 9040 * for thousands or tens of thousands of members ... or millions, if that's what 9041 * your application requires.\n 9042 * The local heap size hint, \p size_hint, is a performance tuning parameter for 9043 * original-style groups. As indicated above, an HDF5 group may have zero, a handful, 9044 * or tens of thousands of members. Since the original style of HDF5 groups stores the 9045 * metadata for all of these group members in a uniform format in a local heap, the size 9046 * of that metadata (and hence, the size of the local heap) can vary wildly from group 9047 * to group. To intelligently allocate space and to avoid unnecessary fragmentation of 9048 * the local heap, it can be valuable to provide the library with a hint as to the local 9049 * heap's likely eventual size. This can be particularly valuable when it is known that 9050 * a group will eventually have a great many members. It can also be useful in conserving 9051 * space in a file when it is known that certain groups will never have any members. 9052 * 9053 * \since 1.8.0 9054 * 9055 */ 9056 H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); 9057 9058 /* Map access property list (MAPL) routines */ 9059 #ifdef H5_HAVE_MAP_API 9060 /** 9061 * \ingroup MAPL 9062 * 9063 * \brief Set map iteration hints 9064 * 9065 * \mapl_id 9066 * \param[in] key_prefetch_size Number of keys to prefetch at a time during 9067 * iteration 9068 * \param[in] key_alloc_size The initial size of the buffer allocated to hold 9069 * prefetched keys 9070 * \return \herr_t 9071 * 9072 * \details H5Pset_map_iterate_hints() adjusts the behavior of H5Miterate() when 9073 * prefetching keys for iteration. The \p key_prefetch_size parameter 9074 * specifies the number of keys to prefetch at a time during 9075 * iteration. The \p key_alloc_size parameter specifies the initial 9076 * size of the buffer allocated to hold these prefetched keys. If this 9077 * buffer is too small it will be reallocated to a larger size, though 9078 * this may result in an additional I/O. 9079 * 9080 * \since 1.12.0 9081 * 9082 */ 9083 H5_DLL herr_t H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size); 9084 /** 9085 * \ingroup MAPL 9086 * 9087 * \brief Set map iteration hints 9088 * 9089 * \mapl_id 9090 * \param[out] key_prefetch_size Pointer to number of keys to prefetch at a time 9091 * during iteration 9092 * \param[out] key_alloc_size Pointer to the initial size of the buffer allocated 9093 * to hold prefetched keys 9094 * \return \herr_t 9095 * 9096 * \details H5Pget_map_iterate() returns the map iterate hints, \p key_prefetch_size 9097 * and \p key_alloc_size, as set by H5Pset_map_iterate_hints(). 9098 * 9099 * \since 1.12.0 9100 * 9101 */ 9102 H5_DLL herr_t H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/, 9103 size_t *key_alloc_size /*out*/); 9104 #endif /* H5_HAVE_MAP_API */ 9105 9106 /** 9107 * \ingroup ACPL 9108 * 9109 * \brief Retrieves the character encoding used to create a link or 9110 * attribute name 9111 * 9112 * \param[in] plist_id Link creation or attribute creation property list 9113 * identifier 9114 * \param[out] encoding String encoding character set 9115 * 9116 * \return \herr_t 9117 * 9118 * \details H5Pget_char_encoding() retrieves the character encoding used 9119 * to encode link or attribute names that are created with the 9120 * property list \p plist_id. 9121 * 9122 * Valid values for \p encoding are defined in H5Tpublic.h and 9123 * include the following: 9124 * 9125 * \csets 9126 * 9127 * \note H5Pget_char_encoding() retrieves the character set used for an 9128 * HDF5 link or attribute name while H5Tget_cset() retrieves the 9129 * character set used in a character or string datatype. 9130 * 9131 * \since 1.8.0 9132 * 9133 */ 9134 H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/); 9135 /** 9136 * \ingroup ACPL 9137 * 9138 * \brief Sets the character encoding used to encode link and attribute 9139 * names 9140 * 9141 * \param[in] plist_id Link creation or attribute creation property list 9142 * identifier 9143 * \param[in] encoding String encoding character set 9144 * 9145 * \return \herr_t 9146 * 9147 * \details H5Pset_char_encoding() sets the character encoding used for 9148 * the names of links (which provide the names by which objects 9149 * are referenced) or attributes created with the property list 9150 * \p plist_id. 9151 * 9152 * Valid values for encoding include the following: 9153 * \csets 9154 * \details For example, if the character set for the property list 9155 * \p plist_id is set to #H5T_CSET_UTF8, link names pointing to 9156 * objects created with the link creation property list 9157 * \p plist_id will be encoded using the UTF-8 character set. 9158 * Similarly, names of attributes created with the attribute 9159 * creation property list \p plist_id will be encoded as UTF-8. 9160 * 9161 * ASCII and UTF-8 Unicode are the only currently supported 9162 * character encodings. Extended ASCII encodings (for example, 9163 * ISO 8859) are not supported. This encoding policy is not 9164 * enforced by the HDF5 library. Using encodings other than 9165 * ASCII and UTF-8 can lead to compatibility and usability 9166 * problems. 9167 * 9168 * \note H5Pset_char_encoding() sets the character set used for an 9169 * HDF5 link or attribute name while H5Tset_cset() sets the 9170 * character set used in a character or string datatype. 9171 * 9172 * \since 1.8.0 9173 * 9174 */ 9175 H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); 9176 9177 /** 9178 * \ingroup LAPL 9179 * 9180 * \brief Retrieves the external link traversal file access flag from the 9181 * specified link access property list 9182 * 9183 * \lapl_id 9184 * \param[out] flags File access flag for link traversal 9185 * 9186 * \return \herr_t 9187 * 9188 * \details H5Pget_elink_acc_flags() retrieves the file access flag used 9189 * to open an external link target file from the specified link 9190 * access property list. 9191 * 9192 * Valid values for \p flags include: 9193 * \li #H5F_ACC_RDWR - Files opened through external links will 9194 * be opened with write access 9195 * \li #H5F_ACC_RDONLY - Files opened through external links will 9196 * be opened with read-only access 9197 * \li #H5F_ACC_DEFAULT - Files opened through external links will 9198 * be opened with the same access flag as 9199 * the parent file 9200 * 9201 * The value returned, if it is not #H5F_ACC_DEFAULT, will 9202 * override the default access flag, which is the access flag 9203 * used to open the parent file. 9204 * 9205 * <b>Example Usage:</b> 9206 * The following code retrieves the external link access flag 9207 * settings on the link access property list \p lapl_id into a 9208 * local variable: 9209 * <pre> 9210 * unsigned acc_flags; 9211 * status = H5Pget_elink_acc_flags(lapl_id, &acc_flags); 9212 * </pre> 9213 * 9214 * \since 1.8.3 9215 * 9216 */ 9217 H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); 9218 /** 9219 * \ingroup LAPL 9220 * 9221 * \brief Retrieves the external link traversal callback function from the 9222 * specified link access property list 9223 * 9224 * \lapl_id 9225 * \param[out] func User-defined external link traversal callback 9226 * function 9227 * \param[out] op_data User-defined input data for the callback function 9228 * 9229 * \return \herr_t 9230 * 9231 * \details H5Pget_elink_cb() retrieves the user-defined external link 9232 * traversal callback function defined in the specified link 9233 * access property list. 9234 * 9235 * The callback function may adjust the file access property 9236 * list and file access flag to use when opening a file through 9237 * an external link. The callback will be executed by the HDF5 9238 * library immediately before opening the target file. 9239 * 9240 * <b>Failure Modes:</b> H5Pget_elink_cb() will fail if the link 9241 * access property list identifier, \p lapl_id, is invalid. 9242 * 9243 * An invalid function pointer or data pointer, \p func or 9244 * \p op_data respectively, may cause a segmentation fault or an 9245 * invalid memory access. 9246 * 9247 * <b>Example Usage:</b> The following code retrieves the external 9248 * link callback settings on the link access property list 9249 * \p lapl_id into local variables: 9250 * <pre> 9251 * H5L_elink_traverse_t elink_callback_func; 9252 * void *elink_callback_udata; 9253 * status = H5Pget_elink_cb (lapl_id, &elink_callback_func, 9254 * &elink_callback_udata); 9255 * </pre> 9256 * 9257 * \since 1.8.3 9258 * 9259 */ 9260 H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data); 9261 /** 9262 * \ingroup LAPL 9263 * 9264 * \brief Retrieves the file access property list identifier associated 9265 * with the link access property list 9266 * 9267 * \lapl_id 9268 * 9269 * \return \hid_t{file access property list} 9270 * 9271 * \details H5Pget_elink_fapl() retrieves the file access property list 9272 * identifier that is set for the link access property list 9273 * identifier, \p lapl_id. The library uses this file access 9274 * property list identifier to open the target file for the 9275 * external link access. When no such identifier is set, this 9276 * routine returns #H5P_DEFAULT. 9277 * 9278 * \see H5Pset_elink_fapl() and H5Lcreate_external(). 9279 * 9280 * \since 1.8.0 9281 * 9282 */ 9283 H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); 9284 /** 9285 * \ingroup LAPL 9286 * 9287 * \brief Retrieves prefix applied to external link paths 9288 * 9289 * \lapl_id{plist_id} 9290 * \param[out] prefix Prefix applied to external link paths 9291 * \param[in] size Size of prefix, including null terminator 9292 * 9293 * \return If successful, returns a non-negative value specifying the size 9294 * in bytes of the prefix without the NULL terminator; otherwise 9295 * returns a negative value. 9296 * 9297 * \details H5Pget_elink_prefix() retrieves the prefix applied to the 9298 * path of any external links traversed. 9299 * 9300 * When an external link is traversed, the prefix is retrieved 9301 * from the link access property list \p plist_id, returned in 9302 * the user-allocated buffer pointed to by \p prefix, and 9303 * prepended to the filename stored in the external link. 9304 * 9305 * The size in bytes of the prefix, including the NULL terminator, 9306 * is specified in \p size. If size is unknown, a preliminary 9307 * H5Pget_elink_prefix() call with the pointer \p prefix set to 9308 * NULL will return the size of the prefix without the NULL 9309 * terminator. 9310 * 9311 * \since 1.8.0 9312 * 9313 */ 9314 H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); 9315 /** 9316 * \ingroup LAPL 9317 * 9318 * \brief Retrieves the maximum number of link traversals 9319 * 9320 * \lapl_id{plist_id} 9321 * \param[out] nlinks Maximum number of links to traverse 9322 * 9323 * \return \herr_t 9324 * 9325 * \details H5Pget_nlinks() retrieves the maximum number of soft or 9326 * user-defined link traversals allowed, \p nlinks, before the 9327 * library assumes it has found a cycle and aborts the traversal. 9328 * This value is retrieved from the link access property list 9329 * \p plist_id. 9330 * 9331 * The limit on the number of soft or user-defined link traversals 9332 * is designed to terminate link traversal if one or more links 9333 * form a cycle. User control is provided because some files may 9334 * have legitimate paths formed of large numbers of soft or 9335 * user-defined links. This property can be used to allow 9336 * traversal of as many links as desired. 9337 * 9338 * \since 1.8.0 9339 * 9340 */ 9341 H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); 9342 /** 9343 * \ingroup LAPL 9344 * 9345 * \brief Sets the external link traversal file access flag in a link 9346 * access property list 9347 * 9348 * \lapl_id 9349 * \param[in] flags The access flag for external link traversal 9350 * 9351 * \return \herr_t 9352 * 9353 * \details H5Pset_elink_acc_flags() specifies the file access flag to use 9354 * to open the target file of an external link. This allows 9355 * read-only access of files reached through an external link in 9356 * a file opened with write access, or vice-versa. 9357 * 9358 * Valid values for \p flags include: 9359 * \li #H5F_ACC_RDWR - Causes files opened through external links 9360 * to be opened with write access 9361 * \li #H5F_ACC_RDONLY - Causes files opened through external 9362 * links to be opened with read-only access 9363 * \li #H5F_ACC_DEFAULT - Removes any external link file access 9364 * flag setting from \p lapl_id, causing the file access flag 9365 * setting to be taken from the parent file 9366 * 9367 * The library will normally use the file access flag used to 9368 * open the parent file as the file access flag for the target 9369 * file. This function provides a way to override that behavior. 9370 * The external link traversal callback function set by 9371 * H5Pset_elink_cb() can override the setting from 9372 * H5Pset_elink_acc_flags(). 9373 * 9374 * <b>Motivation:</b> H5Pset_elink_acc_flags() is used to adjust the 9375 * file access flag used to open files reached through external links. 9376 * This may be useful to, for example, prevent modifying files 9377 * accessed through an external link. Otherwise, the target file is 9378 * opened with whatever flag was used to open the parent. 9379 * 9380 * <b>Example Usage:</b> The following code sets the link access 9381 * property list \p lapl_id to open external link target files with 9382 * read-only access: 9383 * <pre> 9384 * status = H5Pset_elink_acc_flags(lapl_id, H5F_ACC_RDONLY); 9385 * </pre> 9386 * 9387 * \since 1.8.3 9388 * 9389 */ 9390 H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); 9391 /** 9392 * \ingroup LAPL 9393 * 9394 * \brief Sets the external link traversal callback function in a link 9395 * access property list 9396 * 9397 * \lapl_id 9398 * \param[in] func User-defined external link traversal callback 9399 * function 9400 * \param[in] op_data User-defined input data for the callback function 9401 * 9402 * \return \herr_t 9403 * 9404 * \details H5Pset_elink_cb() sets a user-defined external link traversal 9405 * callback function in the link access property list \p lapl_id. 9406 * The callback function \p func must conform to the prototype 9407 * specified in #H5L_elink_traverse_t. 9408 * 9409 * The callback function may adjust the file access property 9410 * list and file access flags to use when opening a file through 9411 * an external link. The callback will be executed by the HDF5 9412 * library immediately before opening the target file. 9413 * 9414 * The callback will be made after the file access property list 9415 * set by H5Pset_elink_fapl() and the file access flag set by 9416 * H5Pset_elink_acc_flags() are applied, so changes made by this 9417 * callback function will take precedence. 9418 * 9419 * \attention A file close degree property setting (H5Pset_fclose_degree()) 9420 * in this callback function or an associated property list will 9421 * be ignored. A file opened by means of traversing an external 9422 * link is always opened with the weak file close degree 9423 * property setting, #H5F_CLOSE_WEAK. 9424 * 9425 * <b>Motivation:</b> H5Pset_elink_cb() is used to specify a 9426 * callback function that is executed by the HDF5 library when 9427 * traversing an external link. This provides a mechanism to set 9428 * specific access permissions, modify the file access property 9429 * list, modify the parent or target file, or take any other 9430 * user-defined action. This callback function is used in 9431 * situations where the HDF5 library's default behavior is not 9432 * suitable. 9433 * 9434 * <b>Failure Modes:</b> H5Pset_elink_cb() will fail if the link 9435 * access property list identifier, \p lapl_id, is invalid or if 9436 * the function pointer, \p func, is NULL. 9437 * 9438 * An invalid function pointer, \p func, will cause a segmentation 9439 * fault or other failure when an attempt is subsequently made to 9440 * traverse an external link. 9441 * 9442 * <b>Example Usage:</b> 9443 * This example defines a callback function that prints the name 9444 * of the target file every time an external link is followed, and 9445 * sets this callback function on \p lapl_id. 9446 * <pre> 9447 * herr_t elink_callback(const char *parent_file_name, const char 9448 * *parent_group_name, const char *child_file_name, const char 9449 * *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data) { 9450 * puts(child_file_name); 9451 * return 0; 9452 * } 9453 * int main(void) { 9454 * hid_t lapl_id = H5Pcreate(H5P_LINK_ACCESS); 9455 * H5Pset_elink_cb(lapl_id, elink_callback, NULL); 9456 * ... 9457 * } 9458 * </pre> 9459 * 9460 * 9461 * \since 1.8.3 9462 * 9463 */ 9464 H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data); 9465 /** 9466 * \ingroup LAPL 9467 * 9468 * \brief Sets a file access property list for use in accessing a file 9469 * pointed to by an external link 9470 * 9471 * \lapl_id 9472 * \fapl_id 9473 * 9474 * \return \herr_t 9475 * 9476 * \details H5Pset_elink_fapl() sets the file access property list, 9477 * \p fapl_id, to be used when accessing the target file of an 9478 * external link associated with \p lapl_id. 9479 * 9480 * \since 1.8.0 9481 * 9482 */ 9483 H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); 9484 /** 9485 * \ingroup LAPL 9486 * 9487 * \brief Sets prefix to be applied to external link paths 9488 * 9489 * \lapl_id{plist_id} 9490 * \param[in] prefix Prefix to be applied to external link paths 9491 * 9492 * \return \herr_t 9493 * 9494 * \details H5Pset_elink_prefix() sets the prefix to be applied to the 9495 * path of any external links traversed. The prefix is prepended 9496 * to the filename stored in the external link. 9497 * 9498 * The prefix is specified in the user-allocated buffer \p prefix 9499 * and set in the link access property list \p plist_id. The buffer 9500 * should not be freed until the property list has been closed. 9501 * 9502 * \since 1.8.0 9503 * 9504 */ 9505 H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); 9506 /** 9507 * \ingroup LAPL 9508 * 9509 * \brief Sets maximum number of soft or user-defined link traversals 9510 * 9511 * \lapl_id{plist_id} 9512 * \param[in] nlinks Maximum number of links to traverse 9513 * 9514 * \return \herr_t 9515 * 9516 * \details H5Pset_nlinks() sets the maximum number of soft or user-defined 9517 * link traversals allowed, \p nlinks, before the library assumes 9518 * it has found a cycle and aborts the traversal. This value is 9519 * set in the link access property list \p plist_id. 9520 * 9521 * The limit on the number of soft or user-defined link traversals 9522 * is designed to terminate link traversal if one or more links 9523 * form a cycle. User control is provided because some files may 9524 * have legitimate paths formed of large numbers of soft or 9525 * user-defined links. This property can be used to allow 9526 * traversal of as many links as desired. 9527 * 9528 * \since 1.8.0 9529 * 9530 */ 9531 H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); 9532 9533 /* Object copy property list (OCPYPL) routines */ 9534 /** 9535 * \ingroup OCPYPL 9536 * 9537 * \brief Adds a path to the list of paths that will be searched in the 9538 * destination file for a matching committed datatype 9539 * 9540 * \param[in] plist_id Object copy property list identifier 9541 * \param[in] path The path to be added 9542 * 9543 * \return \herr_t 9544 * 9545 * \details H5Padd_merge_committed_dtype_path() adds a path, \p path, 9546 * which points to a committed datatype, to the current list of 9547 * suggested paths stored in the object copy property list 9548 * \p plist_id. The search as described in the next paragraph is 9549 * effective only if the #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is 9550 * enabled in the object copy property list via 9551 * H5Pset_copy_object(). 9552 * 9553 * When copying a committed datatype, a dataset with a committed 9554 * datatype, or an object with an attribute of a committed 9555 * datatype, the default behavior of H5Ocopy() is to search for 9556 * a matching committed datatype: 9557 * <ol> 9558 * <li> First search the list of suggested paths in the object 9559 * copy property list.</li> 9560 * <li> Then, if no match has been found, search all the committed 9561 * datatypes in the destination file. 9562 * </ol> 9563 * The default Step 2 in this search process can be changed by 9564 * setting a callback function (see H5Pset_mcdt_search_cb()). 9565 * 9566 * Two datatypes are determined equal if their descriptions are 9567 * identical, in a manner similar to H5Tequal(). If either 9568 * committed datatype has one or more attributes, then all 9569 * attributes must be present in both committed datatypes and they 9570 * must be identical. Two attributes are considered identical if 9571 * their datatype description, dataspace, and raw data values are 9572 * the same. However, if an attribute uses a committed datatype, 9573 * that committed datatype's attributes will not be compared. 9574 * 9575 * If a match is found, H5Ocopy() will perform the following in 9576 * the destination file: 9577 * \li For a committed datatype, the library will create a hard 9578 * link to the found datatype. 9579 * \li For a dataset that uses a committed datatype, the library 9580 * will modify the copied dataset to use the found committed 9581 * datatype as its datatype. 9582 * \li For an object with an attribute of a committed datatype, 9583 * the library will modify the copied object's attribute to 9584 * use the found committed datatype as its datatype. 9585 * 9586 * If no match is found, H5Ocopy() will perform the following in 9587 * the destination file: 9588 * \li For a committed datatype, the library will copy it as it 9589 * would any other object, creating a named committed 9590 * datatype at the destination. That is, the library will 9591 * create a committed datatype that is accessible in the 9592 * file by a unique path. 9593 * \li For a dataset that uses a committed datatype, the 9594 * library will copy the datatype as an anonymous 9595 * committed datatype and use that as the dataset's 9596 * datatype. 9597 * \li For an object with an attribute of a committed datatype, 9598 * the library will copy the datatype as an anonymous 9599 * committed datatype and use that as the attribute's 9600 * datatype. 9601 * 9602 * \b Motivation: H5Padd_merge_committed_dtype_path() provides a 9603 * means to override the default behavior of H5Ocopy() when 9604 * #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is set in an object 9605 * copy property list. 9606 * H5Padd_merge_committed_dtype_path() is the mechanism for 9607 * suggesting search paths where H5Ocopy() will look for a 9608 * matching committed datatype. This can be substantially 9609 * faster than the default approach of searching the entire 9610 * destination file for a match. 9611 * 9612 * \b Example \b Usage: This example adds two paths to the object 9613 * copy property list. H5Ocopy() will search the two suggested 9614 * paths for a match before searching all the committed datatypes 9615 * in the destination file. 9616 * 9617 * <pre> 9618 * int main(void) { 9619 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9620 * 9621 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9622 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9623 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dset"); 9624 * H5Ocopy(...ocpypl_id...); 9625 * ... 9626 * ... 9627 * } 9628 * </pre> 9629 * 9630 * \note H5Padd_merge_committed_dtype_path() will fail if the object 9631 * copy property list is invalid. 9632 * It will also fail if there is insufficient memory when 9633 * duplicating \p path. 9634 * 9635 * \see 9636 * \li H5Ocopy() 9637 * \li #H5O_mcdt_search_cb_t 9638 * \li H5Padd_merge_committed_dtype_path() 9639 * \li H5Pfree_merge_committed_dtype_paths() 9640 * \li H5Pget_mcdt_search_cb() 9641 * \li H5Pset_copy_object() 9642 * \li H5Pset_mcdt_search_cb() 9643 * \li \ref_h5ocopy 9644 * 9645 * \since 1.8.9 9646 * 9647 */ 9648 H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); 9649 /** 9650 * \ingroup OCPYPL 9651 * 9652 * \brief Clears the list of paths stored in the object copy property list 9653 * 9654 * \param[in] plist_id Object copy property list identifier 9655 * 9656 * \return \herr_t 9657 * 9658 * \details H5Pfree_merge_committed_dtype_paths() clears the suggested 9659 * paths stored in the object copy property list \p plist_id. 9660 * These are the suggested paths previously set with 9661 * H5Padd_merge_committed_dtype_path(). 9662 * 9663 * \b Example \b Usage: This example adds a suggested path to the 9664 * object copy property list, does the copy, clears the list, and 9665 * then adds a new suggested path to the list for another copy. 9666 * 9667 * <pre> 9668 * int main(void) { 9669 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9670 * 9671 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9672 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9673 * H5Ocopy(...ocpypl_id...); 9674 * ... 9675 * ... 9676 * H5Pfree_merge_committed_dtype_paths(ocpypl_id); 9677 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dtypeB"); 9678 * H5Ocopy(...ocpypl_id...); 9679 * ... 9680 * ... 9681 * } 9682 * </pre> 9683 * 9684 * \note H5Pfree_merge_committed_dtype_paths() will fail if the 9685 * object copy property list is invalid. 9686 * 9687 * \see 9688 * \li H5Ocopy() 9689 * \li #H5O_mcdt_search_cb_t 9690 * \li H5Padd_merge_committed_dtype_path() 9691 * \li H5Pfree_merge_committed_dtype_paths() 9692 * \li H5Pget_mcdt_search_cb() 9693 * \li H5Pset_copy_object() 9694 * \li H5Pset_mcdt_search_cb() 9695 * 9696 * \since 1.8.9 9697 * 9698 */ 9699 H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); 9700 /** 9701 * \ingroup OCPYPL 9702 * 9703 * \brief Retrieves the properties to be used when an object is copied 9704 * 9705 * \param[in] plist_id Object copy property list identifier 9706 * \param[out] copy_options Copy option(s) set in the object copy property 9707 * list 9708 * 9709 * \return \herr_t 9710 * 9711 * \details H5Pget_copy_object() retrieves the properties currently 9712 * specified in the object copy property list \p plist_id, which 9713 * will be invoked when a new copy is made of an existing object. 9714 * 9715 * \p copy_options is a bit map indicating the flags, or 9716 * properties, governing object copying that are set in the 9717 * property list \p plist_id. 9718 * 9719 * The available flags are described in H5Pset_copy_object(). 9720 * 9721 * \since 1.8.0 9722 * 9723 */ 9724 H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *copy_options /*out*/); 9725 /** 9726 * \ingroup OCPYPL 9727 * 9728 * \brief Retrieves the callback function from the specified object copy 9729 * property list 9730 * 9731 * \param[in] plist_id Object copy property list identifier 9732 * \param[out] func User-defined callback function 9733 * \param[out] op_data User-defined data for the callback 9734 * function 9735 * 9736 * \return \herr_t 9737 * 9738 * \details H5Pget_mcdt_search_cb() retrieves the user-defined callback 9739 * function and the user data that are set via 9740 * H5Pset_mcdt_search_cb() in the object copy property list 9741 * \p plist_id. 9742 * 9743 * The callback function will be returned in the parameter \p func 9744 * and the user data will be returned in the parameter \p op_data. 9745 * 9746 * \note H5Pget_mcdt_search_cb() will fail if the object copy property 9747 * list is invalid. 9748 * 9749 * \see 9750 * \li H5Ocopy() 9751 * \li #H5O_mcdt_search_cb_t 9752 * \li H5Padd_merge_committed_dtype_path() 9753 * \li H5Pfree_merge_committed_dtype_paths() 9754 * \li H5Pget_mcdt_search_cb() 9755 * \li H5Pset_copy_object() 9756 * \li H5Pset_mcdt_search_cb() 9757 * \li \ref_h5ocopy 9758 * 9759 * \since 1.8.9 9760 * 9761 */ 9762 H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data); 9763 /** 9764 * \ingroup OCPYPL 9765 * 9766 * \brief Sets properties to be used when an object is copied 9767 * 9768 * \param[in] plist_id Object copy property list identifier 9769 * \param[out] copy_options Copy option(s) to be set 9770 * 9771 * \return \herr_t 9772 * 9773 * \details H5Pset_copy_object() sets properties in the object copy 9774 * property list \p plist_id. When an existing object is copied, 9775 * that property list will determine how the new copy is created. 9776 * 9777 * The following flags are available for use in an object copy 9778 * property list: 9779 * 9780 * <table> 9781 * <tr> 9782 * <td>#H5O_COPY_SHALLOW_HIERARCHY_FLAG</td> 9783 * <td>Copy only immediate members of a group<br /> 9784 * <em>Default behavior, without flag:</em> Recursively 9785 * copy all objects in and below the group.</td> 9786 * </tr> 9787 * <tr> 9788 * <td>#H5O_COPY_EXPAND_SOFT_LINK_FLAG</td> 9789 * <td>Expand soft links into new objects<br /> 9790 * <em>Default behavior, without flag:</em> Copy soft 9791 * links as they are.</td> 9792 * </tr> 9793 * <tr> 9794 * <td>#H5O_COPY_EXPAND_EXT_LINK_FLAG</td> 9795 * <td>Expand external link into new objects<br /> 9796 * <em>Default behavior, without flag:</em> Copy external 9797 * links as they are.</td> 9798 * </tr> 9799 * <tr> 9800 * <td>#H5O_COPY_EXPAND_REFERENCE_FLAG</td> 9801 * <td>Copy objects that are pointed to by references and 9802 * update reference values in destination file<br /> 9803 * <em>Default behavior, without flag:</em> Set reference 9804 * values in destination file to zero (0)</td> 9805 * </tr> 9806 * <tr> 9807 * <td>#H5O_COPY_WITHOUT_ATTR_FLAG</td> 9808 * <td>Copy object without copying attributes<br /> 9809 * <em>Default behavior, without flag:</em> Copy object 9810 * with all its attributes</td> 9811 * </tr> 9812 * <tr> 9813 * <td>#H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG</td> 9814 * <td>Use a matching committed datatype in the destination 9815 * file when copying a committed datatype, a dataset with 9816 * a committed datatype, or an object with an attribute 9817 * of committed datatype <br /> 9818 * <em>Default behavior without flag:</em> 9819 * 9820 * \li A committed datatype in the source will be copied to 9821 * the destination as a committed datatype. 9822 * \li If a dataset in the source uses a committed 9823 * datatype or an object in the source has an attribute 9824 * of a committed datatype, that committed datatype will 9825 * be written to the destination as an anonymous 9826 * committed datatype. 9827 * If copied in a single H5Ocopy() operation, objects 9828 * that share a committed datatype in the source will 9829 * share an anonymous committed datatype in the 9830 * destination copy. Subsequent H5Ocopy() operations, 9831 * however, will be unaware of prior anonymous committed 9832 * datatypes and will create new ones. 9833 * 9834 * See the “See Also” section immediately below for 9835 * functions related to the use of this flag.</td> 9836 * </tr> 9837 * </table> 9838 * 9839 * \see 9840 * Functions and a callback function used to tune committed datatype 9841 * copying behavior: 9842 * \li #H5O_mcdt_search_cb_t 9843 * \li H5Padd_merge_committed_dtype_path() 9844 * \li H5Pfree_merge_committed_dtype_paths() 9845 * \li H5Pget_mcdt_search_cb() 9846 * \li H5Pset_copy_object() 9847 * \li H5Pset_mcdt_search_cb() 9848 * \li \ref_h5ocopy 9849 * 9850 * \version 1.8.9 #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG added in this release. 9851 * 9852 * \since 1.8.0 9853 * 9854 */ 9855 H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned copy_options); 9856 /** 9857 * \ingroup OCPYPL 9858 * 9859 * \brief Sets the callback function that H5Ocopy() will invoke before 9860 * searching the entire destination file for a matching committed 9861 * datatype 9862 * 9863 * \param[in] plist_id Object copy property list identifier 9864 * \param[in] func User-defined callback function 9865 * \param[in] op_data User-defined input data for the callback function 9866 * 9867 * \return \herr_t 9868 * 9869 * \details H5Pset_mcdt_search_cb() allows an application to set a 9870 * callback function, \p func, that will be invoked before 9871 * searching the destination file for a matching committed 9872 * datatype. The default, global search process is described in 9873 * H5Padd_merge_committed_dtype_path(). 9874 * 9875 * The callback function must conform to the #H5O_mcdt_search_cb_t 9876 * prototype and will return an instruction for one of the 9877 * following actions: 9878 * 9879 * \li Continue the search for a matching committed datatype in 9880 * the destination file. 9881 * \li Discontinue the search for a matching committed datatype. 9882 * H5Ocopy() will then apply the default behavior of creating 9883 * an anonymous committed datatype. 9884 * \li Abort the copy operation and exit H5Ocopy(). 9885 * 9886 * \b Motivation: H5Pset_mcdt_search_cb() provides the means to 9887 * define a callback function. An application can then use that 9888 * callback to take an additional action before the default search 9889 * of all committed datatypes in the destination file or to take an 9890 * action that replaces the default search. This mechanism is 9891 * intended to improve performance when the global search might 9892 * take a long time. 9893 * 9894 * \b Example \b Usage: This example defines a callback function in 9895 * the object copy property list. 9896 * 9897 * <pre> 9898 * static H5O_mcdt_search_ret_t 9899 * mcdt_search_cb(void *_udata) 9900 * { 9901 * H5O_mcdt_search_ret_t action = *((H5O_mcdt_search_ret_t *)_udata); 9902 * 9903 * return(action); 9904 * } 9905 * 9906 * int main(void) { 9907 * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY); 9908 * 9909 * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG); 9910 * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA"); 9911 * 9912 * action = H5O_MCDT_SEARCH_STOP; 9913 * H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &action); 9914 * H5Ocopy(...ocpypl_id...); 9915 * ... 9916 * ... 9917 * } 9918 * </pre> 9919 * 9920 * \note H5Pset_mcdt_search_cb() will fail if the 9921 * object copy property list is invalid. 9922 * 9923 * \warning If the callback function return value causes H5Ocopy() to 9924 * abort, the destination file may be left in an inconsistent or 9925 * corrupted state. 9926 * 9927 * \see 9928 * \li H5Ocopy() 9929 * \li #H5O_mcdt_search_cb_t 9930 * \li H5Padd_merge_committed_dtype_path() 9931 * \li H5Pfree_merge_committed_dtype_paths() 9932 * \li H5Pget_mcdt_search_cb() 9933 * \li H5Pset_copy_object() 9934 * \li H5Pset_mcdt_search_cb() 9935 * \li \ref_h5ocopy 9936 * 9937 * \since 1.8.9 9938 * 9939 */ 9940 H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data); 9941 9942 /* Symbols defined for compatibility with previous versions of the HDF5 API. 9943 * 9944 * Use of these symbols is deprecated. 9945 */ 9946 #ifndef H5_NO_DEPRECATED_SYMBOLS 9947 9948 /* Macros */ 9949 9950 /* We renamed the "root" of the property list class hierarchy */ 9951 #define H5P_NO_CLASS H5P_ROOT 9952 9953 /* Typedefs */ 9954 /** 9955 * \ingroup PLCRA 9956 * 9957 * \brief Registers a permanent property with a property list class 9958 * 9959 * \plistcls_id{cls_id} 9960 * \param[in] name Name of property to register 9961 * \param[in] size Size of property in bytes 9962 * \param[in] def_value Default value for property in newly created 9963 * property lists 9964 * \param[in] prp_create Callback routine called when a property list is 9965 * being created and the property value will be 9966 * initialized 9967 * \param[in] prp_set Callback routine called before a new value is 9968 * copied into the property's value 9969 * \param[in] prp_get Callback routine called when a property value is 9970 * retrieved from the property 9971 * \param[in] prp_del Callback routine called when a property is deleted 9972 * from a property list 9973 * \param[in] prp_copy Callback routine called when a property is copied 9974 * from a property list 9975 * \param[in] prp_close Callback routine called when a property list is 9976 * being closed and the property value will be 9977 * disposed of 9978 * 9979 * \return \herr_t 9980 * 9981 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 9982 * H5Pregister2() or the macro H5Pregister(). 9983 * 9984 * \details H5Pregister1() registers a new property with a property list 9985 * class. The property will exist in all property list objects 9986 * of that class after this routine is finished. The name of 9987 * the property must not already exist. The default property 9988 * value must be provided and all new property lists created 9989 * with this property will have the property value set to the 9990 * default provided. Any of the callback routines may be set 9991 * to NULL if they are not needed. 9992 * 9993 * Zero-sized properties are allowed and do not store any data in 9994 * the property list. These may be used as flags to indicate the 9995 * presence or absence of a particular piece of information. The 9996 * default pointer for a zero-sized property may be set to NULL. 9997 * The property \p prp_create and \p prp_close callbacks are called for 9998 * zero-sized properties, but the \p prp_set and \p prp_get callbacks 9999 * are never called. 10000 * 10001 * The \p prp_create routine is called when a new property list with 10002 * this property is being created. The #H5P_prp_create_func_t 10003 * callback function is defined as #H5P_prp_cb1_t. 10004 * 10005 * The \p prp_create routine may modify the value to be set and those 10006 * changes will be stored as the initial value of the property. 10007 * If the \p prp_create routine returns a negative value, the new 10008 * property value is not copied into the property and the 10009 * \p prp_create routine returns an error value. 10010 * 10011 * The \p prp_set routine is called before a new value is copied into 10012 * the property. The #H5P_prp_set_func_t callback function is defined 10013 * as #H5P_prp_cb2_t. 10014 * 10015 * The \p prp_set routine may modify the value pointer to be set and 10016 * those changes will be used when setting the property's value. 10017 * If the \p prp_set routine returns a negative value, the new property 10018 * value is not copied into the property and the \p prp_set routine 10019 * returns an error value. The \p prp_set routine will not be called 10020 * for the initial value; only the \p prp_create routine will be 10021 * called. 10022 * 10023 * \b Note: The \p prp_set callback function may be useful to range 10024 * check the value being set for the property or may perform some 10025 * transformation or translation of the value set. The \p prp_get 10026 * callback would then reverse the transformation or translation. 10027 * A single \p prp_get or \p prp_set callback could handle multiple 10028 * properties by performing different actions based on the property 10029 * name or other properties in the property list. 10030 * 10031 * The \p prp_get routine is called when a value is retrieved from a 10032 * property value. The #H5P_prp_get_func_t callback function is 10033 * defined as #H5P_prp_cb2_t. 10034 * 10035 * The \p prp_get routine may modify the value to be returned from the 10036 * query and those changes will be returned to the calling routine. 10037 * If the \p prp_set routine returns a negative value, the query 10038 * routine returns an error value. 10039 * 10040 * The \p prp_del routine is called when a property is being 10041 * deleted from a property list. The #H5P_prp_delete_func_t 10042 * callback function is defined as #H5P_prp_cb2_t. 10043 * 10044 * The \p prp_del routine may modify the value passed in, but the 10045 * value is not used by the library when the \p prp_del routine 10046 * returns. If the \p prp_del routine returns a negative value, 10047 * the property list deletion routine returns an error value but 10048 * the property is still deleted. 10049 * 10050 * The \p prp_copy routine is called when a new property list with 10051 * this property is being created through a \p prp_copy operation. 10052 * The #H5P_prp_copy_func_t callback function is defined as 10053 * #H5P_prp_cb1_t. 10054 * 10055 * The \p prp_copy routine may modify the value to be set and those 10056 * changes will be stored as the new value of the property. If 10057 * the \p prp_copy routine returns a negative value, the new 10058 * property value is not copied into the property and the \p prp_copy 10059 * routine returns an error value. 10060 * 10061 * The \p prp_close routine is called when a property list with this 10062 * property is being closed. The #H5P_prp_close_func_t callback 10063 * function is defined as #H5P_prp_cb1_t. 10064 * 10065 * The \p prp_close routine may modify the value passed in, but the 10066 * value is not used by the library when the \p prp_close routine 10067 * returns. If the \p prp_close routine returns a negative value, the 10068 * property list close routine returns an error value but the property 10069 * list is still closed. 10070 * 10071 * The #H5P_prp_cb1_t is as follows: 10072 * \snippet this H5P_prp_cb1_t_snip 10073 * 10074 * The #H5P_prp_cb2_t is as follows: 10075 * \snippet this H5P_prp_cb2_t_snip 10076 * 10077 * \since 1.4.0 10078 * 10079 */ 10080 10081 /* Function prototypes */ 10082 H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, 10083 H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, 10084 H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, 10085 H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); 10086 /** 10087 * \ingroup PLCRA 10088 * 10089 * \brief Registers a temporary property with a property list 10090 * 10091 * \plist_id 10092 * \param[in] name Name of property to create 10093 * \param[in] size Size of property in bytes 10094 * \param[in] value Initial value for the property 10095 * \param[in] prp_set Callback routine called before a new value is copied 10096 * into the property's value 10097 * \param[in] prp_get Callback routine called when a property value is 10098 * retrieved from the property 10099 * \param[in] prp_delete Callback routine called when a property is deleted 10100 * from a property list 10101 * \param[in] prp_copy Callback routine called when a property is copied 10102 * from an existing property list 10103 * \param[in] prp_close Callback routine called when a property list is 10104 * being closed and the property value will be disposed 10105 * of 10106 * 10107 * \return \herr_t 10108 * 10109 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 10110 * H5Pinsert2() or the macro H5Pinsert(). 10111 * 10112 * \details H5Pinsert1() creates a new property in a property 10113 * list. The property will exist only in this property list and 10114 * copies made from it. 10115 * 10116 * The initial property value must be provided in \p value and 10117 * the property value will be set accordingly. 10118 * 10119 * The name of the property must not already exist in this list, 10120 * or this routine will fail. 10121 * 10122 * The \p prp_set and \p prp_get callback routines may be set to NULL 10123 * if they are not needed. 10124 * 10125 * Zero-sized properties are allowed and do not store any data 10126 * in the property list. The default value of a zero-size 10127 * property may be set to NULL. They may be used to indicate the 10128 * presence or absence of a particular piece of information. 10129 * 10130 * The \p prp_set routine is called before a new value is copied 10131 * into the property. The #H5P_prp_set_func_t callback function 10132 * is defined as #H5P_prp_cb2_t. 10133 * The \p prp_set routine may modify the value pointer to be set and 10134 * those changes will be used when setting the property's value. 10135 * If the \p prp_set routine returns a negative value, the new property 10136 * value is not copied into the property and the \p set routine 10137 * returns an error value. The \p prp_set routine will be called for 10138 * the initial value. 10139 * 10140 * \b Note: The \p prp_set callback function may be useful to range 10141 * check the value being set for the property or may perform some 10142 * transformation or translation of the value set. The \p prp_get 10143 * callback would then reverse the transformation or translation. 10144 * A single \p prp_get or \p prp_set callback could handle multiple 10145 * properties by performing different actions based on the 10146 * property name or other properties in the property list. 10147 * 10148 * The \p prp_get routine is called when a value is retrieved from 10149 * a property value. The #H5P_prp_get_func_t callback function 10150 * is defined as #H5P_prp_cb2_t. 10151 * 10152 * The \p prp_get routine may modify the value to be returned from 10153 * the query and those changes will be preserved. If the \p prp_get 10154 * routine returns a negative value, the query routine returns 10155 * an error value. 10156 * 10157 * The \p prp_delete routine is called when a property is being 10158 * deleted from a property list. The #H5P_prp_delete_func_t 10159 * callback function is defined as #H5P_prp_cb2_t. 10160 * 10161 * The \p prp_copy routine is called when a new property list with 10162 * this property is being created through a \p prp_copy operation. 10163 * The #H5P_prp_copy_func_t callback function is defined as 10164 * #H5P_prp_cb1_t. 10165 * 10166 * The \p prp_copy routine may modify the value to be set and those 10167 * changes will be stored as the new value of the property. If the 10168 * \p prp_copy routine returns a negative value, the new property value 10169 * is not copied into the property and the prp_copy routine returns an 10170 * error value. 10171 * 10172 * The \p prp_close routine is called when a property list with this 10173 * property is being closed. 10174 * The #H5P_prp_close_func_t callback function is defined as 10175 * #H5P_prp_cb1_t. 10176 * 10177 * The \p prp_close routine may modify the value passed in, the 10178 * value is not used by the library when the close routine 10179 * returns. If the \p prp_close routine returns a negative value, 10180 * the property list \p prp_close routine returns an error value 10181 * but the property list is still closed. 10182 * 10183 * \b Note: There is no \p prp_create callback routine for temporary 10184 * property list objects; the initial value is assumed to 10185 * have any necessary setup already performed on it. 10186 * 10187 * The #H5P_prp_cb1_t is as follows: 10188 * \snippet this H5P_prp_cb1_t_snip 10189 * 10190 * The #H5P_prp_cb2_t is as follows: 10191 * \snippet this H5P_prp_cb2_t_snip 10192 * 10193 * \since 1.4.0 10194 * 10195 */ 10196 H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, 10197 H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, 10198 H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, 10199 H5P_prp_close_func_t prp_close); 10200 /** 10201 * \ingroup PLCRA 10202 * 10203 * \brief Encodes the property values in a property list into a binary 10204 * buffer 10205 * 10206 * \plist_id 10207 * \param[out] buf Buffer into which the property list will be encoded. 10208 * If the provided buffer is NULL, the size of the 10209 * buffer required is returned through \p nalloc; the 10210 * function does nothing more. 10211 * \param[out] nalloc The size of the required buffer 10212 * 10213 * \return \herr_t 10214 * 10215 * \deprecated As of HDF5-1.12 this function has been deprecated in favor of 10216 * H5Pencode2() or the macro H5Pencode(). 10217 * 10218 * \details H5Pencode1() encodes the property list \p plist_id into the 10219 * binary buffer \p buf. 10220 * 10221 * If the required buffer size is unknown, \p buf can be passed 10222 * in as NULL and the function will set the required buffer size 10223 * in \p nalloc. The buffer can then be created and the property 10224 * list encoded with a subsequent H5Pencode1() call. 10225 * 10226 * If the buffer passed in is not big enough to hold the encoded 10227 * properties, the H5Pencode1() call can be expected to fail with 10228 * a segmentation fault. 10229 * 10230 * Properties that do not have encode callbacks will be skipped. 10231 * There is currently no mechanism to register an encode callback for 10232 * a user-defined property, so user-defined properties cannot currently 10233 * be encoded. 10234 * 10235 * Some properties cannot be encoded, particularly properties that are 10236 * reliant on local context. 10237 * 10238 * \since 1.10.0 10239 * 10240 */ 10241 H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc); 10242 /** 10243 * \ingroup DCPL 10244 * 10245 * \brief Returns information about a filter in a pipeline (DEPRECATED) 10246 * 10247 * 10248 * 10249 * \plist_id{plist_id} 10250 * \param[in] filter Sequence number within the filter pipeline of 10251 * the filter for which information is sought 10252 * \param[out] flags Bit vector specifying certain general properties 10253 * of the filter 10254 * \param[in,out] cd_nelmts Number of elements in \p cd_values 10255 * \param[out] cd_values Auxiliary data for the filter 10256 * \param[in] namelen Anticipated number of characters in \p name 10257 * \param[out] name Name of the filter 10258 * 10259 * \return Returns the filter identifier if successful; Otherwise returns 10260 * a negative value. See: #H5Z_filter_t 10261 * 10262 * \deprecated When was this function deprecated? 10263 * 10264 * \details H5Pget_filter1() returns information about a filter, specified 10265 * by its filter number, in a filter pipeline, specified by the 10266 * property list with which it is associated. 10267 * 10268 * \p plist_id must be a dataset or group creation property list. 10269 * 10270 * \p filter is a value between zero and N-1, as described in 10271 * H5Pget_nfilters(). The function will return a negative value 10272 * if the filter number is out of range. 10273 * 10274 * The structure of the \p flags argument is discussed in 10275 * H5Pset_filter(). 10276 * 10277 * On input, \p cd_nelmts indicates the number of entries in the 10278 * \p cd_values array, as allocated by the caller; on return, 10279 * \p cd_nelmts contains the number of values defined by the filter. 10280 * 10281 * If \p name is a pointer to an array of at least \p namelen 10282 * bytes, the filter name will be copied into that array. The name 10283 * will be null terminated if \p namelen is large enough. The 10284 * filter name returned will be the name appearing in the file, the 10285 * name registered for the filter, or an empty string. 10286 * 10287 * \version 1.8.5 Function extended to work with group creation property 10288 * lists. 10289 * \version 1.8.0 N-bit and scale-offset filters added. 10290 * \version 1.8.0 Function H5Pget_filter() renamed to H5Pget_filter1() and 10291 * deprecated in this release. 10292 * \version 1.6.4 \p filter parameter type changed to unsigned. 10293 * 10294 * \since 1.0.0 10295 * 10296 */ 10297 H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/, 10298 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 10299 char name[]); 10300 /** 10301 * \ingroup DCPL 10302 * 10303 * \brief Returns information about the specified filter 10304 * 10305 * \plist_id{plist_id} 10306 * \param[in] id Filter identifier 10307 * \param[out] flags Bit vector specifying certain general properties 10308 * of the filter 10309 * \param[in,out] cd_nelmts Number of elements in \p cd_values 10310 * \param[out] cd_values Auxiliary data for the filter 10311 * \param[in] namelen Anticipated number of characters in \p name 10312 * \param[out] name Name of the filter 10313 * 10314 * 10315 * \return Returns a non-negative value if successful; Otherwise returns 10316 * a negative value. 10317 * 10318 * \deprecated As of HDF5-1.8 this function was deprecated in favor of 10319 * H5Pget_filter_by_id2() or the macro H5Pget_filter_by_id(). 10320 * 10321 * \details H5Pget_filter_by_id1() returns information about a filter, specified 10322 * in \p id, a filter identifier. 10323 * 10324 * \p plist_id must be a dataset or group creation property list and 10325 * \p id must be in the associated filter pipeline. 10326 * 10327 * The \p id and \p flags parameters are used in the same 10328 * manner as described in the discussion of H5Pset_filter(). 10329 * 10330 * Aside from the fact that they are used for output, the parameters 10331 * \p cd_nelmts and \p cd_values[] are used in the same manner as 10332 * described in the discussion of H5Pset_filter(). 10333 * On input, the \p cd_nelmts parameter indicates the number of entries 10334 * in the \p cd_values[] array allocated by the calling program; 10335 * on exit it contains the number of values defined by the filter. 10336 * 10337 * On input, the \p namelen parameter indicates the number of 10338 * characters allocated for the filter name by the calling program 10339 * in the array \p name[]. On exit \p name[] contains the name of the 10340 * filter with one character of the name in each element of the array. 10341 * 10342 * If the filter specified in \p id is not set for the property 10343 * list, an error will be returned and this function will fail. 10344 * 10345 * 10346 * \version 1.8.5 Function extended to work with group creation property 10347 * lists. 10348 * \version 1.8.0 Function H5Pget_filter_by_id() renamed to 10349 * H5Pget_filter_by_id1() and deprecated in this release. 10350 * 10351 * \since 1.6.0 10352 * 10353 */ 10354 H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, 10355 size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, 10356 char name[] /*out*/); 10357 /** 10358 * \ingroup FCPL 10359 * 10360 * \brief Retrieves the version information of various objects 10361 * for a file creation property list(deprecated) 10362 * 10363 * \plist_id 10364 * \param[out] boot Pointer to location to return super block version number 10365 * \param[out] freelist Pointer to location to return global freelist version number 10366 * \param[out] stab Pointer to location to return symbol table version number 10367 * \param[out] shhdr Pointer to location to return shared object header version 10368 * number 10369 * 10370 * \return \herr_t 10371 * 10372 * \deprecated Deprecated in favor of the function H5Fget_info() 10373 * 10374 * \details H5Pget_version() retrieves the version information of various objects 10375 * for a file creation property list. Any pointer parameters which are 10376 * passed as NULL are not queried. 10377 * 10378 * \version 1.6.4 \p boot, \p freelist, \p stab, \p shhdr parameter types 10379 * changed to unsigned. 10380 * 10381 * \since 1.0.0 10382 * 10383 */ 10384 H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/, 10385 unsigned *stab /*out*/, unsigned *shhdr /*out*/); 10386 /** 10387 * \ingroup FCPL 10388 * 10389 * \brief Sets the file space handling strategy and the free-space section 10390 * size threshold. 10391 * 10392 * \fcpl_id{plist_id} 10393 * \param[in] strategy The file space handling strategy to be used. See: 10394 * #H5F_fspace_strategy_t 10395 * \param[in] threshold The smallest free-space section size that the free 10396 * space manager will track 10397 * 10398 * \return \herr_t 10399 * 10400 * \deprecated When was this function deprecated? 10401 * 10402 * \details Maps to the function H5Pset_file_space_strategy(). 10403 * 10404 * \since 1.10.0 10405 * 10406 */ 10407 H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); 10408 /** 10409 * \ingroup FCPL 10410 * 10411 * \brief Retrieves the file space handling strategy, and threshold value for 10412 * a file creation property list 10413 * 10414 * \fcpl_id{plist_id} 10415 * \param[out] strategy Pointer to the file space handling strategy 10416 * \param[out] threshold Pointer to the free-space section size threshold value 10417 * 10418 * \return \herr_t 10419 * 10420 * \deprecated When was this function deprecated? 10421 * 10422 * \details Maps to the function H5Pget_file_space_strategy() 10423 * 10424 * \since 1.10.0 10425 * 10426 */ 10427 H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); 10428 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 10429 10430 #ifdef __cplusplus 10431 } 10432 #endif 10433 #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 |
![]() ![]() |