From 9fdf9546541866f989b4f46aad6f6ac975563777 Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Thu, 31 Mar 2022 08:23:35 -0500
Subject: 1.8 Merge doxygen changes from develop (#1545)
* Merge doxygen changes from develop
* revert macro code change
* Format correction
---
MANIFEST | 31 +-
doxygen/CMakeLists.txt | 1 +
doxygen/Doxyfile.in | 2 +-
doxygen/aliases | 48 +-
doxygen/dox/APIVersions.dox | 173 +++
doxygen/dox/About.dox | 114 ++
doxygen/dox/Cookbook.dox | 14 +
doxygen/dox/FTS.dox | 8 +
doxygen/dox/Glossary.dox | 565 ++++++++++
doxygen/dox/H5AC_cache_config_t.dox | 6 +-
doxygen/dox/H5Acreate.dox | 9 -
doxygen/dox/H5Aiterate.dox | 9 -
doxygen/dox/MetadataCachingInHDF5.dox | 2 +-
doxygen/dox/OtherSpecs.dox | 11 -
doxygen/dox/Overview.dox | 38 +-
doxygen/dox/RFC.dox | 91 ++
doxygen/dox/ReferenceManual.dox | 104 +-
doxygen/dox/Specifications.dox | 38 +-
doxygen/dox/TechnicalNotes.dox | 28 +
doxygen/dox/cookbook/Accessibility.c | 46 +
doxygen/dox/cookbook/Accessibility.dox | 39 +
doxygen/dox/cookbook/Attributes.c | 59 ++
doxygen/dox/cookbook/Attributes.dox | 38 +
doxygen/dox/cookbook/Files.c | 71 ++
doxygen/dox/cookbook/Files.dox | 31 +
doxygen/dox/cookbook/Performance.dox | 21 +
doxygen/dox/maybe_metadata_reads.dox | 50 +
doxygen/examples/DebuggingHDF5Applications.html | 392 +++++++
doxygen/examples/FileFormat.html | 1275 +++++++++++++++++++++++
doxygen/examples/Filters.html | 450 ++++++++
doxygen/examples/H5.format.1.0.html | 24 +-
doxygen/examples/H5.format.1.1.html | 18 +-
doxygen/examples/H5.format.2.0.html | 6 +-
doxygen/examples/H5.format.html | 6 +-
doxygen/examples/H5E_examples.c | 97 ++
doxygen/examples/H5G_examples.c | 186 ++++
doxygen/examples/H5I_examples.c | 242 +++++
doxygen/examples/H5L_examples.c | 156 +++
doxygen/examples/H5O_examples.c | 193 ++++
doxygen/examples/H5PL_examples.c | 96 ++
doxygen/examples/H5P_examples.c | 227 ++++
doxygen/examples/H5R_examples.c | 171 +++
doxygen/examples/H5S_examples.c | 132 +++
doxygen/examples/H5T_examples.c | 136 +++
doxygen/examples/H5Z_examples.c | 108 ++
doxygen/examples/IOFlow.html | 137 +++
doxygen/examples/ThreadSafeLibrary.html | 2 +-
doxygen/examples/VFL.html | 4 +-
doxygen/hdf5_navtree_hacks.js | 2 +-
doxygen/hdf5doxy_layout.xml | 4 +-
doxygen/img/HDF5.png | Bin 0 -> 10660 bytes
hl/src/H5LTpublic.h | 2 +-
src/H5ACprivate.h | 5 +-
src/H5ACpublic.h | 12 +-
src/H5Apublic.h | 289 ++---
src/H5B2private.h | 2 +-
src/H5Cpkg.h | 267 +++--
src/H5Cprivate.h | 3 +-
src/H5Dpkg.h | 14 +-
src/H5Dpublic.h | 405 +++----
src/H5Epublic.h | 60 +-
src/H5FDmpio.h | 6 +-
src/H5FDs3comms.h | 6 +-
src/H5FLprivate.h | 16 +-
src/H5Fpkg.h | 8 +-
src/H5Fprivate.h | 34 +-
src/H5Fpublic.h | 25 +-
src/H5Gpublic.h | 22 +-
src/H5Ipublic.h | 75 +-
src/H5Lpublic.h | 113 +-
src/H5Opkg.h | 18 +-
src/H5Oprivate.h | 12 +-
src/H5Opublic.h | 101 +-
src/H5PLpublic.h | 34 +-
src/H5Ppublic.h | 245 ++++-
src/H5Rpublic.h | 34 +-
src/H5Spkg.h | 13 +-
src/H5Spublic.h | 131 ++-
src/H5TSprivate.h | 20 +-
src/H5Tpkg.h | 2 +-
src/H5Tprivate.h | 4 +-
src/H5Tpublic.h | 49 +-
src/H5Zpublic.h | 38 +-
src/H5private.h | 666 ++++++------
src/H5public.h | 74 +-
src/H5win32defs.h | 1 +
tools/lib/h5diff.h | 2 +-
tools/lib/h5tools.h | 10 +-
tools/lib/h5tools_utils.h | 2 +-
tools/lib/h5trav.h | 2 +-
tools/lib/io_timer.h | 2 +-
91 files changed, 7030 insertions(+), 1505 deletions(-)
create mode 100644 doxygen/dox/APIVersions.dox
create mode 100644 doxygen/dox/FTS.dox
create mode 100644 doxygen/dox/Glossary.dox
delete mode 100644 doxygen/dox/H5Acreate.dox
delete mode 100644 doxygen/dox/H5Aiterate.dox
delete mode 100644 doxygen/dox/OtherSpecs.dox
create mode 100644 doxygen/dox/RFC.dox
create mode 100644 doxygen/dox/cookbook/Accessibility.c
create mode 100644 doxygen/dox/cookbook/Accessibility.dox
create mode 100644 doxygen/dox/cookbook/Attributes.c
create mode 100644 doxygen/dox/cookbook/Attributes.dox
create mode 100644 doxygen/dox/cookbook/Files.c
create mode 100644 doxygen/dox/cookbook/Files.dox
create mode 100644 doxygen/dox/cookbook/Performance.dox
create mode 100644 doxygen/dox/maybe_metadata_reads.dox
create mode 100644 doxygen/examples/DebuggingHDF5Applications.html
create mode 100644 doxygen/examples/FileFormat.html
create mode 100644 doxygen/examples/Filters.html
create mode 100644 doxygen/examples/H5E_examples.c
create mode 100644 doxygen/examples/H5G_examples.c
create mode 100644 doxygen/examples/H5I_examples.c
create mode 100644 doxygen/examples/H5L_examples.c
create mode 100644 doxygen/examples/H5O_examples.c
create mode 100644 doxygen/examples/H5PL_examples.c
create mode 100644 doxygen/examples/H5P_examples.c
create mode 100644 doxygen/examples/H5R_examples.c
create mode 100644 doxygen/examples/H5S_examples.c
create mode 100644 doxygen/examples/H5T_examples.c
create mode 100644 doxygen/examples/H5Z_examples.c
create mode 100644 doxygen/examples/IOFlow.html
create mode 100644 doxygen/img/HDF5.png
diff --git a/MANIFEST b/MANIFEST
index 900ab24..f758196 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -203,25 +203,37 @@
./doxygen/aliases
./doxygen/CMakeLists.txt
./doxygen/Doxyfile.in
+./doxygen/dox/APIVersions.dox
./doxygen/dox/About.dox
./doxygen/dox/Cookbook.dox
./doxygen/dox/DDLBNF110.dox
./doxygen/dox/FileFormatSpec.dox
+./doxygen/dox/FTS.dox
./doxygen/dox/GettingStarted.dox
+./doxygen/dox/Glossary.dox
./doxygen/dox/H5AC_cache_config_t.dox
-./doxygen/dox/H5Acreate.dox
-./doxygen/dox/H5Aiterate.dox
./doxygen/dox/MetadataCachingInHDF5.dox
-./doxygen/dox/OtherSpecs.dox
./doxygen/dox/Overview.dox
./doxygen/dox/ReferenceManual.dox
+./doxygen/dox/RFC.dox
./doxygen/dox/Specifications.dox
./doxygen/dox/TechnicalNotes.dox
./doxygen/dox/api-compat-macros.dox
+./doxygen/dox/maybe_metadata_reads.dox
./doxygen/dox/rm-template.dox
+./doxygen/dox/cookbook/Accessibility.c
+./doxygen/dox/cookbook/Accessibility.dox
+./doxygen/dox/cookbook/Attributes.c
+./doxygen/dox/cookbook/Attributes.dox
+./doxygen/dox/cookbook/Files.c
+./doxygen/dox/cookbook/Files.dox
+./doxygen/dox/cookbook/Performance.dox
+./doxygen/examples/DebuggingHDF5Applications.html
./doxygen/examples/FF-IH_FileGroup.gif
./doxygen/examples/FF-IH_FileObject.gif
+./doxygen/examples/FileFormat.html
./doxygen/examples/FileFormatSpecChunkDiagram.jpg
+./doxygen/examples/Filters.html
./doxygen/examples/H5Pset_metadata_read_attempts.c
./doxygen/examples/H5Pset_object_flush_cb.c
./doxygen/examples/H5.format.1.0.html
@@ -230,15 +242,27 @@
./doxygen/examples/H5.format.html
./doxygen/examples/H5A_examples.c
./doxygen/examples/H5D_examples.c
+./doxygen/examples/H5E_examples.c
./doxygen/examples/H5Fclose.c
./doxygen/examples/H5Fcreate.c
./doxygen/examples/H5F_examples.c
+./doxygen/examples/H5G_examples.c
+./doxygen/examples/H5I_examples.c
+./doxygen/examples/H5L_examples.c
+./doxygen/examples/H5O_examples.c
+./doxygen/examples/H5PL_examples.c
./doxygen/examples/H5Pget_metadata_read_attempts.1.c
./doxygen/examples/H5Pget_metadata_read_attempts.2.c
./doxygen/examples/H5Pget_metadata_read_attempts.3.c
./doxygen/examples/H5Pget_object_flush_cb.c
+./doxygen/examples/H5P_examples.c
+./doxygen/examples/H5R_examples.c
+./doxygen/examples/H5S_examples.c
+./doxygen/examples/H5T_examples.c
+./doxygen/examples/H5Z_examples.c
./doxygen/examples/H5_examples.c
./doxygen/examples/ImageSpec.html
+./doxygen/examples/IOFlow.html
./doxygen/examples/PaletteExample1.gif
./doxygen/examples/Palettes.fm.anc.gif
./doxygen/examples/TableSpec.html
@@ -253,6 +277,7 @@
./doxygen/img/FF-IH_FileGroup.gif
./doxygen/img/FF-IH_FileObject.gif
./doxygen/img/FileFormatSpecChunkDiagram.jpg
+./doxygen/img/HDF5.png
./doxygen/img/HDFG-logo.png
./doxygen/img/IOFlow.gif
./doxygen/img/IOFlow2.gif
diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt
index ca36ef1..920fafa 100644
--- a/doxygen/CMakeLists.txt
+++ b/doxygen/CMakeLists.txt
@@ -27,6 +27,7 @@ if (DOXYGEN_FOUND)
set (DOXYGEN_EXTERNAL_SEARCH NO)
set (DOXYGEN_SEARCHENGINE_URL)
set (DOXYGEN_STRIP_FROM_PATH ${HDF5_SOURCE_DIR})
+ set (DOXYGEN_STRIP_FROM_INC_PATH ${HDF5_SOURCE_DIR})
set (DOXYGEN_PREDEFINED "H5_HAVE_DIRECT H5_HAVE_LIBHDFS H5_HAVE_MAP_API H5_HAVE_PARALLEL H5_HAVE_ROS3_VFD")
# This configure and individual custom targets work together
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index afc8f3a..e28c50c 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -179,7 +179,7 @@ STRIP_FROM_PATH = @DOXYGEN_STRIP_FROM_PATH@
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH = @DOXYGEN_STRIP_FROM_INC_PATH@
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
diff --git a/doxygen/aliases b/doxygen/aliases
index 2ca29ef..5d55720 100644
--- a/doxygen/aliases
+++ b/doxygen/aliases
@@ -24,7 +24,6 @@ ALIASES += htri_t="Returns zero (false), a positive (true) or a negative (failur
ALIASES += api_vers_2{3}="\1() is a macro that is mapped to either \2() or \3().\n\see \ref api-compat-macros"
ALIASES += api_vers_3{4}="\1() is a macro that is mapped to either \2() or \3() or \4().\n\see \ref api-compat-macros"
-ALIASES += api_vers_4{5}="\1() is a macro that is mapped to either \2() or \3() or \4() or \5().\n\see \ref api-compat-macros"
ALIASES += deprecation_note{1}="\deprecated Superseded by \1."
@@ -48,12 +47,6 @@ ALIASES += op_data_in="\param[in] op_data User-defined callback function context
ALIASES += op_data_in{1}="\param[in] \1 User-defined callback function context"
################################################################################
-# Asynchronous
-################################################################################
-
-ALIASES += async_variant_of{1}="Asynchronous version of \1()"
-
-################################################################################
# Attributes
################################################################################
@@ -128,13 +121,6 @@ ALIASES += fg_loc_id="\loc_id. The identifier may be that of a file or group."
ALIASES += fg_loc_id{1}="\loc_id{\1}. The identifier may be that of a file or group."
################################################################################
-# Maps
-################################################################################
-
-ALIASES += map_id="\param[in] map_id Map identifier"
-ALIASES += map_id{1}="\param[in] \1 Map identifier"
-
-################################################################################
# Property lists
################################################################################
@@ -170,12 +156,6 @@ ALIASES += lapl_id{1}="\param[in] \1 Link access property list identifier"
ALIASES += lcpl_id="\param[in] lcpl_id Link creation property list identifier"
ALIASES += lcpl_id{1}="\param[in] \1 Link creation property list identifier"
-ALIASES += mapl_id="\param[in] mapl_id Map access property list identifier"
-ALIASES += mapl_id{1}="\param[in] \1 Map access property list identifier"
-
-ALIASES += mcpl_id="\param[in] mcpl_id Map creation property list identifier"
-ALIASES += mcpl_id{1}="\param[in] \1 Map creation property list identifier"
-
ALIASES += oapl_id="\param[in] oapl_id Object access property list identifier"
ALIASES += oapl_id{1}="\param[in] \1 Object access property list identifier"
@@ -197,9 +177,6 @@ ALIASES += tapl_id{1}="\param[in] \1 Datatype access property list identifier"
ALIASES += tcpl_id="\param[in] tcpl_id Datatype creation property list identifier"
ALIASES += tcpl_id{1}="\param[in] \1 Datatype creation property list identifier"
-ALIASES += vipl_id="\param[in] vipl_id VOL initialization property list identifier"
-ALIASES += vipl_id{1}="\param[in] \1 vipl_id VOL initialization property list identifier"
-
################################################################################
# Objects
################################################################################
@@ -213,19 +190,11 @@ ALIASES += fgdta_obj_id{1}="\obj_id{\1}. The identifier may be that of a file, g
ALIASES += fgdta_loc_obj_id{1}="\loc_obj_id{\1}. The identifier may be that of a file, group, dataset, named datatype, or attribute."
################################################################################
-# Asynchronous Arguments
-################################################################################
-
-ALIASES += app_file="\param[in] app_file For internal use only, not a visible user parameter"
-ALIASES += app_func="\param[in] app_func For internal use only, not a visible user parameter"
-ALIASES += app_line="\param[in] app_line For internal use only, not a visible user parameter"
-ALIASES += es_id="\param[in] es_id Event set identifier"
-ALIASES += es_id{1}="\param[in] \1 Event set identifier"
-
-################################################################################
# Others
################################################################################
+ALIASES += estack_id="\param[in] estack_id Error stack identifier"
+ALIASES += estack_id{1}="\param[in] \1 Error stack identifier"
ALIASES += cpp_c_api_note="\attention \Bold{C++ Developers using HDF5 C-API functions beware:}\n Several functions in this C-API take function pointers or callbacks as arguments. Examples include H5Pset_elink_cb(), H5Pset_type_conv_cb(), H5Tconvert(), and H5Ewalk2(). Application code must ensure that those callback functions return normally such to allow the HDF5 to manage its resources and maintain a consistent state. For instance, those functions must not use the C \c setjmp / \c longjmp mechanism to leave those callback functions. Within the context of C++, any exceptions thrown within the callback function must be caught, such as with a \Code{catch(…)} statement. Any exception state can be placed within the provided user data function call arguments, and may be thrown again once the calling function has returned. Exceptions raised and not handled inside the callback are not supported as it might leave the HDF5 library in an inconsistent state. Similarly, using C++20 coroutines cannot be used as callbacks, since they do not support plain return statements. If a callback function yields execution to another C++20 coroutine calling HDF5 functions as well, this may lead to undefined behavior."
ALIASES += par_compr_note="\attention If you are planning to use compression with parallel HDF5, ensure that calls to H5Dwrite() occur in collective mode. In other words, all MPI ranks (in the relevant communicator) call H5Dwrite() and pass a dataset transfer property list with the MPI-IO collective option property set to #H5FD_MPIO_COLLECTIVE_IO.\n Note that data transformations are currently \Bold{not} supported when writing to datasets in parallel and with compression enabled."
ALIASES += sa_metadata_ops="\sa \li H5Pget_all_coll_metadata_ops() \li H5Pget_coll_metadata_write() \li H5Pset_all_coll_metadata_ops() \li H5Pset_coll_metadata_write() \li \ref maybe_metadata_reads"
@@ -242,7 +211,7 @@ ALIASES += ref_group_impls="HDF5 Library Release Version Numbers"
ALIASES += ref_mdc_in_hdf5="Metadata Caching in HDF5"
ALIASES += ref_mdc_logging="Metadata Cache Logging"
-ALIASES += ref_news_112="New Features in HDF5 Release 1.12"
+ALIASES += ref_news_18="New Features in HDF5 Release 1.8"
ALIASES += ref_h5ocopy="Copying Committed Datatypes with H5Ocopy()"
ALIASES += ref_sencode_fmt_change="RFC H5Secnode() / H5Sdecode() Format Change"
ALIASES += ref_vlen_strings="\Emph{Creating variable-length string datatypes}"
@@ -253,17 +222,10 @@ ALIASES += ref_vol_doc="VOL documentation"
################################################################################
ALIASES += ref_rfc20210528="Multi-Thread HDF5"
-ALIASES += ref_rfc20210219="Selection I/O"
-ALIASES += ref_rfc20200213="VFD Sub-filing"
-ALIASES += ref_rfc20200210="Onion VFD"
ALIASES += ref_rfc20190923="Virtual Object Layer (VOL) API Compatibility"
-ALIASES += ref_rfc20190715="Variable-Length Data in HDF5 Sketch Design"
ALIASES += ref_rfc20190410="A Plugin Interface for HDF5 Virtual File Drivers"
ALIASES += ref_rfc20181231="Dataset Object Header Size"
ALIASES += ref_rfc20181220="MS 3.2 – Addressing Scalability: Scalability of open, close, flush CASE STUDY: CGNS Hotspot analysis of CGNS cgp_open"
-ALIASES += ref_rfc20180830="Sparse Chunks"
-ALIASES += ref_rfc20180829="H5FD_MIRROR Virtual File Driver"
-ALIASES += ref_rfc20180815="Splitter_VFD"
ALIASES += ref_rfc20180620="Chunk query functionality in HDF5"
ALIASES += ref_rfc20180610="VFD SWMR"
ALIASES += ref_rfc20180321="API Contexts"
@@ -326,12 +288,8 @@ ALIASES += ref_rfc20091218="HDF5 Tools Library Functions"
ALIASES += ref_rfc20090612="Default EPSILON values for comparing floating point data"
ALIASES += ref_rfc20081218="Reporting of Non-Comparable Datasets by h5diff"
-ALIASES += ref_rfc20081205="External Link Traversal Callback"
-ALIASES += ref_rfc20081030="Setting Raw Data Chunk Cache Parameters in HDF5"
ALIASES += ref_rfc20080915="Performance Report for Free-space Manager"
ALIASES += ref_rfc20080904="Setting File Access Property List for accessing External Link"
-ALIASES += ref_rfc20080728="Native Time Types in HDF5"
-ALIASES += ref_rfc20080723="Special Values in HDF5"
ALIASES += ref_rfc20080301="Dynamic Transformations to HDF5 Data"
ALIASES += ref_rfc20080209="Using SVN branching to improve software development process at THG"
ALIASES += ref_rfc20080206="Maintaining the HISTORY.txt and RELEASE.txt files in HDF5"
diff --git a/doxygen/dox/APIVersions.dox b/doxygen/dox/APIVersions.dox
new file mode 100644
index 0000000..3658f06
--- /dev/null
+++ b/doxygen/dox/APIVersions.dox
@@ -0,0 +1,173 @@
+/**
+ * \ingroup H5A
+ * \def H5Acreate
+ * \api_vers_2{H5Acreate,H5Acreate1,H5Acreate2}
+ */
+
+/**
+ * \ingroup H5A
+ * \def H5Aiterate
+ * \api_vers_2{H5Aiterate,H5Aiterate1,H5Aiterate2}
+ */
+
+/**
+ * \ingroup H5D
+ * \def H5Dcreate
+ * \api_vers_2{H5Dcreate,H5Dcreate1,H5Dcreate2}
+ */
+
+/**
+ * \ingroup H5E
+ * \def H5Eget_auto
+ * \api_vers_2{H5Eget_auto,H5Eget_auto1,H5Eget_auto2}
+ */
+
+/**
+ * \ingroup H5E
+ * \def H5Eprint
+ * \api_vers_2{H5Eprint,H5Eprint1,H5Eprint2}
+ */
+
+/**
+ * \ingroup H5E
+ * \def H5Epush
+ * \api_vers_2{H5Epush,H5Epush1,H5Epush2}
+ */
+
+/**
+ * \ingroup H5E
+ * \def H5Eset_auto
+ * \api_vers_2{H5Eset_auto,H5Eset_auto1,H5Eset_auto2}
+ */
+
+/**
+ * \ingroup H5E
+ * \def H5Ewalk
+ * \api_vers_2{H5Ewalk,H5Ewalk1,H5Ewalk2}
+ */
+
+/**
+ * \ingroup H5F
+ * \def H5Fget_info
+ * \api_vers_2{H5Fget_info,H5Fget_info1,H5Fget_info2}
+ */
+
+/**
+ * \ingroup H5G
+ * \def H5Gcreate
+ * \api_vers_2{H5Gcreate,H5Gcreate1,H5Gcreate2}
+ */
+
+/**
+ * \ingroup H5G
+ * \def H5Gopen
+ * \api_vers_2{H5Gopen,H5Gopen1,H5Gopen2}
+ */
+
+/**
+ * \ingroup H5L
+ * \def H5Lget_info
+ * \api_vers_2{H5Lget_info,H5Lget_info1,H5Lget_info2}
+ */
+
+/**
+ * \ingroup H5L
+ * \def H5Lget_info_by_idx
+ * \api_vers_2{H5Lget_info_by_idx,H5Lget_info_by_idx1,H5Lget_info_by_idx2}
+ */
+
+/**
+ * \ingroup TRAV
+ * \def H5Literate
+ * \api_vers_2{H5Literate,H5Literate1,H5Literate2}
+ */
+
+/**
+ * \ingroup TRAV
+ * \def H5Literate_by_name
+ * \api_vers_2{H5Literate_by_name,H5Literate_by_name1,H5Literate_by_name2}
+ */
+
+/**
+ * \ingroup TRAV
+ * \def H5Lvisit
+ * \api_vers_2{H5Lvisit,H5Lvisit1,H5Lvisit2}
+ */
+
+/**
+ * \ingroup TRAV
+ * \def H5Lvisit_by_name
+ * \api_vers_2{H5Lvisit_by_name,H5Lvisit_by_name1,H5Lvisit_by_name2}
+ */
+
+/**
+ * \ingroup H5O
+ * \def H5Oget_info
+ * \api_vers_3{H5Oget_info,H5Oget_info1,H5Oget_info2,H5Oget_info3}
+ */
+
+/**
+ * \ingroup H5O
+ * \def H5Oget_info_by_idx
+ * \api_vers_3{H5Oget_info_by_idx,H5Oget_info_by_idx1,H5Oget_info_by_idx2,H5Oget_info_by_idx3}
+ */
+
+/**
+ * \ingroup H5O
+ * \def H5Oget_info_by_name
+ * \api_vers_3{H5Oget_info_by_name,H5Oget_info_by_name1,H5Oget_info_by_name2,H5Oget_info_by_name3}
+ */
+
+/**
+ * \ingroup H5O
+ * \def H5Ovisit
+ * \api_vers_3{H5Ovisit,H5Ovisit1,H5Ovisit2,H5Ovisit3}
+ */
+
+/**
+ * \ingroup H5O
+ * \def H5Ovisit_by_name
+ * \api_vers_3{H5Ovisit_by_name,H5Ovisit_by_name1,H5Ovisit_by_name2,H5Ovisit_by_name3}
+ */
+
+/**
+ * \ingroup H5R
+ * \def H5Rdereference
+ * \api_vers_2{H5Rdereference,H5Rdereference1,H5Rdereference2}
+ */
+
+/**
+ * \ingroup H5R
+ * \def H5Rget_obj_type
+ * \api_vers_3{H5Rget_obj_type,H5Rget_obj_type1,H5Rget_obj_type2,H5R_get_obj_type3}
+ */
+
+/**
+ * \ingroup H5S
+ * \def H5Sencode
+ * \api_vers_2{H5Sencode,H5Sencode1,H5Sencode2}
+ */
+
+/**
+ * \ingroup H5T
+ * \def H5Tcommit
+ * \api_vers_2{H5Tcommit,H5Tcommit1,H5Tcommit2}
+ */
+
+/**
+ * \ingroup H5T
+ * \def H5Topen
+ * \api_vers_2{H5Topen,H5Topen1,H5Topen2}
+ */
+
+/**
+ * \ingroup ARRAY
+ * \def H5Tarray_create
+ * \api_vers_2{H5Tarray_create,H5Tarray_create1,H5Tarray_create2}
+ */
+
+/**
+ * \ingroup ARRAY
+ * \def H5Tget_array_dims
+ * \api_vers_2{H5Tget_array_dims,H5Tget_array_dims1,H5Tget_array_dims2}
+ */
diff --git a/doxygen/dox/About.dox b/doxygen/dox/About.dox
index 777b2a6..a8b31d7 100644
--- a/doxygen/dox/About.dox
+++ b/doxygen/dox/About.dox
@@ -10,4 +10,118 @@ and the online version of their
Not only does Eigen set a standard as a piece of software, but also as an example
of documentation done right.
+\section about_documentation Documentation about Documentation
+
+In this section, we describe common documentation maintenance tasks.
+
+\subsection plain_html Including Plain HTML Pages
+
+The most common use case for this is the inclusion of older documentation.
+New documentation should, whenever possible, be created using Doxygen markdown!
+
+Use Doxygen's htmlinclude
+special command to include existing plain HTML pages.
+
+An example from this documentation set can be seen
+here.
+
+\subsection new_rm_entry Creating a New Reference Manual Entry
+
+Please refer to the \ref RMT for guidance on how to create a new reference manual entry.
+
+\subsubsection new_example Adding and Referencing API Examples
+
+For each HDF5 module, such as \Code{H5F}, there is an examples source file called
+\Code{H5*_examples.c}. For example, the \Code{H5F} API examples are located in
+
+H5F_examples.c
. Examples are code blocks marked as Doxygen
+snippets.
+For example, the source code for the H5Fcreate() API sample is located between
+the
+\verbatim
+//!
+...
+//!
+\endverbatim
+comments in
+
+H5F_examples.c
.
+
+Add a new API example by adding a new code block enclosed between matching
+snippet tags. The name of the tag is usually the function name stripped of
+the module prefix.
+
+The inclusion of such a block of code can then be triggered via Doxygen's
+snippet
+special command. For example, the following markup
+\verbatim
+* \snippet H5F_examples.c create
+\endverbatim
+yields
+\snippet H5F_examples.c create
+
+\subsubsection api_macro Adding an API Macro
+
+API macros are handled by the api_vers_2, api_vers_3, api_vers_4
+custom commands. The numbers indicate the number of potential API function
+mappings. For example, H5Acreate() has two potential mappings, H5Acreate1() and
+H5Acreate2(). To trigger the creation of a reference manual entry for H5Acreate()
+use the following markup:
+\verbatim
+\api_vers_2{H5Acreate,H5Acreate1,H5Acreate2}
+\endverbatim
+This yields:
+
+\api_vers_2{H5Acreate,H5Acreate1,H5Acreate2}
+
+\subsection custom_commands Creating Custom Commands
+
+See Doxygen's Custom Commands documentation
+as a general reference.
+
+All custom commands for this project are located in the
+aliases
+file in the doxygen
+subdirectory of the main HDF5 repo.
+
+The custom commands are grouped in sections. Find a suitable section for your command or
+ask for help if unsure!
+
+\subsection new_rfc Adding a New RFC or Referencing an Existing RFC
+
+For ease of reference, we define custom commands for each RFC in the RFCs section
+of the
+aliases
+file. For example the custom command \Code{ref_rfc20141210} can be used to insert a
+reference to "RFC: Virtual Object Layer". In other words, the markup
+\verbatim
+\ref_rfc20141210
+\endverbatim
+yields a clickable link:
+
+\ref_rfc20141210
+
+To add a new RFC, add a custom command for the RFC to the
+aliases
+file. The naming convention for the custom command is \Code{ref_rfcYYYYMMDD},
+where \Code{YYYYMMDD} is the ID of the RFC. The URL is composed of the prefix
+\verbatim
+https://docs.hdfgroup.org/hdf5/rfc/
+\endverbatim
+and the name of your RFC file, typically, a PDF file, i.e., the full URL would
+be
+\verbatim
+https://docs.hdfgroup.org/hdf5/rfc/my_great_rfc_name.pdf
+\endverbatim
+
+\subsection hosting How Do Updates and Changes Get Published?
+
+Currently, the files underlying this documentation website are stored in an
+bucket on AWS S3. The top-level bucket is
s3://docs.hdfgroup.org/hdf5/+There are folders for the development branch and all supported release +version. + +Talk to your friendly IT-team if you need write access, or you need someone to +push an updated version for you! + */ \ No newline at end of file diff --git a/doxygen/dox/Cookbook.dox b/doxygen/dox/Cookbook.dox index 4abc896..56523e2 100644 --- a/doxygen/dox/Cookbook.dox +++ b/doxygen/dox/Cookbook.dox @@ -2,4 +2,18 @@ Healthy, everyday recipes for every taste and budget... +\ref Files +\li \ref CB_FreeSpace +\li \ref CB_RemoveUnusedSpace +\li \ref CB_UserBlock + +\ref Attributes +\li \ref CB_LargeAttributes + +\ref Accessibility +\li \ref CB_MaintainCompat + +\ref Performance +\li \ref CB_MDCPerf + */ \ No newline at end of file diff --git a/doxygen/dox/FTS.dox b/doxygen/dox/FTS.dox new file mode 100644 index 0000000..9dae7c1 --- /dev/null +++ b/doxygen/dox/FTS.dox @@ -0,0 +1,8 @@ +/** \page FTS Full-Text Search + +\htmlonly + + +\endhtmlonly + +*/ \ No newline at end of file diff --git a/doxygen/dox/Glossary.dox b/doxygen/dox/Glossary.dox new file mode 100644 index 0000000..9ccd27d --- /dev/null +++ b/doxygen/dox/Glossary.dox @@ -0,0 +1,565 @@ +/** \page GLS Glossary + +\section GLS_A A + +
A variable that can store (logically) dense, rectilinear, multidimensional + arrays of elements of a given HDF5 datatype.
+The combination of array rank (dimensionality) and extent is called an + array variable's shape. This includes the degenerate array shapes of a + singleton (scalar) and the empty array (null).
+The array element datatype is sometimes referred to as the array + variable's type, which is not entirely accurate because the array variable's + type is 'array of element type' rather than 'element type'.
+In HDF5, there are two kinds of array variables, attributes and datasets, + and the distinction is functional (i.e., how they can be used) rather than + conceptual. Attributes are commonly used for descriptive "light-weight" + HDF5 object metadata while datasets are HDF5 objects used to store + "heavy-weight" problem-sized data.
+A named array variable that is associated with an HDF5 object, its + owner or attributee, and used to represent application domain-specific + metadata of the object. Intuitively, the set of an object's attributes can + be thought of as its key-value pair collection. Attribute names (keys) can + be arbitrary Unicode strings, but must be unique per object, i.e., an + object can have at most one attribute with a given name.
+A scalar attribute is an attribute backed by a singleton array + variable. A null attribute is attribute backed by an empty array + variable.
+A dataset storage layout where the dataset elements are partitioned into + fixed-size multidimensional chunks or tiles. Chunked layout is mandatory + for datasets with one or more dimensions of indefinite (infinite) extent + or where compression or other filters are applied to the dataset elements.
+Chunked layout may improve I/O performance for certain access patterns.
+A family of HDF5 datatypes whose elements are records with named fields + of other HDF5 datatypes. Currently, on ASCII field names are supported.
+Similar to a struct
in C or a COMMON
block in
+ Fortran.
A kind of HDF5 object, a linked array variable. which can be located in + an HDF5 file through a path name. Datasets are commonly used to store + "heavy-weight" problem-sized data.
+The HDF5 library offers a lot of features aimed at optimized dataset + access and storage, including compression and partial I/O.
+An HDF5 datatype consists of an abstract data type (a set of elements) + and a bit-level representation of these elements in storage such as an HDF5 + file or memory.
+The HDF5 library comes with a large set of predefined datatypes and + offers mechanisms for creating user-defined datatypes.
+The ten major families or classes of HDF5 datatypes are:
+A kind of HDF5 object that stores a collection of HDF5 links. Each HDF5 + file contains at least one group, it's root group.
+Among the destinations of an HDF5 group's links may be other HDF5 groups + (including the group itself!). This ability is sometimes referred to as the + closure property of groups. It is the basis for creating hierarchical or + more general graph-like structures.
+A regular multidimensional pattern described by four vectors whose length + equals the rank of the pattern.
+start
- the offset where the first block of the hyperslab beginsstride
- the offset between pattern blockscount
- the number of blocksblock
- the extent of an individual pattern blockFor example, the black squares on a (two-dimensional) chessboard with
+ origin at (0,0)
can be represented as the union of two
+ hyperslabs representing the even (0,2,4,6)
and
+ odd (1,3,5,7)
rows, respectively.
The hyperslab parameters for the even rows are: start (0,0)
,
+ stride (2,2)
, count (4,4)
, block
+ (1,1)
. Likewise the parameters for the odd rows are: start
+ (1,1)
, stride (2,2)
, count
+ (4,4)
, block (1,1)
.
A named, uni-directional association between a source and a + destination. In HDF5, the source is always the HDF5 group that hosts the + link in its link collection.
+There are several ways to specify a link's destination:
+A link name can be any Unicode string that does not contain slashes
+ ("/"
) or consists of a single dot character
+ ("."
). A link name must be unique in a group's link
+ collection.
A link destination is sometimes referred to as a member of the link's + source (group). This way of speaking invites confusion: A destination (e.g., + object) can be the destination of multiple links in the same (!) or + different groups. It would then be a "member" of a given group with + multiplicity greater than one and be a member of multiple groups.
+It is the link that is a member of the group's link collection and not + the link destination.
+A Unicode string that depending on the item it names might be subject to + certain character restrictions, such as ASCII-encoded only. In HDF5, the + user might encounter the following names:
+'/'
). In HDF5, path names are used to locate and refer
+ to HDF5 objects.An HDF5 API construct, a means of customizing the behavior of the HDF5 + library when creating, accessing or modifying HDF5 items.
+While the default property settings are sufficient in many cases, certain + HDF5 features, such as compression, can be reasonably controlled only by the + user who has to provide the desired settings via property lists.
+An HDF5 group that is present in all HDF5 files and that acts as the + entry or base point for all other data stored in an HDF5 file.
+The root group is "the mother of all objects" in an HDF5 file in the + sense that all objects (and their attributes) can be discovered, + beginning at the root group, by combinations of the following + operations:
+This discovery is portable and robust with respect to file-internal + storage reorganization.
+A variable-length (1-4 bytes per code point) encoding of the Unicode set + of code points. This is the encoding supported by HDF5 to represent Unicode + strings.
+The ASCII encoding is a proper subset of UTF-8.
+develop
branch (this site)
+ - HDF5 1.12.x
+ - HDF5 1.10.x
+ - HDF5 1.8.x
+
+\par Search
+ If you are looking for a specific function, constant, type, etc., use the
+ search box in the top right-hand corner!\n Otherwise, check out the
+ \link FTS full-text search\endlink.
+
+\par Offline reading
+ You can download it as a tgz archive for offline reading.
+
+\par History
+ A snapshot (~April 2017) of the pre-Doxygen HDF5 documentation can be found
+ here.
\par ToDo List
There is plenty of unfinished business.
diff --git a/doxygen/dox/RFC.dox b/doxygen/dox/RFC.dox
new file mode 100644
index 0000000..c16dcea
--- /dev/null
+++ b/doxygen/dox/RFC.dox
@@ -0,0 +1,91 @@
+/** \page RFC RFCs
+
+RFC ID | Title | Comments |
---|---|---|
2021-05-28 | \ref_rfc20210528 | |
2019-09-23 | \ref_rfc20190923 | |
2019-04-10 | \ref_rfc20190410 | |
2018-12-31 | \ref_rfc20181231 | |
2018-12-20 | \ref_rfc20181220 | |
2018-06-20 | \ref_rfc20180620 | |
2018-06-10 | \ref_rfc20180610 | |
2018-03-21 | \ref_rfc20180321 | |
2018-01-25 | \ref_rfc20180125 | |
2017-07-07 | \ref_rfc20170707 | |
2016-01-05 | \ref_rfc20160105 | |
2015-09-15 | \ref_rfc20150915 | |
2015-07-09 | \ref_rfc20150709 | |
2015-06-15 | \ref_rfc20150615 | |
2015-04-29 | \ref_rfc20150429 | |
2015-04-24 | \ref_rfc20150424 | |
2015-04-23 | \ref_rfc20150423 | |
2015-03-01 | \ref_rfc20150301 | |
2015-02-12 | \ref_rfc20150212 | |
2015-02-05 | \ref_rfc20150205 | |
2015-02-02 | \ref_rfc20150202 | |
2014-12-10 | \ref_rfc20141210 | |
2014-12-01 | \ref_rfc20141201 | |
2014-09-16 | \ref_rfc20140916 | |
2014-08-27 | \ref_rfc20140827 | |
2014-07-29 | \ref_rfc20140729 | |
2014-07-22 | \ref_rfc20140722 | |
2014-07-17 | \ref_rfc20140717 | |
2014-07-07 | \ref_rfc20140707 | |
2014-05-24 | \ref_rfc20140524 | |
2014-03-18 | \ref_rfc20140318 | |
2014-03-13 | \ref_rfc20140313 | |
2014-02-24 | \ref_rfc20140224 | |
2013-12-11 | \ref_rfc20131211 | |
2013-09-30 | \ref_rfc20130930 | |
2013-09-19 | \ref_rfc20130919 | |
2013-06-30 | \ref_rfc20130630 | |
2013-03-16 | \ref_rfc20130316 | |
2012-11-14 | \ref_rfc20121114 | |
2012-10-24 | \ref_rfc20121024 | |
2012-08-28 | \ref_rfc20120828 | |
2012-05-23 | \ref_rfc20120523 | |
2012-05-01 | \ref_rfc20120501 | |
2012-03-05 | \ref_rfc20120305 | |
2012-02-20 | \ref_rfc20120220 | |
2012-01-20 | \ref_rfc20120120 | |
2012-01-04 | \ref_rfc20120104 | |
2011-11-19 | \ref_rfc20111119 | |
2011-08-25 | \ref_rfc20110825 | |
2011-08-11 | \ref_rfc20110811 | |
2011-07-26 | \ref_rfc20110726 | |
2011-06-14 | \ref_rfc20110614 | |
2011-03-29 | \ref_rfc20110329 | |
2011-01-18 | \ref_rfc20110118 | |
2010-11-22 | \ref_rfc20101122 | |
2010-11-04 | \ref_rfc20101104 | |
2010-10-18 | \ref_rfc20101018 | |
2010-09-02 | \ref_rfc20100902 | |
2010-07-27 | \ref_rfc20100727 | |
2010-07-26 | \ref_rfc20100726 | |
2010-05-11 | \ref_rfc20100511 | |
2010-04-22 | \ref_rfc20100422 | |
2010-03-12 | \ref_rfc20100312 | |
2009-12-18 | \ref_rfc20091218 | |
2009-09-07 | \ref_rfc20090907 | |
2009-06-12 | \ref_rfc20090612 | |
2008-12-18 | \ref_rfc20081218 | |
2008-09-15 | \ref_rfc20080915 | |
2008-09-04 | \ref_rfc20080904 | |
2008-03-01 | \ref_rfc20080301 | |
2008-02-09 | \ref_rfc20080209 | |
2008-02-06 | \ref_rfc20080206 | |
2007-11-11 | \ref_rfc20071111 | |
2007-10-18 | \ref_rfc20071018 | |
2007-08-01 | \ref_rfc20070801 | |
2007-04-13 | \ref_rfc20070413 | |
2007-01-15 | \ref_rfc20070115 | |
2006-06-23 | \ref_rfc20060623 | |
2006-06-04 | \ref_rfc20060604 | |
2006-05-05 | \ref_rfc20060505 | |
2006-04-10 | \ref_rfc20060410 | |
2006-03-17 | \ref_rfc20060317 | |
2006-01-24 | \ref_rfc20060124 | |
2004-08-11 | \ref_rfc20040811 |
Modules | ||||||
---|---|---|---|---|---|---|
+
+
| ||||||
Mind the gap | ||||||
+Follow these simple rules and stay out of trouble: + +\li \Bold{Handle discipline:} The HDF5 C-API is rife with handles or + identifiers, which you typically obtain by creating new HDF5 items, copying + items, or retrieving facets of items. \Emph{You acquire a handle, you own it!} + (Colin Powell) In other words, you are responsible for releasing the underlying + resources via the matching \Code{H5*close()} call, or deal with the consequences + of resource leakage. +\li \Bold{Closed means closed:} Do not pass identifiers that were previously + \Code{H5*close()}-d to other API functions! It will generate an error. +\li \Bold{Dynamic memory allocation:} The API contains a few functions in which the + HDF5 library dynamically allocates memory on the caller's behalf. The caller owns + this memory and eventually must free it by calling H5free_memory(). (\Bold{Not} + the `free` function \Emph{du jour}!) +\li \Bold{Be careful with that saw:} Do not modify the underlying collection when an + iteration is in progress! +\li \Bold{Use of locations:} Certain API functions, typically called \Code{H5***_by_name} + use a combination of identifiers and path names to refer to HDF5 objects. + If the identifier fully specifies the object in question, pass \Code{'.'} (a dot) + for the name! + +Break a leg! + | +
The HDF5 library contains a number of debugging features to + make programmers' lives easier including the ability to print + detailed error messages, check invariant conditions, display + timings and other statistics, and trace API function calls and + return values. + +
NDEBUG
is defined during compiling, the
+ library will include code to verify that invariant conditions
+ have the expected values. When a problem is detected the
+ library will display the file and line number within the
+ library and the invariant condition that failed. A core dump
+ may be generated for post mortem debugging. The code to
+ perform these checks can be included on a per-package bases.
+
+ The statistics and tracing can be displayed on any output + stream (including streams opened by the shell) with output from + different packages even going to different streams. + +
By default any API function that fails will print an error + stack to the standard error stream. + +
+
+
+ |
+
The error handling package (H5E) is described + elsewhere. + +
To include checks for invariant conditions the library should
+ be configured with --disable-production
, the
+ default for versions before 1.2. The library designers have made
+ every attempt to handle error conditions gracefully but an
+ invariant condition assertion may fail in certain cases. The
+ output from a failure usually looks something like this:
+
+
+
+
+ |
+
Code to accumulate statistics is included at compile time by
+ using the --enable-debug
configure switch. The
+ switch can be followed by an equal sign and a comma-separated
+ list of package names or else a default list is used.
+
+
+
Name | +Default | +Description | +
---|---|---|
a | +No | +Attributes | +
ac | +Yes | +Meta data cache | +
b | +Yes | +B-Trees | +
d | +Yes | +Datasets | +
e | +Yes | +Error handling | +
f | +Yes | +Files | +
g | +Yes | +Groups | +
hg | +Yes | +Global heap | +
hl | +No | +Local heaps | +
i | +Yes | +Interface abstraction | +
mf | +No | +File memory management | +
mm | +Yes | +Library memory management | +
o | +No | +Object headers and messages | +
p | +Yes | +Property lists | +
s | +Yes | +Data spaces | +
t | +Yes | +Datatypes | +
v | +Yes | +Vectors | +
z | +Yes | +Raw data filters | +
In addition to including the code at compile time the
+ application must enable each package at runtime. This is done
+ by listing the package names in the HDF5_DEBUG
+ environment variable. That variable may also contain file
+ descriptor numbers (the default is `2') which control the output
+ for all following packages up to the next file number. The
+ word all
refers to all packages. Any word my be
+ preceded by a minus sign to turn debugging off for the package.
+
+
+
all |
+ This causes debugging output from all packages to be + sent to the standard error stream. | +
all -t -s |
+ Debugging output for all packages except datatypes + and data spaces will appear on the standard error + stream. | +
-all ac 255 t,s |
+ This disables all debugging even if the default was to + debug something, then output from the meta data cache is + send to the standard error stream and output from data + types and spaces is sent to file descriptor 255 which + should be redirected by the shell. | +
The components of the HDF5_DEBUG
value may be
+ separated by any non-lowercase letter.
+
+
The HDF5 library can trace API calls by printing the
+ function name, the argument names and their values, and the
+ return value. Some people like to see lots of output during
+ program execution instead of using a good symbolic debugger, and
+ this feature is intended for their consumption. For example,
+ the output from h5ls foo
after turning on tracing,
+ includes:
+
+
+
+
+ |
+
The code that performs the tracing must be included in the
+ library by specifying the --enable-trace
+ configuration switch (the default for versions before 1.2). Then
+ the word trace
must appear in the value of the
+ HDF5_DEBUG
variable. The output will appear on the
+ last file descriptor before the word trace
or two
+ (standard error) by default.
+
+
+
To display the trace on the standard error stream:
+
+ |
+
To send the trace to a file:
+
+ |
+
If the library was not configured for tracing then there is no
+ unnecessary overhead since all tracing code is excluded.
+ However, if tracing is enabled but not used there is a small
+ penalty. First, code size is larger because of extra
+ statically-declared character strings used to store argument
+ types and names and extra auto variable pointer in each
+ function. Also, execution is slower because each function sets
+ and tests a local variable and each API function calls the
+ H5_trace()
function.
+
+
If tracing is enabled and turned on then the penalties from the + previous paragraph apply plus the time required to format each + line of tracing information. There is also an extra call to + H5_trace() for each API function to print the return value. + +
The tracing mechanism is invoked for each API function before + arguments are checked for validity. If bad arguments are passed + to an API function it could result in a segmentation fault. + However, the tracing output is line-buffered so all previous + output will appear. + +
There are two API functions that don't participate in
+ tracing. They are H5Eprint()
and
+ H5Eprint_cb()
because their participation would
+ mess up output during automatic error reporting.
+
+
On the other hand, a number of API functions are called during + library initialization and they print tracing information. + +
For those interested in the implementation here is a
+ description. Each API function should have a call to one of the
+ H5TRACE()
macros immediately after the
+ FUNC_ENTER()
macro. The first argument is the
+ return type encoded as a string. The second argument is the
+ types of all the function arguments encoded as a string. The
+ remaining arguments are the function arguments. This macro was
+ designed to be as terse and unobtrousive as possible.
+
+
In order to keep the H5TRACE()
calls synchronized
+ with the source code we've written a perl script which gets
+ called automatically just before Makefile dependencies are
+ calculated for the file. However, this only works when one is
+ using GNU make. To reinstrument the tracing explicitly, invoke
+ the trace
program from the hdf5 bin directory with
+ the names of the source files that need to be updated. If any
+ file needs to be modified then a backup is created by appending
+ a tilde to the file name.
+
+
+
+
+ |
+
Note: The warning message is the result of a comment of the
+ form /*NO TRACE*/
somewhere in the function
+ body. Tracing information will not be updated or inserted if
+ such a comment exists.
+
+
Error messages have the same format as a compiler so that they + can be parsed from program development environments like + Emacs. Any function which generates an error will not be + modified.
+ + diff --git a/doxygen/examples/FileFormat.html b/doxygen/examples/FileFormat.html new file mode 100644 index 0000000..fc35357 --- /dev/null +++ b/doxygen/examples/FileFormat.html @@ -0,0 +1,1275 @@ + + + +This section has several small programs and describes the format of a file +created with each of them. +
+ +Example program one - Create an empty file: +
+#include "hdf5.h"
+#include
+
+int main()
+{
+ hid_t fid; /* File ID */
+ herr_t ret; /* Generic return value */
+
+ /* Create the file */
+ fid=H5Fcreate("example1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(fid>=0);
+
+ /* Close the file */
+ ret=H5Fclose(fid);
+ assert(ret>=0);
+
+ return(0);
+}
+
+
+ byte | +byte | +byte | +byte | +||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
\211 | +'H' | +'D' | +'F' | +||||||||||||||||||||||||||||
\r | +\n | +\032 | +\n | +||||||||||||||||||||||||||||
0 | +0 | +0 | +0 | +||||||||||||||||||||||||||||
0 | +8 | +8 | +0 | +||||||||||||||||||||||||||||
4 | +16 | +||||||||||||||||||||||||||||||
0x00000003 | +|||||||||||||||||||||||||||||||
0 | +|||||||||||||||||||||||||||||||
0xffffffffffffffff |
+ |||||||||||||||||||||||||||||||
? | +|||||||||||||||||||||||||||||||
0xffffffffffffffff |
+ |||||||||||||||||||||||||||||||
+
|
+
+%h5debug example1.h5
+
+Reading signature at address 0 (rel)
+File Super Block...
+File name: example1.h5
+File access flags 0x00000000
+File open reference count: 1
+Address of super block: 0 (abs)
+Size of user block: 0 bytes
+Super block version number: 0
+Free list version number: 0
+Root group symbol table entry version number: 0
+Shared header version number: 0
+Size of file offsets (haddr_t type): 8 bytes
+Size of file lengths (hsize_t type): 8 bytes
+Symbol table leaf node 1/2 rank: 4
+Symbol table internal node 1/2 rank: 16
+File consistency flags: 0x00000003
+Base address: 0 (abs)
+Free list address: UNDEF (rel)
+Address of driver information block: UNDEF (rel)
+Root group symbol table entry:
+ Name offset into private heap: 0
+ Object header address: 928
+ Dirty: Yes
+ Cache info type: Symbol Table
+ Cached information:
+ B-tree address: 384
+ Heap address: 96
+
+
+
+ byte | +byte | +byte | +byte | +||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | +0 | +2 | +|||||||||
1 | +|||||||||||
32 | +|||||||||||
0x0011 | +16 | +||||||||||
0x01 | +0 | +||||||||||
+
|
+ |||||||||||
0 | +0 | +||||||||||
0x00 | +0 | +
+%h5debug example1.h5 928
+
+New address: 928
+Reading signature at address 928 (rel)
+Object Header...
+Dirty: 0
+Version: 1
+Header size (in bytes): 16
+Number of links: 1
+Number of messages (allocated): 2 (32)
+Number of chunks (allocated): 1 (8)
+Chunk 0...
+ Dirty: 0
+ Address: 944
+ Size in bytes: 32
+Message 0...
+ Message ID (sequence number): 0x0011 stab(0)
+ Shared message: No
+ Constant: Yes
+ Raw size in obj header: 16 bytes
+ Chunk number: 0
+ Message Information:
+ B-tree address: 384
+ Name heap address: 96
+Message 1...
+ Message ID (sequence number): 0x0000 null(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 0 bytes
+ Chunk number: 0
+ Message Information:
+
+
+
+ byte | +byte | +byte | +byte | +
---|---|---|---|
'H' | +'E' | +'A' | +'P' | +
0 | +|||
256 | +|||
8 | +|||
128 | +
+%h5debug example1.h5 96
+
+New address: 96
+Reading signature at address 96 (rel)
+Local Heap...
+Dirty: 0
+Header size (in bytes): 32
+Address of heap data: 128
+Data bytes allocated on disk: 256
+Data bytes allocated in core: 256
+Free Blocks (offset, size):
+ Block #0: 8, 248
+Percent of heap used: 3.12%
+Data follows (`__' indicates free region)...
+ 0: 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ ........
+ 16: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 32: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 48: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 64: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 80: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 96: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 112: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 128: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 144: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 160: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 176: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 192: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 208: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 224: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 240: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+
+
+
+ byte | +byte | +byte | +byte | + +
---|---|---|---|
'T' | +'R' | +'E' | +'E' | + +
0 | +0 | +0 | + +|
0xffffffffffffffff |
+
+ |||
0xffffffffffffffff |
+
+
+%h5debug example1.h5 384 96
+
+New address: 384
+Reading signature at address 384 (rel)
+Tree type ID: H5B_SNODE_ID
+Size of node: 544
+Size of raw (disk) key: 8
+Dirty flag: False
+Number of initial dirty children: 0
+Level: 0
+Address of left sibling: UNDEF
+Address of right sibling: UNDEF
+Number of children (max): 0 (32)
+
+
+
+
+
+Example program two - Create a file with a single dataset in it: +
+#include "hdf5.h"
+#include
+
+int main()
+{
+ hid_t fid; /* File ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t did; /* Dataset ID */
+ herr_t ret; /* Generic return value */
+
+ /* Create the file */
+ fid=H5Fcreate("example2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(fid>=0);
+
+ /* Create a scalar dataspace for the dataset */
+ sid=H5Screate(H5S_SCALAR);
+ assert(sid>=0);
+
+ /* Create a trivial dataset */
+ did=H5Dcreate(fid, "Dataset", H5T_NATIVE_INT, sid, H5P_DEFAULT);
+ assert(did>=0);
+
+ /* Close the dataset */
+ ret=H5Dclose(did);
+ assert(ret>=0);
+
+ /* Close the dataspace */
+ ret=H5Sclose(sid);
+ assert(ret>=0);
+
+ /* Close the file */
+ ret=H5Fclose(fid);
+ assert(ret>=0);
+
+ return(0);
+}
+
+
+ byte | +byte | +byte | +byte | +||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
\211 | +'H' | +'D' | +'F' | +||||||||||||||||||||||||||||
\r | +\n | +\032 | +\n | +||||||||||||||||||||||||||||
0 | +0 | +0 | +0 | +||||||||||||||||||||||||||||
0 | +8 | +8 | +0 | +||||||||||||||||||||||||||||
4 | +16 | +||||||||||||||||||||||||||||||
0x00000003 | +|||||||||||||||||||||||||||||||
0 | +|||||||||||||||||||||||||||||||
0xffffffffffffffff |
+ |||||||||||||||||||||||||||||||
? | +|||||||||||||||||||||||||||||||
0xffffffffffffffff |
+ |||||||||||||||||||||||||||||||
+
|
+
+%h5debug example2.h5
+
+Reading signature at address 0 (rel)
+File Super Block...
+File name: example2.h5
+File access flags 0x00000000
+File open reference count: 1
+Address of super block: 0 (abs)
+Size of user block: 0 bytes
+Super block version number: 0
+Free list version number: 0
+Root group symbol table entry version number: 0
+Shared header version number: 0
+Size of file offsets (haddr_t type): 8 bytes
+Size of file lengths (hsize_t type): 8 bytes
+Symbol table leaf node 1/2 rank: 4
+Symbol table internal node 1/2 rank: 16
+File consistency flags: 0x00000003
+Base address: 0 (abs)
+Free list address: UNDEF (rel)
+Address of driver information block: UNDEF (rel)
+Root group symbol table entry:
+ Name offset into private heap: 0
+ Object header address: 928
+ Dirty: Yes
+ Cache info type: Symbol Table
+ Cached entry information:
+ B-tree address: 384
+ Heap address: 96
+
+
+ byte | +byte | +byte | +byte | +||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | +0 | +2 | +|||||||||
1 | +|||||||||||
32 | +|||||||||||
0x0011 | +16 | +||||||||||
0x01 | +0 | +||||||||||
+
|
+ |||||||||||
0 | +0 | +||||||||||
0x00 | +0 | +
+%h5debug example2.h5 928
+
+New address: 928
+Reading signature at address 928 (rel)
+Object Header...
+Dirty: 0
+Version: 1
+Header size (in bytes): 16
+Number of links: 1
+Number of messages (allocated): 2 (32)
+Number of chunks (allocated): 1 (8)
+Chunk 0...
+ Dirty: 0
+ Address: 944
+ Size in bytes: 32
+Message 0...
+ Message ID: 0x0011 stab(0)
+ Shared message: No
+ Constant: Yes
+ Raw size in obj header: 16 bytes
+ Chunk number: 0
+ Message Information:
+ B-tree address: 384
+ Name heap address: 96
+Message 1...
+ Message ID: 0x0000 null(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 0 bytes
+ Chunk number: 0
+ Message Information:
+
+
+
+ byte | +byte | +byte | +byte | +
---|---|---|---|
'H' | +'E' | +'A' | +'P' | +
0 | +|||
256 | +|||
16 | +|||
128 | +
+%h5debug example2.h5 96
+
+New address: 96
+Reading signature at address 96 (rel)
+Local Heap...
+Dirty: 0
+Header size (in bytes): 32
+Address of heap data: 128
+Data bytes allocated on disk: 256
+Data bytes allocated in core: 256
+Free Blocks (offset, size):
+ Block #0: 16, 240
+Percent of heap used: 6.25%
+Data follows (`__' indicates free region)...
+ 0: 00 00 00 00 00 00 00 00 44 61 74 61 73 65 74 00 ........Dataset.
+ 16: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 32: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 48: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 64: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 80: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 96: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 112: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 128: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 144: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 160: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 176: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 192: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 208: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 224: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+ 240: __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
+
+
+ byte | +byte | +byte | +byte | + +
---|---|---|---|
'T' | +'R' | +'E' | +'E' | + +
0 | +0 | +1 | + +|
0xffffffffffffffff |
+
+ |||
0xffffffffffffffff |
+
+ |||
0 |
+
+ |||
1248 |
+
+ |||
8 |
+
+
+%h5debug example2.h5 384 96
+
+New address: 384
+Reading signature at address 384 (rel)
+Tree type ID: H5B_SNODE_ID
+Size of node: 544
+Size of raw (disk) key: 8
+Dirty flag: False
+Number of initial dirty children: 0
+Level: 0
+Address of left sibling: UNDEF
+Address of right sibling: UNDEF
+Number of children (max): 1 (32)
+Child 0...
+ Address: 1248
+ Left Key:
+ Heap offset: 0
+ Name :
+ Right Key:
+ Heap offset: 8
+ Name : Dataset
+
+
+ byte | +byte | +byte | +byte | + +||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'S' | +'N' | +'O' | +'D' | + +||||||||||||||||||||
1 | +0 | +1 | + +|||||||||||||||||||||
+
|
+
+
+%h5debug example2.h5 1248 96
+
+New address: 1248
+Reading signature at address 1248 (rel)
+Symbol Table Node...
+Dirty: No
+Size of Node (in bytes): 328
+Number of Symbols: 1 of 8
+Symbol 0:
+ Name: `Dataset'
+ Name offset into private heap: 8
+ Object header address: 976
+ Dirty: No
+ Cache info type: Nothing Cached
+
+
+ byte | +byte | +byte | +byte | +||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Version: 1 | +Reserved: 0 | +Number of Header Messages: 6 | +|||||||||||||||||||||||||||||||||
Object Reference Count: 1 | +|||||||||||||||||||||||||||||||||||
Total Object Header Size: 256 | +|||||||||||||||||||||||||||||||||||
+
|
+ |||||||||||||||||||||||||||||||||||
+
|
+ |||||||||||||||||||||||||||||||||||
+
|
+ |||||||||||||||||||||||||||||||||||
+
|
+ |||||||||||||||||||||||||||||||||||
+
|
+ |||||||||||||||||||||||||||||||||||
+
|
+
+%h5debug example2.h5 976
+
+New address: 976
+Reading signature at address 976 (rel)
+Object Header...
+Dirty: 0
+Version: 1
+Header size (in bytes): 16
+Number of links: 1
+Number of messages (allocated): 6 (32)
+Number of chunks (allocated): 1 (8)
+Chunk 0...
+ Dirty: 0
+ Address: 992
+ Size in bytes: 256
+Message 0...
+ Message ID (sequence number): 0x0005 `fill_new' (0)
+ Shared: No
+ Constant: Yes
+ Raw size in obj header: 8 bytes
+ Chunk number: 0
+ Message Information:
+ Version: 1
+ Space Allocation Time: Late
+ Fill Time: On Allocation
+ Fill Value Defined: Undefined
+ Size: 0
+ Data type:
+Message 1...
+ Message ID (sequence number): 0x0003 data_type(0)
+ Shared message: No
+ Constant: Yes
+ Raw size in obj header: 16 bytes
+ Chunk number: 0
+ Message Information:
+ Type class: integer
+ Size: 4 bytes
+ Byte order: little endian
+ Precision: 32 bits
+ Offset: 0 bits
+ Low pad type: zero
+ High pad type: zero
+ Sign scheme: 2's comp
+Message 2...
+ Message ID (sequence number): 0x0001 simple_dspace(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 8 bytes
+ Chunk number: 0
+ Message Information:
+ Rank: 0
+Message 3...
+ Message ID (sequence number): 0x0008 layout(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 24 bytes
+ Chunk number: 0
+ Message Information:
+ Data address: UNDEF
+ Number of dimensions: 1
+ Size: {4}
+Message 4...
+ Message ID (sequence number): 0x0012 mtime_new(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 8 bytes
+ Chunk number: 0
+ Message Information:
+ Time: 2003-03-05 14:52:00 CST
+Message 5...
+ Message ID (sequence number): 0x0000 null(0)
+ Shared message: No
+ Constant: No
+ Raw size in obj header: 144 bytes
+ Chunk number: 0
+ Message Information:
+
+
+
+
+
+HDF5 allows chunked data to pass through user-defined filters
+ on the way to or from disk. The filters operate on chunks of an
+ H5D_CHUNKED
dataset can be arranged in a pipeline
+ so output of one filter becomes the input of the next filter.
+
+
Each filter has a two-byte identification number (type
+ H5Z_filter_t
) allocated by The HDF Group and can also be
+ passed application-defined integer resources to control its
+ behavior. Each filter also has an optional ASCII comment
+ string.
+
+
Values for H5Z_filter_t |
+ Description | +
---|---|
0-255 |
+ These values are reserved for filters predefined and + registered by the HDF5 library and of use to the general + public. They are described in a separate section + below. | +
256-511 |
+ Filter numbers in this range are used for testing only + and can be used temporarily by any organization. No + attempt is made to resolve numbering conflicts since all + definitions are by nature temporary. | +
512-65535 |
+ Reserved for future assignment. Please contact the + HDF5 development team + to reserve a value or range of values for + use by your filters. | +
Two types of filters can be applied to raw data I/O: permanent
+ filters and transient filters. The permanent filter pipeline is
+ defined when the dataset is created while the transient pipeline
+ is defined for each I/O operation. During an
+ H5Dwrite()
the transient filters are applied first
+ in the order defined and then the permanent filters are applied
+ in the order defined. For an H5Dread()
the
+ opposite order is used: permanent filters in reverse order, then
+ transient filters in reverse order. An H5Dread()
+ must result in the same amount of data for a chunk as the
+ original H5Dwrite()
.
+
+
The permanent filter pipeline is defined by calling
+ H5Pset_filter()
for a dataset creation property
+ list while the transient filter pipeline is defined by calling
+ that function for a dataset transfer property list.
+
+
herr_t H5Pset_filter (hid_t plist,
+ H5Z_filter_t filter, unsigned int flags,
+ size_t cd_nelmts, const unsigned int
+ cd_values[])
+ int H5Pget_nfilters (hid_t plist)
+ H5Z_filter_t H5Pget_filter (hid_t plist,
+ int filter_number, unsigned int *flags,
+ size_t *cd_nelmts, unsigned int
+ *cd_values, size_t namelen, char name[])
+ H5Pset_filter()
and returns information about a
+ particular filter number in a permanent or transient pipeline
+ depending on whether plist is a dataset creation or
+ dataset transfer property list. On input, cd_nelmts
+ indicates the number of entries in the cd_values
+ array allocated by the caller while on exit it contains the
+ number of values defined by the filter. The
+ filter_number should be a value between zero and
+ N-1 as described for H5Pget_nfilters()
+ and the function will return failure (a negative value) if the
+ filter number is out of range. If name is a pointer
+ to an array of at least namelen bytes then the filter
+ name will be copied into that array. The name will be null
+ terminated if the namelen is large enough. The
+ filter name returned will be the name appearing in the file or
+ else the name registered for the filter or else an empty string.
+ The flags argument to the functions above is a bit vector of + the following fields: + +
+Values for flags | +Description | +
---|---|
H5Z_FLAG_OPTIONAL |
+ If this bit is set then the filter is optional. If
+ the filter fails (see below) during an
+ H5Dwrite() operation then the filter is
+ just excluded from the pipeline for the chunk for which
+ it failed; the filter will not participate in the
+ pipeline during an H5Dread() of the chunk.
+ This is commonly used for compression filters: if the
+ compression result would be larger than the input then
+ the compression filter returns failure and the
+ uncompressed data is stored in the file. If this bit is
+ clear and a filter fails then the
+ H5Dwrite() or H5Dread() also
+ fails. |
+
Each filter is bidirectional, handling both input and output to + the file, and a flag is passed to the filter to indicate the + direction. In either case the filter reads a chunk of data from + a buffer, usually performs some sort of transformation on the + data, places the result in the same or new buffer, and returns + the buffer pointer and size to the caller. If something goes + wrong the filter should return zero to indicate a failure. + +
During output, a filter that fails or isn't defined and is + marked as optional is silently excluded from the pipeline and + will not be used when reading that chunk of data. A required + filter that fails or isn't defined causes the entire output + operation to fail. During input, any filter that has not been + excluded from the pipeline during output and fails or is not + defined will cause the entire input operation to fail. + +
Filters are defined in two phases. The first phase is to
+ define a function to act as the filter and link the function
+ into the application. The second phase is to register the
+ function, associating the function with an
+ H5Z_filter_t
identification number and a comment.
+
+
typedef size_t (*H5Z_func_t)(unsigned int
+ flags, size_t cd_nelmts, const unsigned int
+ cd_values[], size_t nbytes, size_t
+ *buf_size, void **buf)
+ H5Pset_filter()
function with the additional flag
+ H5Z_FLAG_REVERSE
which is set when the filter is
+ called as part of the input pipeline. The input buffer is
+ pointed to by *buf and has a total size of
+ *buf_size bytes but only nbytes are valid
+ data. The filter should perform the transformation in place if
+ possible and return the number of valid bytes or zero for
+ failure. If the transformation cannot be done in place then
+ the filter should allocate a new buffer with
+ malloc()
and assign it to *buf,
+ assigning the allocated size of that buffer to
+ *buf_size. The old buffer should be freed
+ by calling free()
.
+
+ herr_t H5Zregister (H5Z_filter_t filter_id,
+ const char *comment, H5Z_func_t
+ filter)
+ If zlib
version 1.1.2 or later was found
+ during configuration then the library will define a filter whose
+ H5Z_filter_t
number is
+ H5Z_FILTER_DEFLATE
. Since this compression method
+ has the potential for generating compressed data which is larger
+ than the original, the H5Z_FLAG_OPTIONAL
flag
+ should be turned on so such cases can be handled gracefully by
+ storing the original data instead of the compressed data. The
+ cd_nvalues should be one with cd_value[0]
+ being a compression aggression level between zero and nine,
+ inclusive (zero is the fastest compression while nine results in
+ the best compression ratio).
+
+
A convenience function for adding the
+ H5Z_FILTER_DEFLATE
filter to a pipeline is:
+
+
herr_t H5Pset_deflate (hid_t plist, unsigned
+ aggression)
+ Even if the zlib
isn't detected during
+ configuration the application can define
+ H5Z_FILTER_DEFLATE
as a permanent filter. If the
+ filter is marked as optional (as with
+ H5Pset_deflate()
) then it will always fail and be
+ automatically removed from the pipeline. Applications that read
+ data will fail only if the data is actually compressed; they
+ won't fail if H5Z_FILTER_DEFLATE
was part of the
+ permanent output pipeline but was automatically excluded because
+ it didn't exist when the data was written.
+
+
zlib
can be acquired from
+
+ http://www.cdrom.com/pub/infozip/zlib/
.
+
+
This example shows how to define and register a simple filter + that adds a checksum capability to the data stream. + +
The function that acts as the filter always returns zero
+ (failure) if the md5()
function was not detected at
+ configuration time (left as an exercise for the reader).
+ Otherwise the function is broken down to an input and output
+ half. The output half calculates a checksum, increases the size
+ of the output buffer if necessary, and appends the checksum to
+ the end of the buffer. The input half calculates the checksum
+ on the first part of the buffer and compares it to the checksum
+ already stored at the end of the buffer. If the two differ then
+ zero (failure) is returned, otherwise the buffer size is reduced
+ to exclude the checksum.
+
+
+
+ |
+
Once the filter function is defined it must be registered so
+ the HDF5 library knows about it. Since we're testing this
+ filter we choose one of the H5Z_filter_t
numbers
+ from the reserved range. We'll randomly choose 305.
+
+
+
+
+
+ |
+
Now we can use the filter in a pipeline. We could have added + the filter to the pipeline before defining or registering the + filter as long as the filter was defined and registered by time + we tried to use it (if the filter is marked as optional then we + could have used it without defining it and the library would + have automatically removed it from the pipeline for each chunk + written before the filter was defined and registered). + +
+
+
+
+ |
+
If the library is compiled with debugging turned on for the H5Z
+ layer (usually as a result of configure
+ --enable-debug=z
) then filter statistics are printed when
+ the application exits normally or the library is closed. The
+ statistics are written to the standard error stream and include
+ two lines for each filter that was used: one for input and one
+ for output. The following fields are displayed:
+
+
+
+Field Name | +Description | +
---|---|
Method | +This is the name of the method as defined with
+ H5Zregister() with the characters
+ "< or ">" prepended to indicate
+ input or output. |
+
Total | +The total number of bytes processed by the filter + including errors. This is the maximum of the + nbytes argument or the return value. + |
Errors | +This field shows the number of bytes of the Total + column which can be attributed to errors. | +
User, System, Elapsed | +These are the amount of user time, system time, and + elapsed time in seconds spent in the filter function. + Elapsed time is sensitive to system load. These times + may be zero on operating systems that don't support the + required operations. | +
Bandwidth | +This is the filter bandwidth which is the total + number of bytes processed divided by elapsed time. + Since elapsed time is subject to system load the + bandwidth numbers cannot always be trusted. + Furthermore, the bandwidth includes bytes attributed to + errors which may significanly taint the value if the + function is able to detect errors without much + expense. | +
+
+
+
+ |
+
Footnote 1: Dataset chunks can be compressed + through the use of filters. Developers should be aware that + reading and rewriting compressed chunked data can result in holes + in an HDF5 file. In time, enough such holes can increase the + file size enough to impair application or library performance + when working with that file. See + + Freespace Management + in the chapter + + Performance Analysis and Issues.
+ diff --git a/doxygen/examples/H5.format.1.0.html b/doxygen/examples/H5.format.1.0.html index 2d3ffbe..d2b6610 100644 --- a/doxygen/examples/H5.format.1.0.html +++ b/doxygen/examples/H5.format.1.0.html @@ -10,12 +10,12 @@
-
| Normalization. The value can be 0 if there is no normalization, 1 if the most significant bit of the mantissa is always set (except for 0.0), and 2 if the most - signficant bit of the mantissa is not stored but is + significant bit of the mantissa is not stored but is implied to be set. The value 3 is reserved and will not appear in this field. | @@ -2916,7 +2916,7 @@ Elena> "Free-space object"
-
|
-
|
This is the absolute file address of the first byte past the end of all HDF5 data. It is used to determine whether a - file has been accidently truncated and as an address where + file has been accidentally truncated and as an address where file data allocation can occur if space from the free list is not used. @@ -4910,7 +4910,7 @@ III.F. Disk Format: Level 1F - Fractal Heap enough to store objects greater than 16 bytes or not. If the heap ID length is 18 bytes or smaller, the ‘normal’ tiny heap ID form is used. If the heap ID length is greater than 18 bytes in - length, the “extented” form is used. See format description below + length, the “extended” form is used. See format description below for both sub-types. |
@@ -7884,7 +7884,7 @@ IV.A.2. Disk Format: Level 2A2 - Data Object Header Messages
|||||||||||||||||||
3 |
- Message stored is not shared, but is sharable. + | Message stored is not shared, but is shareable. |
This is the absolute file address of the first byte past the end of all HDF5 data. It is used to determine whether a - file has been accidently truncated and as an address where + file has been accidentally truncated and as an address where file data allocation can occur if space from the free list is not used. @@ -8691,7 +8691,7 @@ three rows are needed. | ||||||||||||||||||
3 |
- Message stored is not shared, but is sharable. + | Message stored is not shared, but is shareable. | |||||||||||||||||||
Length fo External File Name |
+ Length of External File Name |
This is the length for the external file name. This field exists if bit 0 of flags is set. diff --git a/doxygen/examples/H5E_examples.c b/doxygen/examples/H5E_examples.c new file mode 100644 index 0000000..deea838 --- /dev/null +++ b/doxygen/examples/H5E_examples.c @@ -0,0 +1,97 @@ +/* -*- c-file-style: "stroustrup" -*- */ + +#include "hdf5.h" + +#includeHDF5 Raw I/O Flow NotesQuincey Koziol |
![]() |
![]() |
![]() |
This section provides notes to augment the information in the accompanying + figures. +
+ +H5private.h
as:
- /* cancelability structure */ + /* cancellability structure */ typedef struct H5_cancel_struct { int previous_state; unsigned int cancel_count; diff --git a/doxygen/examples/VFL.html b/doxygen/examples/VFL.html index 9776f96..624d942 100644 --- a/doxygen/examples/VFL.html +++ b/doxygen/examples/VFL.html @@ -306,7 +306,7 @@ H5Dread(dataset, type, mspace, fspace, buffer, dxpl);-The transfer propery list can be queried in a manner similar to the file +The transfer property list can be queried in a manner similar to the file access property list: the driver provides a function (or functions) to return various information about the transfer property list: @@ -1210,7 +1210,7 @@ Flush all data for file file to storage.
Example: The sec2 driver doesn't cache any data but it also doesn't -extend the Unix file as agressively as it should. Therefore, when finalizing a +extend the Unix file as aggressively as it should. Therefore, when finalizing a file it should write a zero to the last byte of the allocated region so that when reopening the file later the EOF marker will be at least as large as the EOA marker saved in the superblock (otherwise HDF5 will refuse to open the diff --git a/doxygen/hdf5_navtree_hacks.js b/doxygen/hdf5_navtree_hacks.js index 942970c..dda8984 100644 --- a/doxygen/hdf5_navtree_hacks.js +++ b/doxygen/hdf5_navtree_hacks.js @@ -223,7 +223,7 @@ $(document).ready(function() { (function (){ // wait until the first "selected" element has been created try { - // this line will triger an exception if there is no #selected element, i.e., before the tree structure is complete. + // this line will trigger an exception if there is no #selected element, i.e., before the tree structure is complete. document.getElementById("selected").className = "item selected"; // ok, the default tree has been created, we can keep going... diff --git a/doxygen/hdf5doxy_layout.xml b/doxygen/hdf5doxy_layout.xml index 7f71c24..24642b5 100644 --- a/doxygen/hdf5doxy_layout.xml +++ b/doxygen/hdf5doxy_layout.xml @@ -7,10 +7,12 @@
- + + + diff --git a/doxygen/img/HDF5.png b/doxygen/img/HDF5.png new file mode 100644 index 0000000..0458fa8 Binary files /dev/null and b/doxygen/img/HDF5.png differ diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h index 2af9b07..47bb334 100644 --- a/hl/src/H5LTpublic.h +++ b/hl/src/H5LTpublic.h @@ -19,7 +19,7 @@ #define H5LT_FILE_IMAGE_DONT_COPY 0x0002 /* The HDF5 lib won't copy */ /* user supplied image buffer. The same image is open with the core driver. */ #define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't */ -/* deallocate user supplied image buffer. The user application is reponsible */ +/* deallocate user supplied image buffer. The user application is responsible */ /* for doing so. */ #define H5LT_FILE_IMAGE_ALL 0x0007 diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 166ba8d..1fce17e 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -91,9 +91,9 @@ typedef enum { #define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE /* - * Class methods pertaining to caching. Each type of cached object will + * Class methods pertaining to caching. Each type of cached object will * have a constant variable with permanent life-span that describes how - * to cache the object. That variable will be of type H5AC_class_t and + * to cache the object. That variable will be of type H5AC_class_t and * have the following required fields... * * LOAD: Loads an object from disk to memory. The function @@ -181,7 +181,6 @@ extern H5P_genplist_t *H5AC_ind_dxpl_g; extern hid_t H5AC_ind_dxpl_id; /* Default cache configuration. */ - #define H5AC__DEFAULT_METADATA_WRITE_STRATEGY H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED /* clang-format off */ diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index a7d30ec..5ac4521 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -75,7 +75,7 @@ extern "C" { * field should be used to open a trace file for the cache. * * - * The trace file is a debuging feature that allow the capture of + * The trace file is a debugging feature that allow the capture of * top level metadata cache requests for purposes of debugging and/or * optimization. This field should normally be set to FALSE, as * trace file collection imposes considerable overhead. @@ -120,7 +120,7 @@ extern "C" { * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There * is no logical reason why this should be so, but it simplifies * implementation and testing, and I can't think of any reason - * why it would be desireable. If you can think of one, I'll + * why it would be desirable. If you can think of one, I'll * revisit the issue. * * set_initial_size: Boolean flag indicating whether the size of the @@ -393,7 +393,7 @@ extern "C" { * * When the sync point is reached (or when there is a user generated * flush), process zero flushes sufficient entries to bring it into - * complience with its min clean size (or flushes all dirty entries in + * compliance with its min clean size (or flushes all dirty entries in * the case of a user generated flush), broad casts the list of * entries just cleaned to all the other processes, and then exits * the sync point. @@ -573,7 +573,7 @@ typedef struct H5AC_cache_config_t { size_t min_size; /**< Lower bound (in bytes) on the range of values that the - * adaptive cache resize code can select as the mininum cache * size. */ + * adaptive cache resize code can select as the minimum cache * size. */ long int epoch_length; /**< Number of cache accesses between runs of the adaptive cache resize @@ -705,13 +705,13 @@ typedef struct H5AC_cache_config_t { * of bytes of dirty metadata created since the last synchronization exceeds * this limit.\n This field only applies to the parallel case. While it is * ignored elsewhere, it can still draw a value out of bounds error.\n It - * must be consistant across all caches on any given file.\n By default, + * must be consistent across all caches on any given file.\n By default, * this field is set to 256 KB. It shouldn't be more than half the current * max cache size times the min clean fraction. */ int metadata_write_strategy; /**< Desired metadata write strategy. The valid values for this field - * are:\n #H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies tha only + * are:\n #H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies the only * process zero is allowed to write dirty metadata to disk.\n * #H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: Specifies that process zero * still makes the decisions as to what entries should be flushed, but the diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 2bd2686..f6205e8 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -22,6 +22,26 @@ * support partial I/O operations for attributes and they cannot be compressed * or extended. * + * + *
+ * */ /* @@ -91,11 +111,11 @@ extern "C" { * * \return \herr_t * - * \details H5Aclose() terminates access to the attribute specified by - * \p attr_id by releasing the identifier. + * \details H5Aclose() terminates access to the attribute through + * \p attr_id and releases the identifier. * - * \attention Further use of a released attribute identifier is illegal; a - * function using such an identifier will generate an error. + * \par Example + * \snippet H5A_examples.c create * * \since 1.0.0 * @@ -123,27 +143,19 @@ H5_DLL herr_t H5Aclose(hid_t attr_id); * The attribute name, \p attr_name, must be unique for the object. * * The attribute is created with the specified datatype and dataspace, - * \p type_id and \p space_id, which are created with the H5T and - * H5S interfaces, respectively. - * - * If \p type_id is either a fixed-length or variable-length string, - * it is important to set the string length when defining the - * datatype. String datatypes are derived from #H5T_C_S1 (or - * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in - * size. See H5Tset_size() and Creating variable-length string - * datatypes. + * \p type_id and \p space_id. * - * The access property list is currently unused, but will be used in - * the future. This property list should currently be #H5P_DEFAULT. + * \plist_unused{acpl} * * The attribute identifier returned by this function must be released * with H5Aclose() resource leaks will develop. * - * \note The \p aapl parameter is currently not used; specify #H5P_DEFAULT. - * * \note If \p loc_id is a file identifier, the attribute will be attached * that file’s root group. * + * \par Example + * \snippet H5A_examples.c create + * * \since 1.8.0 * * \see H5Aclose() @@ -173,28 +185,19 @@ H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_ * attached to the object specified by \p loc_id and \p obj_name. * * \p loc_id is a location identifier; \p obj_name is the object - * name relative to \p loc_id. If \p loc_id fully specifies the - * object to which the attribute is to be attached, \p obj_name - * should be '.' (a dot). + * name relative to \p loc_id. * * The attribute name, \p attr_name, must be unique for the object. * * The attribute is created with the specified datatype and - * dataspace, \p type_id and \p space_id, which are created with - * the H5T and H5S interfaces respectively. + * dataspace, \p type_id and \p space_id. * - * The attribute creation and access property lists are currently - * unused, but will be used in the future for optional attribute - * creation and access properties. These property lists should - * currently be #H5P_DEFAULT. + * \plist_unused{aapl} * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access * the object, \p obj_name. * - * The attribute identifier returned by this function must be - * released with H5close() or resource leaks will develop. - * * \since 1.8.0 * */ @@ -213,10 +216,14 @@ H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *a * * \details H5Adelete() removes the attribute specified by its name, * \p attr_name, from a file, dataset, group, or named datatype. - * This function should not be used when attribute identifiers - * are open on \p loc_id as it may cause the internal indexes of - * the attributes to change and future writes to the open - * attributes to produce incorrect results. + * + * \attention This function should not be used when other attribute identifiers + * are open on \p loc_id. This may cause the internal indexes of + * the attributes to change and future writes to the open + * attributes to produce incorrect results. + * + * \par Example + * \snippet H5A_examples.c delete * * \since 1.0.0 * @@ -243,27 +250,16 @@ H5_DLL herr_t H5Adelete(hid_t loc_id, const char *attr_name); * * The object from which the attribute is to be removed is * specified by a location identifier and name, \p loc_id and - * \p obj_name, respectively. If \p loc_id fully specifies the - * object from which the attribute is to be removed, \p obj_name - * should be '.' (a dot). + * \p obj_name, respectively. * * The attribute to be removed is specified by a position in an - * index, \p n. The type of index is specified by \p idx_type and - * may be #H5_INDEX_NAME, for an alpha-numeric index by name, or - * #H5_INDEX_CRT_ORDER, for an index by creation order. The order - * in which the index is to be traversed is specified by \p order - * and may be #H5_ITER_INC (increment) for top-down iteration, - * #H5_ITER_DEC (decrement) for bottom-up iteration, or - * #H5_ITER_NATIVE, in which case HDF5 will iterate in the - * fastest-available order. For example, if \p idx_type, \p order, + * index, \p n. The type of index is specified by \p idx_type. + * The order in which the index is to be traversed is specified by + * \p order. For example, if \p idx_type, \p order, * and \p n are set to #H5_INDEX_NAME, #H5_ITER_INC, and 5, - * respectively, the fifth attribute by alpha-numeric order of + * respectively, the fifth attribute in lexicographic order of * attribute names will be removed. * - * For a discussion of \p idx_type and \p order, the valid values - * of those parameters, and the use of \p n, see the description - * of H5Aiterate2(). - * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access * the object, \p obj_name. @@ -291,9 +287,6 @@ H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t id * from an object specified by location and name, \p loc_id and * \p obj_name, respectively. * - * If \p loc_id fully specifies the object from which the - * attribute is to be removed, \p obj_name should be '.' (a dot). - * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to * access the object, \p obj_name. @@ -342,9 +335,7 @@ H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name); * \p loc_id specifies a location in the file containing the object. * \p obj_name is the name of the object to which the attribute is * attached and can be a relative name, relative to \p loc_id, - * or an absolute name, based in the root group of the file. If - * \p loc_id fully specifies the object, \p obj_name should be '.' - * (a dot). + * or an absolute name, based in the root group of the file. * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access @@ -368,9 +359,6 @@ H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char * * creation property list associated with the attribute specified * by \p attr_id. * - * The creation property list identifier should be released with - * H5Pclose(). - * * \since 1.8.0 * */ @@ -387,32 +375,9 @@ H5_DLL hid_t H5Aget_create_plist(hid_t attr_id); * \return \herr_t * * \details H5Aget_info() retrieves attribute information, locating the - * attribute with an attribute identifier, \p attr_id, which is - * the identifier returned by H5Aopen() or H5Aopen_by_idx(). The + * attribute with an attribute identifier, \p attr_id. The * attribute information is returned in the \p ainfo struct. * - * The \p ainfo struct is defined as follows: - * \snippet this H5A_info_t_snip - * - * \p corder_valid indicates whether the creation order data is - * valid for this attribute. Note that if creation order is not - * being tracked, no creation order data will be valid. Valid - * values are \c TRUE and \c FALSE. - * - * \p corder is a positive integer containing the creation - * order of the attribute. This value is 0-based, so, for - * example, the third attribute created will have a \p corder - * value of 2. - * - * \p cset indicates the character set used for the attribute’s - * name; valid values are defined in H5Tpublic.h and include - * the following: - * \csets - * This value is set with H5Pset_char_encoding(). - * - * \p data_size indicates the size, in the number of characters, - * of the attribute. - * * \since 1.8.0 * */ @@ -440,16 +405,9 @@ H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/); * The attribute is located by its index position and the attribute * information is returned in the \p ainfo struct. * - * If \p loc_id fully specifies the object to which the attribute - * is attached, \p obj_name should be '.' (a dot). - * * The attribute is located by means of an index type, an index * traversal order, and a position in the index, \p idx_type, - * \p order and \p n, respectively. These parameters and their - * valid values are discussed in the description of H5Aiterate2(). - * - * The \p ainfo struct, which will contain the returned attribute - * information, is described in H5Aget_info(). + * \p order and \p n, respectively. * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access @@ -467,8 +425,7 @@ H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t * \brief Retrieves attribute information, by attribute name * * \fgdt_loc_id - * - * \param[in] obj_name Name of object to which attribute is attached, + * \param[in] obj_name Name of the object to which an attribute is attached, * relative to location * \param[in] attr_name Attribute name * \param[out] ainfo Struct containing returned attribute information @@ -481,11 +438,6 @@ H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t * location and name, \p loc_id and \p obj_name, respectively. * The attribute information is returned in the \p ainfo struct. * - * If \p loc_id fully specifies the object to which the attribute - * is attached, \p obj_name should be '.' (a dot). - * - * The \p ainfo struct is described in H5Aget_info(). - * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to * access the object, \p obj_name. @@ -516,8 +468,8 @@ H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char * string terminator is stored in the last position of the buffer * to properly terminate the string. * - * If the user only wants to find out the size of this name, the - * values 0 and NULL can be passed in for the parameters + * If the user only wants to retrieve the name length, the + * values 0 and NULL should be passed for the parameters * \p bufsize and \p buf. * * \since 1.0.0 @@ -528,7 +480,7 @@ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); /** * \ingroup H5A * - * \brief Gets an attribute name, by attribute index position + * \brief Gets an attribute name by attribute index position * * \fgdt_loc_id * \param[in] obj_name Name of object to which attribute is attached, @@ -549,13 +501,9 @@ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); * located by its index position, the size of the name is specified * in \p size, and the attribute name is returned in \p name. * - * If \p loc_id fully specifies the object to which the attribute - * is attached, \p obj_name should be '.' (a dot). - * * The attribute is located by means of an index type, an index * traversal order, and a position in the index, \p idx_type, - * \p order and \p n, respectively. These parameters and their - * valid values are discussed in the description of H5Aiterate2(). + * \p order and \p n, respectively. * * If the attribute name’s size is unknown, the values 0 and NULL * can be passed in for the parameters \p size and \p name. The @@ -595,7 +543,7 @@ H5_DLL hid_t H5Aget_space(hid_t attr_id); /** * \ingroup H5A * - * \brief Returns the amount of storage required for an attribute + * \brief Returns the amount of storage used to store an attribute * * \attr_id * @@ -613,17 +561,16 @@ H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id); /** * \ingroup H5A * - * \brief Gets an attribute datatype + * \brief Gets an attribute's datatype * * \attr_id * * \return \hid_t{datatype} * - * \details H5Aget_type() retrieves a copy of the datatype for an attribute. + * \details H5Aget_type() retrieves a copy of the attribute's datatype. * The datatype is reopened if it is a named type before returning * it to the application. The datatypes returned by this function - * are always read-only. If an error occurs when atomizing the - * return datatype, then the datatype is closed. + * are always read-only. * * The datatype identifier returned from this function must be * released with H5Tclose() or resource leaks will develop. @@ -636,7 +583,7 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id); /** * \ingroup H5A * - * \brief Calls user-defined function for each attribute on an object + * \brief Calls a user-defined function for each attribute on an object * * \fgdt_loc_id * \param[in] idx_type Type of index @@ -663,24 +610,13 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id); * are specified by three parameters: the index type, * \p idx_type; the order in which the index is to be traversed, * \p order; and the attribute’s position in the index, \p idx. - * - * The type of index specified by \p idx_type can be one of the - * following: - * - * \indexes - * - * The order in which the index is to be traversed, as specified - * by \p order, can be one of the following: - * - * \orders - * * The next attribute to be operated on is specified by \p idx, * a position in the index. * * For example, if \p idx_type, \p order, and \p idx are set to * #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute * in question is the fifth attribute from the beginning of the - * alpha-numeric index of attribute names. If \p order were set to + * alphanumeric index of attribute names. If \p order were set to * #H5_ITER_DEC, it would be the fifth attribute from the end of * the index. * @@ -690,11 +626,6 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id); * the value returned identifies the parameter to be operated on * in the next step of the iteration. * - * \p op is a user-defined function whose prototype is defined - * as follows: - * \snippet this H5A_operator2_t_snip - * \click4more - * * \note This function is also available through the H5Aiterate() macro. * * \since 1.8.0 @@ -730,31 +661,17 @@ H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t ord * additional information as defined below, is passed to a * user-defined function, \p op, which operates on that attribute. * - * If \p loc_id fully specifies the object to which these - * attributes are attached, \p obj_name should be '.' (a dot). - * * The order of the iteration and the attributes iterated over * are specified by three parameters: the index type, \p idx_type; * the order in which the index is to be traversed, \p order; * and the attribute’s position in the index, \p idx. - * - * The type of index specified by \p idx_type can be one of the - * following: - * - * \indexes - * - * The order in which the index is to be traversed, as specified - * by \p order, can be one of the following: - * - * \orders - * * The next attribute to be operated on is specified by \p idx, * a position in the index. * * For example, if \p idx_type, \p order, and \p idx are set to * #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute * in question is the fifth attribute from the beginning of the - * alpha-numeric index of attribute names. If \p order were set to + * alphanumeric index of attribute names. If \p order were set to * #H5_ITER_DEC, it would be the fifth attribute from the end of * the index. * @@ -764,25 +681,6 @@ H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t ord * the value returned identifies the parameter to be operated on in * the next step of the iteration. * - * \p op is a user-defined function whose prototype is defined - * as follows: - * \snippet this H5A_operator2_t_snip - * \click4more - * - * Valid return values from an operator and the resulting - * H5Aiterate_by_name() and \p op behavior are as follows: - * - * \li Zero causes the iterator to continue, returning zero when - * all attributes have been processed. - * \li A positive value causes the iterator to immediately return - * that positive value, indicating short-circuit success. - * The iterator can be restarted at the next attribute, as - * indicated by the return value of \p idx. - * \li A negative value causes the iterator to immediately return - * that value, indicating failure. The iterator can be - * restarted at the next attribute, as indicated by the return - * value of \p idx. - * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access * the object, \p obj_name. @@ -809,8 +707,7 @@ H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t * \details H5Aopen() opens an existing attribute, \p attr_name, that is * attached to object specified by an object identifier, \p obj_id. * - * The attribute access property list, \p aapl_id, is currently unused - * and should be #H5P_DEFAULT. + * \plist_unused{aapl_id} * * This function, H5Aopen_by_idx() or H5Aopen_by_name() must be called * before the attribute can be accessed for any further purpose, @@ -819,6 +716,9 @@ H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t * The attribute identifier returned by this function must be released * with H5Aclose() or resource leaks will develop. * + * \par Example + * \snippet H5A_examples.c read + * * \since 1.8.0 * * \see H5Aclose(), H5Acreate() @@ -843,17 +743,13 @@ H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); * * \details H5Aopen_by_idx() opens an existing attribute that is attached * to an object specified by location and name, \p loc_id and - * \p obj_name, respectively. If \p loc_id fully specifies the - * object to which the attribute is attached, \p obj_name, should - * be '.' (a dot). + * \p obj_name, respectively. * * The attribute is identified by an index type, an index traversal * order, and a position in the index, \p idx_type, \p order and - * \p n, respectively. These parameters and their valid values are - * discussed in the description of H5Aiterate2(). + * \p n, respectively. * - * The attribute access property list, \p aapl_id, is currently - * unused and should currently be #H5P_DEFAULT. + * \plist_unused{aapl_id} * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access @@ -892,11 +788,9 @@ H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_t * * \p loc_id specifies a location from which the target object can * be located and \p obj_name is an object name relative to - * \p loc_id. If \p loc_id fully specifies the object to which the - * attribute is attached, \p obj_name should be '.' (a dot). + * \p loc_id. * - * The attribute access property list, \p aapl_id, is currently - * unused and should currently be #H5P_DEFAULT. + * \plist_unused{aapl_id} * * The link access property list, \p lapl_id, may provide * information regarding the properties of links required to access @@ -933,6 +827,9 @@ H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *att * Datatype conversion takes place at the time of a read or write and * is automatic. * + * \par Example + * \snippet H5A_examples.c read + * * \version 1.8.8 Fortran updated to Fortran2003. * \version 1.4.2 The \p dims parameter was added to the Fortran API in this * release. @@ -980,15 +877,12 @@ H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name * attribute's in-memory datatype is specified with \p type_id. * The entire attribute is written from \p buf to the file. * - * If \p type_id is either a fixed-length or variable-length string, - * it is important to set the string length when defining the datatype. - * String datatypes are derived from #H5T_C_S1 (or #H5T_FORTRAN_S1 for - * Fortran codes), which defaults to 1 character in size. - * See H5Tset_size() and Creating variable-length string datatypes. - * * Datatype conversion takes place at the time of a read or write and * is automatic. * + * \par Example + * \snippet H5A_examples.c update + * * \version 1.8.8 Fortran updated to Fortran2003. * \version 1.4.2 Fortran \p dims parameter added in this release * \since 1.0.0 @@ -1070,9 +964,9 @@ typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_nam * * \return \hid_tv{attribute} * - * \note The \p acpl parameters is currently not used; specify #H5P_DEFAULT. + * \deprecation_note{H5Acreate2()} * - * \deprecated Deprecated in favor of H5Acreate2() + * \plist_unused{acpl} * * \details H5Acreate1() creates an attribute, \p name, which is attached * to the object specified by the identifier \p loc_id. @@ -1080,18 +974,7 @@ typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_nam * The attribute name, \p name, must be unique for the object. * * The attribute is created with the specified datatype and dataspace, - * \p type_id and \p space_id, which are created with the H5T and - * H5S interfaces, respectively. - * - * If \p type_id is either a fixed-length or variable-length string, - * it is important to set the string length when defining the - * datatype. String datatypes are derived from #H5T_C_S1 (or - * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in - * size. See H5Tset_size() and Creating variable-length string - * datatypes. - * - * The attribute identifier returned by this function must be released - * with H5Aclose() resource leaks will develop. + * \p type_id and \p space_id. * * \since 1.8.0 * @@ -1113,8 +996,7 @@ H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t spa * \return Returns the number of attributes if successful; otherwise returns * a negative value. * - * \deprecated This function is deprecated in favor of the functions - * H5Oget_info(), H5Oget_info_by_name(), and H5Oget_info_by_idx(). + * \deprecation_note{H5Oget_info(), H5Oget_info_by_name(), and H5Oget_info_by_idx()} * * \details H5Aget_num_attrs() returns the number of attributes attached to * the object specified by its identifier, \p loc_id. @@ -1137,8 +1019,7 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id); * * \return \herr_t * - * \deprecated This function is deprecated in favor of the function - * H5Aiterate2(). + * \deprecation_note{H5Aiterate2()} * * \details H5Aiterate1() iterates over the attributes of the object * specified by its identifier, \p loc_id. The object can be a @@ -1150,10 +1031,6 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id); * \p op, is returned in \p idx. If \p idx is the null pointer, * then all attributes are processed. * - * \p op is a user-defined function whose prototype is defined as follows: - * \snippet this H5A_operator1_t_snip - * \click4more - * * \version 1.8.0 The function \p H5Aiterate was renamed to H5Aiterate1() * and deprecated in this release. * \since 1.0.0 @@ -1171,8 +1048,7 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *idx, H5A_operator1_t op, void * * \return \hid_tv{attribute} * - * \deprecated This function is deprecated in favor of the function - * H5Aopen_by_idx(). + * \deprecation_note{H5Aopen_by_idx()} * * \details H5Aopen_idx() opens an attribute which is attached to the * object specified with \p loc_id . The location object may be @@ -1198,8 +1074,7 @@ H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); * * \return \hid_tv{attribute} * - * \deprecated This function is deprecated in favor of the function - * H5Aopen_by_name(). + * \deprecation_note{H5Aopen_by_name()} * * \details H5Aopen_name() opens an attribute specified by its name, * \p name, which is attached to the object specified with diff --git a/src/H5B2private.h b/src/H5B2private.h index de823e4..1a7d0c8 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -29,7 +29,7 @@ #include "H5B2public.h" /* Private headers needed by this file */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ /**************************/ /* Library Private Macros */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 69ac9b1..ac1d018 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -1030,11 +1030,11 @@ struct H5C_t * * from the H5C__DLL_PRE_REMOVE_SC macro. With the addition of the * epoch markers used in the age out based cache size reduction algorithm, - * this invarient need not hold, as the epoch markers are of size 0. + * this invariant need not hold, as the epoch markers are of size 0. * * One could argue that I should have given the epoch markers a positive * size, but this would break the index_size = LRU_list_size + pl_size - * + pel_size invarient. + * + pel_size invariant. * * Alternatively, I could pass the current decr_mode in to the macro, * and just skip the check whenever epoch markers may be in use. @@ -1419,23 +1419,6 @@ if ( ( (entry_ptr) == NULL ) || \ * H5C__UPDATE_CACHE_HIT_RATE_STATS(), which is always active as * the cache hit rate stats are always collected and available. * - * Changes: - * - * JRM -- 3/21/06 - * Added / updated macros for pinned entry related stats. - * - * JRM -- 8/9/06 - * More pinned entry stats related updates. - * - * JRM -- 3/31/07 - * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on - * read and write protects. - * - * MAM -- 1/15/09 - * Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain - * common code within macros that update the maximum - * index, clean_index, and dirty_index statistics fields. - * ***********************************************************************/ #define H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) \ @@ -2218,8 +2201,8 @@ if ( (cache_ptr)->index_size != \ * Function: H5C__REMOVE_ENTRY_FROM_SLIST * * Purpose: Remove the specified instance of H5C_cache_entry_t from the - * index skip list in the specified instance of H5C_t. Update - * the associated length and size fields. + * index skip list in the specified instance of H5C_t. Update + * the associated length and size fields. * * Return: N/A * @@ -2227,20 +2210,20 @@ if ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 7/21/04 - * Updated function for the addition of the hash table. + * JRM -- 7/21/04 + * Updated function for the addition of the hash table. * - * JRM - 7/27/04 - * Converted from the function H5C_remove_entry_from_tree() - * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of - * wringing a little more performance out of the cache. + * JRM - 7/27/04 + * Converted from the function H5C_remove_entry_from_tree() + * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of + * wringing a little more performance out of the cache. * - * QAK -- 11/27/04 - * Switched over to using skip list routines. + * QAK -- 11/27/04 + * Switched over to using skip list routines. * - * JRM -- 3/28/07 - * Updated sanity checks for the new is_read_only and - * ro_ref_count fields in H5C_cache_entry_t. + * JRM -- 3/28/07 + * Updated sanity checks for the new is_read_only and + * ro_ref_count fields in H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2276,7 +2259,7 @@ if ( (cache_ptr)->index_size != \ * Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE * * Purpose: Update cache_ptr->slist_size for a change in the size of - * and entry in the slist. + * and entry in the slist. * * Return: N/A * @@ -2284,15 +2267,15 @@ if ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 8/27/06 - * Added the H5C_DO_SANITY_CHECKS version of the macro. + * JRM -- 8/27/06 + * Added the H5C_DO_SANITY_CHECKS version of the macro. * - * This version maintains the slist_size_increase field - * that are used in sanity checks in the flush routines. + * This version maintains the slist_size_increase field + * that are used in sanity checks in the flush routines. * - * All this is needed as the fractal heap needs to be - * able to dirty, resize and/or move entries during the - * flush. + * All this is needed as the fractal heap needs to be + * able to dirty, resize and/or move entries during the + * flush. * *------------------------------------------------------------------------- */ @@ -2405,16 +2388,16 @@ if ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head.\ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Use the dirty flag to infer whether the entry is on the clean or \ @@ -2468,16 +2451,16 @@ if ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2660,28 +2643,28 @@ if ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* since the entry is being flushed or cleared, one would think \ - * that it must be dirty -- but that need not be the case. Use the \ - * dirty flag to infer whether the entry is on the clean or dirty \ - * LRU list, and remove it. Then insert it at the head of the \ - * clean LRU list. \ + * that it must be dirty -- but that need not be the case. Use the \ + * dirty flag to infer whether the entry is on the clean or dirty \ + * LRU list, and remove it. Then insert it at the head of the \ + * clean LRU list. \ * \ * The function presumes that a dirty entry will be either cleared \ - * or flushed shortly, so it is OK if we put a dirty entry on the \ - * clean LRU list. \ + * or flushed shortly, so it is OK if we put a dirty entry on the \ + * clean LRU list. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ @@ -2722,17 +2705,17 @@ if ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2816,7 +2799,7 @@ if ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* insert the entry at the head of the clean or dirty LRU list as \ @@ -2857,7 +2840,7 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ - \ + \ } else { \ \ /* modified LRU specific code */ \ @@ -2866,7 +2849,7 @@ if ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2935,12 +2918,12 @@ if ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ HDassert( (cache_ptr)->pel_len >= 0 ); \ \ @@ -2952,7 +2935,7 @@ if ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Similarly, remove the entry from the clean or dirty LRU list \ @@ -2998,12 +2981,12 @@ if ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ HDassert( (cache_ptr)->pel_len >= 0 ); \ \ @@ -3015,7 +2998,7 @@ if ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -3066,20 +3049,20 @@ if ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ \ if ( ! ( (entry_ptr)->is_pinned ) ) { \ - \ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* remove the entry from either the clean or dirty LUR list as \ @@ -3088,7 +3071,7 @@ if ( (cache_ptr)->index_size != \ if ( was_dirty ) { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ @@ -3097,34 +3080,34 @@ if ( (cache_ptr)->index_size != \ } else { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* insert the entry at the head of either the clean or dirty \ - * LRU list as appropriate. \ + * LRU list as appropriate. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ \ } else { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* End modified LRU specific code. */ \ @@ -3144,20 +3127,20 @@ if ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ \ if ( ! ( (entry_ptr)->is_pinned ) ) { \ - \ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -3211,43 +3194,43 @@ if ( (cache_ptr)->index_size != \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( new_size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* Similarly, update the size of the clean or dirty LRU list as \ - * appropriate. At present, the entry must be clean, but that \ - * could change. \ + * appropriate. At present, the entry must be clean, but that \ + * could change. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ } \ \ /* End modified LRU specific code. */ \ @@ -3270,21 +3253,21 @@ if ( (cache_ptr)->index_size != \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* End modified LRU specific code. */ \ } \ @@ -3344,39 +3327,39 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->pel_size, (fail_val)) \ HDassert( (cache_ptr)->pel_len >= 0 ); \ \ - /* modified LRU specific code */ \ + /* modified LRU specific code */ \ \ - /* insert the entry at the head of the LRU list. */ \ + /* insert the entry at the head of the LRU list. */ \ \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ \ - /* Similarly, insert the entry at the head of either the clean \ - * or dirty LRU list as appropriate. \ - */ \ + /* Similarly, insert the entry at the head of either the clean \ + * or dirty LRU list as appropriate. \ + */ \ \ - if ( (entry_ptr)->is_dirty ) { \ + if ( (entry_ptr)->is_dirty ) { \ \ - H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, \ - (fail_val)) \ + H5C__AUX_DLL_PREPEND((entry_ptr), \ + (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, \ + (fail_val)) \ \ - } else { \ + } else { \ \ - H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ - } \ + H5C__AUX_DLL_PREPEND((entry_ptr), \ + (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, \ + (fail_val)) \ + } \ \ - /* End modified LRU specific code. */ \ + /* End modified LRU specific code. */ \ \ } /* H5C__UPDATE_RP_FOR_UNPIN */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index ce03ba0..d7a1949 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -44,7 +44,8 @@ #define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) /* H5C_COLLECT_CACHE_STATS controls overall collection of statistics - * on cache activity. In general, this #define should be set to 0. + * on cache activity. In general, this #define should be set to 1 in + * debug mode, and 0 in production mode.. */ #define H5C_COLLECT_CACHE_STATS 0 diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 31c0bd1..04e02e9 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -78,17 +78,17 @@ typedef struct H5D_type_info_t { hid_t dst_type_id; /* Destination datatype ID */ /* Computed/derived values */ - size_t src_type_size; /* Size of source type */ - size_t dst_type_size; /* Size of destination type*/ + size_t src_type_size; /* Size of source type */ + size_t dst_type_size; /* Size of destination type */ size_t max_type_size; /* Size of largest source/destination type */ hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */ hbool_t is_xform_noop; /* Whether the data transform is a NOOP */ const H5T_subset_info_t *cmpd_subset; /* Info related to the compound subset conversion functions */ H5T_bkg_t need_bkg; /* Type of background buf needed */ - size_t request_nelmts; /* Requested strip mine */ - uint8_t * tconv_buf; /* Datatype conv buffer */ + size_t request_nelmts; /* Requested strip mine */ + uint8_t * tconv_buf; /* Datatype conv buffer */ hbool_t tconv_buf_allocated; /* Whether the type conversion buffer was allocated */ - uint8_t * bkg_buf; /* Background buffer */ + uint8_t * bkg_buf; /* Background buffer */ hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */ } H5D_type_info_t; @@ -385,7 +385,7 @@ typedef struct H5D_rdcc_t { struct H5D_rdcc_ent_t * head; /* Head of doubly linked list */ struct H5D_rdcc_ent_t * tail; /* Tail of doubly linked list */ size_t nbytes_used; /* Current cached raw data in bytes */ - int nused; /* Number of chunk slots in use */ + int nused; /* Number of chunk slots in use */ H5D_chunk_cached_t last; /* Cached copy of last chunk information */ struct H5D_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/ H5SL_t * sel_chunks; /* Skip list containing information for each chunk selected */ @@ -404,7 +404,7 @@ typedef struct H5D_rdcdc_t { /* * A dataset is made of two layers, an H5D_t struct that is unique to - * each instance of an opened datset, and a shared struct that is only + * each instance of an opened dataset, and a shared struct that is only * created once for a given dataset. Thus, if a dataset is opened twice, * there will be two IDs and two H5D_t structs, both sharing one H5D_shared_t. */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 5170f67..ed4fbc1 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -11,6 +11,12 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* + * This file contains public declarations for the H5D module. + */ +#ifndef H5Dpublic_H +#define H5Dpublic_H + /**\defgroup H5D H5D * * Use the functions in this module to manage HDF5 datasets, including the @@ -19,14 +25,31 @@ * name or by a handle. Such handles can be obtained by either creating or * opening the dataset. * + * Typical stages in the HDF5 dataset life cycle are shown below in introductory + * examples. + * + *+ * Create Read + * + * \snippet{lineno} H5A_examples.c create + * + *+ * \snippet{lineno} H5A_examples.c read + * + *+ * Update Delete + * + *+ * \snippet{lineno} H5A_examples.c update + * + *+ * \snippet{lineno} H5A_examples.c delete + * + *+ *
+ * */ -/* - * This file contains public declarations for the H5D module. - */ -#ifndef H5Dpublic_H -#define H5Dpublic_H - /* System headers needed by this file */ /* Public headers needed by this file */ @@ -62,12 +85,11 @@ * Values for the H5D_LAYOUT property */ typedef enum H5D_layout_t { - H5D_LAYOUT_ERROR = -1, - - H5D_COMPACT = 0, /**< raw data is very small */ - H5D_CONTIGUOUS = 1, /**< the default */ - H5D_CHUNKED = 2, /**< slow and fancy */ - H5D_NLAYOUTS = 3 /**< this one must be last! */ + H5D_LAYOUT_ERROR = -1, /**< error */ + H5D_COMPACT = 0, /**< raw data is small (< 64KB) */ + H5D_CONTIGUOUS = 1, /**< contiguous layout */ + H5D_CHUNKED = 2, /**< chunked or tiled layout */ + H5D_NLAYOUTS = 3 /**< this one must be last! */ } H5D_layout_t; //! @@ -85,11 +107,11 @@ typedef enum H5D_chunk_index_t { * Values for the space allocation time property */ typedef enum H5D_alloc_time_t { - H5D_ALLOC_TIME_ERROR = -1, - H5D_ALLOC_TIME_DEFAULT = 0, - H5D_ALLOC_TIME_EARLY = 1, - H5D_ALLOC_TIME_LATE = 2, - H5D_ALLOC_TIME_INCR = 3 + H5D_ALLOC_TIME_ERROR = -1, /**< Error */ + H5D_ALLOC_TIME_DEFAULT = 0, /**< Default (layout dependent) */ + H5D_ALLOC_TIME_EARLY = 1, /**< Allocate on creation */ + H5D_ALLOC_TIME_LATE = 2, /**< Allocate on first write */ + H5D_ALLOC_TIME_INCR = 3 /**< Allocate incrementally (by chunk) */ } H5D_alloc_time_t; //! @@ -98,10 +120,11 @@ typedef enum H5D_alloc_time_t { * Values for the status of space allocation */ typedef enum H5D_space_status_t { - H5D_SPACE_STATUS_ERROR = -1, - H5D_SPACE_STATUS_NOT_ALLOCATED = 0, - H5D_SPACE_STATUS_PART_ALLOCATED = 1, - H5D_SPACE_STATUS_ALLOCATED = 2 + H5D_SPACE_STATUS_ERROR = -1, /**< Error */ + H5D_SPACE_STATUS_NOT_ALLOCATED = 0, /**< Space has not been allocated for this dataset. */ + H5D_SPACE_STATUS_PART_ALLOCATED = 1, /**< Space has been partially allocated for this dataset. + (Used only for datasets with chunked storage.) */ + H5D_SPACE_STATUS_ALLOCATED = 2 /**< Space has been allocated for this dataset. */ } H5D_space_status_t; //! @@ -110,10 +133,10 @@ typedef enum H5D_space_status_t { * Values for time of writing fill value property */ typedef enum H5D_fill_time_t { - H5D_FILL_TIME_ERROR = -1, - H5D_FILL_TIME_ALLOC = 0, - H5D_FILL_TIME_NEVER = 1, - H5D_FILL_TIME_IFSET = 2 + H5D_FILL_TIME_ERROR = -1, /**< Error */ + H5D_FILL_TIME_ALLOC = 0, /**< Fill on allocation */ + H5D_FILL_TIME_NEVER = 1, /**< Never write fill values */ + H5D_FILL_TIME_IFSET = 2 /**< Fill if fill-value was set */ } H5D_fill_time_t; //! @@ -122,10 +145,10 @@ typedef enum H5D_fill_time_t { * Values for fill value status */ typedef enum H5D_fill_value_t { - H5D_FILL_VALUE_ERROR = -1, - H5D_FILL_VALUE_UNDEFINED = 0, - H5D_FILL_VALUE_DEFAULT = 1, - H5D_FILL_VALUE_USER_DEFINED = 2 + H5D_FILL_VALUE_ERROR = -1, /**< Error */ + H5D_FILL_VALUE_UNDEFINED = 0, /**< No fill value defined */ + H5D_FILL_VALUE_DEFAULT = 1, /**< Default fill-value */ + H5D_FILL_VALUE_USER_DEFINED = 2 /**< User-defined fill-value */ } H5D_fill_value_t; //! @@ -223,7 +246,7 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us * \brief Creates a new dataset and links it into the file * * \fgdta_loc_id - * \param[in] name Name of the dataset to create + * \param[in] name Name of the dataset to create * \type_id * \space_id * \lcpl_id @@ -248,13 +271,6 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us * \p name may be either an absolute path in the file or a relative * path from \p loc_id naming the dataset. * - * \p dtype_id specifies the datatype of each data element as stored - * in the file. If \p dtype_id is either a fixed-length or - * variable-length string, it is important to set the string length - * when defining the datatype. String datatypes are derived from - * #H5T_C_S1 (or #H5T_FORTRAN_S1 for Fortran codes), which defaults - * to 1 character in size. - * * If \p dtype_id is a committed datatype, and if the file location * associated with the committed datatype is different from the * file location where the dataset will be created, the datatype @@ -262,19 +278,19 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us * * The link creation property list, \p lcpl_id, governs creation * of the link(s) by which the new dataset is accessed and the - * creation of any * intermediate groups that may be missing. + * creation of any intermediate groups that may be missing. * * The datatype and dataspace properties and the dataset creation * and access property lists are attached to the dataset, so the * caller may derive new datatypes, dataspaces, and creation and * access properties from the old ones and reuse them in calls to * create additional datasets. Once created, the dataset can be - * read from or written to. Reading data from a datatset that was + * read from or written to. Reading data from a dataset that was * not previously written, the HDF5 library will return default * or user-defined fill values. * - * To conserve and release resources, the dataset should be closed - * when access is no longer required. + * \par Example + * \snippet H5D_examples.c create * * \since 1.8.0 * @@ -313,34 +329,14 @@ H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t spa * the file, which may differ from the datatype and dataspace * in application memory. * - * Dataset creation property list and dataset access creation - * property list are specified by \p dcpl_id and \p dapl_id. - * * H5Dcreate_anon() returns a new dataset identifier. Using * this identifier, the new dataset must be linked into the * HDF5 file structure with H5Olink() or it will be deleted - * from the file when the file is closed. - * - * See H5Dcreate2() for further details and considerations on - * the use of H5Dcreate2() and H5Dcreate_anon(). - * - * The differences between this function and H5Dcreate2() are - * as follows: - * \li H5Dcreate_anon() explicitly includes a dataset access property - * list. H5Dcreate() always uses default dataset access properties. - * - * \li H5Dcreate_anon() neither provides the new dataset’s name nor - * links it into the HDF5 file structure; those actions must be - * performed separately through a call to H5Olink(), which offers - * greater control over linking. - * - * A dataset created with this function should be closed with - * H5Dclose() when the dataset is no longer needed so that resource - * leaks will not develop. + * when the file is closed. * * \since 1.8.0 * - * \see H5Olink(), H5Dcreate(), Using Identifiers + * \see H5Olink(), H5Dcreate() * */ H5_DLL hid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id); @@ -366,12 +362,6 @@ H5_DLL hid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t d * specified then the dataset will be opened at the location * where the attribute, dataset, or named datatype is attached. * - * The dataset access property list, \p dapl_id, provides - * information regarding access to the dataset. - * - * To conserve and release resources, the dataset should be closed - * when access is no longer required. - * * \since 1.8.0 * * \see H5Dcreate2(), H5Dclose() @@ -397,6 +387,9 @@ H5_DLL hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id); * be released with H5Sclose() when the identifier is no longer * needed so that resource leaks will not occur. * + * \par Example + * \snippet H5D_examples.c update + * * \see H5Sclose() * */ @@ -405,7 +398,19 @@ H5_DLL hid_t H5Dget_space(hid_t dset_id); /** * -------------------------------------------------------------------------- * \ingroup H5D - * \todo Document this function! + * + * \brief Determines whether space has been allocated for a dataset + * + * \dset_id + * \param[out] allocation Space allocation status + * + * \return \herr_t + * + * \details H5Dget_space_status() determines whether space has been allocated + * for the dataset \p dset_id. + * + * \since 1.6.0 + * */ H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation); @@ -424,27 +429,7 @@ H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation) * * If a dataset has a named datatype, then an identifier to the * opened datatype is returned. Otherwise, the returned datatype - * is read-only. If atomization of the datatype fails, then the - * datatype is closed. - * - * A datatype identifier returned from this function should be - * released with H5Tclose() when the identifier is no longer - * needed to prevent resource leaks. - * - * \note Datatype Identifiers - * - * Please note that the datatype identifier is actually an object - * identifier or a handle returned from opening the datatype. It - * is not persistent and its value can be different from one HDF5 - * session to the next. - * - * H5Tequal() can be used to compare datatypes. - * - * HDF5 High Level APIs that may also be of interest are: - * - * H5LTdtype_to_text() creates a text description of a - * datatype. H5LTtext_to_dtype() creates an HDF5 datatype - * given a text description. + * is read-only. * */ H5_DLL hid_t H5Dget_type(hid_t dset_id); @@ -464,9 +449,6 @@ H5_DLL hid_t H5Dget_type(hid_t dset_id); * a copy of the dataset creation property list associated with * the dataset specified by \p dset_id. * - * The creation property list identifier should be released - * with H5Pclose() to prevent resource leaks. - * */ H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); @@ -500,10 +482,6 @@ H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); * All link access properties in the returned list will be set * to the default values. * - * The access property list identifier should be released with - * H5Pclose() when the identifier is no longer needed so that - * resource leaks will not develop. - * * \since 1.8.3 * */ @@ -522,11 +500,8 @@ H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); * \details H5Dget_storage_size() returns the amount of storage, * in bytes, that is allocated in the file for the raw data of * the dataset specified by \p dset_id. - * - * \note The amount of storage in this case is the storage - * allocated in the written file, which will typically differ - * from the space required to hold a dataset in working memory. - * + * H5Dget_storage_size() reports only the space required to store + * the dataset elements, excluding any metadata. * \li For contiguous datasets, the returned size equals the current * allocated size of the raw data. * \li For unfiltered chunked datasets, the returned size is the @@ -536,21 +511,19 @@ H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); * compression filter is in use, H5Dget_storage_size() will return * the total space required to store the compressed chunks. * - * H5Dget_storage_size() reports only the space required to store - * the data, not including that of any metadata. + * \note Note that H5Dget_storage_size() is not generally an + * appropriate function to use when determining the amount + * of memory required to work with a dataset. In such + * circumstances, you must determine the number of data + * points in a dataset and the size of an individual dataset + * element. H5Sget_simple_extent_npoints() and H5Tget_size() + * can be used to calculate that amount. * - * \attention H5Dget_storage_size() does not differentiate between 0 (zero), + * \warning H5Dget_storage_size() does not differentiate between 0 (zero), * the value returned for the storage size of a dataset * with no stored values, and 0 (zero), the value returned to * indicate an error. * - * \note Note that H5Dget_storage_size() is not generally an - * appropriate function to use when determining the amount - * of memory required to work with a dataset. In such - * circumstances, you must determine the number of data - * points in a dataset and the size of an individual data - * element. H5Sget_simple_extent_npoints() and H5Tget_size() - * can be used to get that information. * */ H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id); @@ -588,7 +561,7 @@ H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hs * * \dset_id * - * \return Returns the offset in bytes; otherwise, returns \c HADDR_UNDEF, + * \return Returns the offset in bytes; otherwise, returns #HADDR_UNDEF, * a negative value. * * \details H5Dget_offset() returns the address in the file of @@ -637,9 +610,8 @@ H5_DLL haddr_t H5Dget_offset(hid_t dset_id); * used for the memory dataspace and the selection defined with \p * file_space_id is used for the selection within that dataspace. * - * If raw data storage space has not been allocated for the dataset - * and a fill value has been defined, the returned buffer \p buf - * is filled with the fill value. + * The number of elements selected in the memory dataspace \Emph{must} + * be equal to the number of elements selected in the file dataspace. * * The behavior of the library for the various combinations of * valid dataspace identifiers and #H5S_ALL for the \p mem_space_id @@ -684,14 +656,12 @@ H5_DLL haddr_t H5Dget_offset(hid_t dset_id); *+ * Create Read + * + * \snippet{lineno} H5D_examples.c create + * + *+ * \snippet{lineno} H5D_examples.c read + * + *+ * Update Delete + * + *+ * \snippet{lineno} H5D_examples.c update + * + *+ * \snippet{lineno} H5D_examples.c delete + * + *
\c elem | - *[in,out] | - *Pointer to the memory buffer containing the current - * data element |
\c type_id | - *[in] | - *Datatype identifier of the elements stored in elem |
\c ndim | - *[in] | - *Number of dimensions for the point array |
\c point | - *[in] | - *Array containing the location of the element within - * the original dataspace |
\c operator_data | - *[in,out] | - *Pointer to any user-defined data associated with the - * operation |
\c src_buf | - *[out] | - *Pointer to the buffer holding the next set of elements to - * scatter. On entry, the value of where \c src_buf points to - * is undefined. The callback function should set \c src_buf - * to point to the next set of elements. |
\c src_buf_bytes_used | - *[out] | - *Pointer to the number of valid bytes in \c src_buf. On - * entry, the value where \c src_buf_bytes_used points to is - * undefined. The callback function should set - * \c src_buf_bytes_used to the of valid bytes in \c src_buf. - * This number must be a multiple of the datatype size. - * |
\c op_data | - *[in,out] | - *User-defined pointer to data required by the callback - * function. A pass-through of the \c op_data pointer provided - * with the H5Dscatter() function call. |
\c dst_buf | - *Pointer to the destination buffer which has been filled - * with the next set of elements gathered. This will always be - * identical to the \p dst_buf passed to H5Dgather(). |
\c dst_buf_bytes_used | - *Pointer to the number of valid bytes in \p dst_buf. - * This number must be a multiple of the datatype - * size. |
\c op_data | - *User-defined pointer to data required by the callback - * function; a pass-through of the \p op_data pointer - * provided with the H5Dgather() function call. |
Create | Read |
---|---|
+ * \snippet{lineno} H5E_examples.c create + * | + *+ * \snippet{lineno} H5E_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5E_examples.c update + * | + *+ * \snippet{lineno} H5E_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5F_examples.c create + * | + *+ * \snippet{lineno} H5F_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5F_examples.c update + * | + *+ * \snippet{lineno} H5F_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5G_examples.c create + * | + *+ * \snippet{lineno} H5G_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5G_examples.c update + * | + *+ * \snippet{lineno} H5G_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5L_examples.c create + * | + *+ * \snippet{lineno} H5L_examples.c iter_cb + * \snippet{lineno} H5L_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5L_examples.c update + * | + *+ * \snippet{lineno} H5L_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5O_examples.c create + * | + *+ * \snippet{lineno} H5O_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5O_examples.c update + * | + *+ * \snippet{lineno} H5O_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet H5PL_examples.c create + * | + *+ * \snippet H5PL_examples.c read + * | + *
Update | Delete |
+ * \snippet H5PL_examples.c update + * | + *+ * \snippet H5PL_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5P_examples.c create + * | + *+ * \snippet{lineno} H5P_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5P_examples.c update + * | + *+ * \snippet{lineno} H5P_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5P_examples.c create + * | + *+ * \snippet{lineno} H5P_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5P_examples.c update + * | + *+ * \snippet{lineno} H5P_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5P_examples.c create_class + * | + *+ * \snippet{lineno} H5P_examples.c read_class + * | + *
Update | Delete |
+ * \snippet{lineno} H5P_examples.c update_class + * | + *+ * \snippet{lineno} H5P_examples.c delete_class + * | + *
byte 0 | *|||||||
???????? | - *????SPPP | - *PPPPPPPP | - *PPPP???? | + *???????? | + *????SPPP | + *PPPPPPPP | + *PPPP???? | *
Create | Read |
---|---|
+ * \snippet{lineno} H5R_examples.c create + * | + *+ * \snippet{lineno} H5R_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5R_examples.c update + * | + *+ * \snippet{lineno} H5R_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5S_examples.c create + * | + *+ * \snippet{lineno} H5S_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5S_examples.c update + * | + *+ * \snippet{lineno} H5S_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5T_examples.c create + * | + *+ * \snippet{lineno} H5T_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5T_examples.c update + * | + *+ * \snippet{lineno} H5T_examples.c delete + * | + *
Create | Read |
---|---|
+ * \snippet{lineno} H5Z_examples.c filter + * \snippet{lineno} H5Z_examples.c create + * | + *+ * \snippet{lineno} H5Z_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5Z_examples.c update + * | + *+ * \snippet{lineno} H5Z_examples.c delete + * |
Create | Read |
---|---|
+ * \snippet{lineno} H5_examples.c create + * | + *+ * \snippet{lineno} H5_examples.c read + * | + *
Update | Delete |
+ * \snippet{lineno} H5_examples.c update + * | + *+ * \snippet{lineno} H5_examples.c closing_shop + * \snippet{lineno} H5_examples.c delete + * | + *