-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doxygen comments in H5Ppublic.h (#375)
* Add doxygen comments in H5Ppublic.h * H5Pset_meta_block_size * H5Pset_metadata_read_attempts * H5Pset_multi_type * H5Pset_object_flush_cb * H5Pset_sieve_buf_size * H5Pset_small_data_block_size * H5Pset_all_coll_metadata_ops * H5Pget_all_coll_metadata_ops * Add DOXYGEN_EXAMPLES_DIR to src/CMakeLists.txt * Fix clang-format errors * Fix filenames in doxygen/examples
- Loading branch information
1 parent
a9ee5b9
commit 06c9ebe
Showing
10 changed files
with
528 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** | ||
* \page maybe_metadata_reads Functions with No Access Property List Parameter that May Generate Metadata Reads | ||
* | ||
* \ingroup GACPL | ||
* | ||
* Currently there are several operations in HDF5 that can issue metadata reads | ||
* from the metadata cache, but that take no property list. It is therefore not | ||
* possible to set a collective requirement individually for those operations. The | ||
* only solution with the HDF5 1.10.0 release is to set the collective requirement | ||
* globally on H5Fopen() or H5Fcreate() for all metadata operations to be | ||
* collective. | ||
* | ||
* The following is a list of those functions in the HDF5 library. This list is | ||
* integral to the discussion in the H5Pset_all_coll_metadata_ops() entry: | ||
* | ||
* <pre> | ||
* | ||
* H5Awrite() | ||
* H5Aread() | ||
* H5Arename() | ||
* H5Aiterate2() | ||
* H5Adelete() | ||
* H5Aexists() | ||
* | ||
* H5Dget_space_status() | ||
* H5Dget_storage_size() | ||
* H5Dset_extent() | ||
* H5Ddebug() | ||
* H5Dclose() | ||
* H5Dget_create_plist() | ||
* H5Dget_space() (when dataset is a virtual dataset) | ||
* | ||
* H5Gget_create_plist() | ||
* H5Gget_info() | ||
* H5Gclose() | ||
* | ||
* H5Literate() | ||
* H5Lvisit() | ||
* | ||
* H5Rcreate() | ||
* H5Rdereference2() (when reference is an object reference) | ||
* H5Rget_region() | ||
* H5Rget_obj_type2() | ||
* H5Rget_name() | ||
* | ||
* H5Ocopy() | ||
* H5Oopen_by_addr() | ||
* H5Oincr_refcount() | ||
* H5Odecr_refcount() | ||
* H5Oget_info() | ||
* H5Oset_comment() | ||
* H5Ovisit() | ||
* | ||
* H5Fis_hdf5() | ||
* H5Fflush() | ||
* H5Fclose() | ||
* H5Fget_file_image() | ||
* H5Freopen() | ||
* H5Fget_freespace() | ||
* H5Fget_info2() | ||
* H5Fget_free_sections() | ||
* H5Fmount() | ||
* H5Funmount() | ||
* | ||
* H5Iget_name() | ||
* | ||
* H5Tget_create_plist() | ||
* H5Tclose() | ||
* | ||
* H5Zunregister() | ||
* </pre> | ||
* | ||
* In addition, \b most deprecated functions fall into this category. | ||
* | ||
* The HDF Group may address the above limitation in a future major release, but | ||
* no decision has been made at this time. Such a change might, for example, | ||
* include adding new versions of some or all the above functions with an extra | ||
* property list parameter to allow an individual setting for the collective | ||
* calling requirement. | ||
* | ||
* \sa_metadata_ops | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//! [SWMR Access] | ||
/* Create a copy of file access property list */ | ||
fapl = H5Pcreate(H5P_FILE_ACCESS); | ||
|
||
/* Set the # of read attempts */ | ||
H5Pset_metadata_read_attempts(fapl, 20); | ||
|
||
/* Open the file with SWMR access and the non-default file access property list */ | ||
fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl); | ||
|
||
/* Get the file's file access roperty list */ | ||
file_fapl = H5Fget_access_plist(fid); | ||
|
||
/* Retrieve the # of read attempts from the file's file access property list */ | ||
H5Pget_metadata_read_attempts(file_fapl, &attempts); | ||
|
||
/* | ||
* The value returned in "attempts" will be 20. | ||
* The library will use 20 as the number of read attempts | ||
* when reading checksummed metadata in the file | ||
*/ | ||
|
||
/* Close the property list */ | ||
H5Pclose(fapl); | ||
H5Pclose(file_fapl); | ||
|
||
/* Close the file */ | ||
H5Fclose(fid); | ||
//! [SWMR Access] | ||
|
||
//! [non-SWMR Access] | ||
/* Create a copy of file access property list */ | ||
fapl = H5Pcreate(H5P_FILE_ACCESS); | ||
|
||
/* Set the # of read attempts */ | ||
H5Pset_metadata_read_attempts(fapl, 20); | ||
|
||
/* Open the file with SWMR access and the non-default file access property list */ | ||
fid = H5Fopen(FILE, H5F_ACC_RDONLY, fapl); | ||
|
||
/* Get the file's file access roperty list */ | ||
file_fapl = H5Fget_access_plist(fid); | ||
|
||
/* Retrieve the # of read attempts from the file's file access property list */ | ||
H5Pget_metadata_read_attempts(file_fapl, &attempts); | ||
|
||
/* | ||
* The value returned in "attempts" will be 1 (default for non-SWMR access). | ||
* The library will use 1 as the number of read attempts | ||
* when reading checksummed metadata in the file | ||
*/ | ||
|
||
/* Close the property lists */ | ||
H5Pclose(fapl); | ||
H5Pclose(file_fapl); | ||
|
||
/* Close the file */ | ||
H5Fclose(fid); | ||
//! [non-SWMR Access] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
hid_t file_id, fapl_id; | ||
hid_t dataset_id, dapl_id; | ||
unsigned counter; | ||
|
||
/* Create a copy of the file access property list */ | ||
fapl_id = H5Pcreate(H5P_FILE_ACCESS); | ||
|
||
/* Set up the object flush property values */ | ||
/* flush_cb: callback function to invoke when an object flushes (see below) */ | ||
/* counter: user data to pass along to the callback function */ | ||
H5Pset_object_flush_cb(fapl_id, flush_cb, &counter); | ||
|
||
/* Open the file */ | ||
file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT); | ||
|
||
/* Create a group */ | ||
gid = H5Gcreate2(fid, “group”, H5P_DEFAULT, H5P_DEFAULT_H5P_DEFAULT); | ||
|
||
/* Open a dataset */ | ||
dataset_id = H5Dopen2(file_id, DATASET, H5P_DEFAULT); | ||
|
||
/* The flush will invoke flush_cb() with counter */ | ||
H5Dflush(dataset_id); | ||
/* counter will be equal to 1 */ | ||
|
||
/* ... */ | ||
|
||
/* The flush will invoke flush_cb() with counter */ | ||
H5Gflush(gid); | ||
/* counter will be equal to 2 */ | ||
|
||
/* ... */ | ||
|
||
/* The callback function for object flush property */ | ||
static herr_t | ||
flush_cb(hid_t obj_id, void *_udata) | ||
{ | ||
unsigned *flush_ct = (unsigned *)_udata; | ||
++(*flush_ct); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.