diff --git a/doc/html/Glossary.html b/doc/html/Glossary.html new file mode 100644 index 0000000000..31b2db6623 --- /dev/null +++ b/doc/html/Glossary.html @@ -0,0 +1,99 @@ +
Since many of the typedefs in the HDF5 API are not well-defined yet, +the types below may change radically en route to a final API... + +
+ + |
+
|
+
|
H5open
(void)
+H5open
initialize the library. This function is
+ normally called automatically, but if you find that an
+ HDF5 library function is failing inexplicably, try calling
+ this function first.
+H5close
(void)
+H5close
flushes all data to disk,
+ closes all file identifiers, and cleans up all memory used by
+ the library. This function is generall called when the
+ application calls exit
, but may be called earlier
+ in event of an emergency shutdown or out of desire to free all
+ resources used by the HDF5 library.
+H5dont_atexit
(void)
+atexit
cleanup routine.
+H5dont_atexit
indicates to the library that an
+ atexit()
cleanup routine should not be installed.
+ The major purpose for this is in situations where the
+ library is dynamically linked into an application and is
+ un-linked from the application before exit()
gets
+ called. In those situations, a routine installed with
+ atexit()
would jump to a routine which was
+ no longer in memory, causing errors.
+ + In order to be effective, this routine must be called + before any other HDF function calls, and must be called each + time the library is loaded/linked into the application + (the first time and after it's been un-loaded). +
H5version
(unsigned *majnum
,
+ unsigned *minnum
,
+ unsigned *relnum
,
+ unsigned *patnum
+ )
+H5version
retrieves the major, minor, release, and
+ patch versions of the library which is linked to the application.
+majnum
+ minnum
+ relnum
+ patnum
+ H5vers_check
(unsigned *majnum
,
+ unsigned *minnum
,
+ unsigned *relnum
,
+ unsigned *patnum
+ )
+H5vers_check
verifies that the arguments match the
+ version numbers compiled into the library. This function is intended
+ to be called from user to verify that the versions of header files
+ compiled into the application match the version of the HDF5 library.
+
+ Due to the risks of data corruption or segmentation faults,
+ H5vers_check
causes the application to abort if the
+ version numbers do not match.
+
majnum
+ minnum
+ relnum
+ patnum
+ + + |
+
|
+
|
+The Attribute interface, H5A, is primarily designed to easily allow +small datasets to be attached to primary datasets as metadata information. +Additional goals for the H5A interface include keeping storage requirement +for each attribute to a minimum and easily sharing attributes among +datasets. +
+Because attributes are intended to be small objects, large datasets +intended as additional information for a primary dataset should be +stored as supplemental datasets in a group with the primary dataset. +Attributes can then be attached to the group containing everything +to indicate a particular type of dataset with supplemental datasets +is located in the group. How small is "small" is not defined by the +library and is up to the user's interpretation. +
+See Attributes in the +HDF5 User's Guide for further information. + +
H5Acreate
(hid_t loc_id
,
+ const char *name
,
+ hid_t type_id
,
+ hid_t space_id
,
+ hid_t create_plist
+ )
+H5Acreate
creates an attribute which is attached
+ to the object specified with loc_id
.
+ loc_id
is an identifier of a group, dataset,
+ or named datatype. The name specified with name
+ for each attribute for an object must be unique for that object.
+ The datatype and dataspace identifiers of the attribute,
+ type_id
and space_id
, respectively,
+ are created with the H5T and H5S interfaces, respectively.
+ Currently only simple dataspaces are allowed for attribute
+ dataspaces. The create_plist_id
property list
+ is currently unused, but will be used int the future for optional
+ properties of attributes. The attribute identifier returned from
+ this function must be released with H5Aclose
or
+ resource leaks will develop. Attempting to create an attribute
+ with the same name as an already existing attribute will fail,
+ leaving the pre-existing attribute in place.
+loc_id
+ name
+ type_id
+ space_id
+ create_plist
+ H5Aopen_name
(hid_t loc_id
,
+ const char *name
+ )
+H5Aopen_name
opens an attribute specified by
+ its name, name
, which is attached to the
+ object specified with loc_id
.
+ The location object may be either a group, dataset, or
+ named datatype, which may have any sort of attribute.
+ The attribute identifier returned from this function must
+ be released with H5Aclose
or resource leaks
+ will develop.
+loc_id
+ name
+ H5Aopen_idx
(hid_t loc_id
,
+ unsigned int idx
+ )
+H5Aopen_idx
opens an attribute which is attached
+ to the object specified with loc_id
.
+ The location object may be either a group, dataset, or
+ named datatype, all of which may have any sort of attribute.
+ The attribute specified by the index, idx
,
+ indicates the attribute to access.
+ The value of idx
is a 0-based, non-negative integer.
+ The attribute identifier returned from this function must be
+ released with H5Aclose
or resource leaks will develop.
+loc_id
+ idx
+ H5Awrite
(hid_t attr_id
,
+ hid_t mem_type_id
,
+ void *buf
+ )
+H5Awrite
writes an attribute, specified with
+ attr_id
. The attribute's memory datatype
+ is specified with mem_type_id
. The entire
+ attribute is written from buf
to the file.
+attr_id
+ mem_type_id
+ buf
+ H5Aread
(hid_t attr_id
,
+ hid_t mem_type_id
,
+ void *buf
+ )
+H5Aread
reads an attribute, specified with
+ attr_id
. The attribute's memory datatype
+ is specified with mem_type_id
. The entire
+ attribute is read into buf
from the file.
+attr_id
+ mem_type_id
+ buf
+ H5Aget_space
(hid_t attr_id
)
+H5Aget_space
retrieves a copy of the dataspace
+ for an attribute. The dataspace identifier returned from
+ this function must be released with H5Sclose
+ or resource leaks will develop.
+attr_id
+ H5Aget_type
(hid_t attr_id
)
+H5Aget_type
retrieves a copy of the datatype
+ for an attribute.
+ + 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. +
+ The datatype identifier returned from this function must be
+ released with H5Tclose
or resource leaks will develop.
+
attr_id
+ H5Aget_name
(hid_t attr_id
,
+ char *buf
,
+ size_t buf_size
+ )
+H5Aget_name
retrieves the name of an attribute
+ specified by the identifier, attr_id
.
+ Up to buf_size
characters are stored in
+ buf
followed by a \0
string
+ terminator. If the name of the attribute is longer than
+ buf_size
-1, the string terminator is stored in the
+ last position of the buffer to properly terminate the string.
+attr_id
+ buf
+ buf_size
+ buf_size
, if successful.
+ Otherwise returns FAIL (-1).
+H5Anum_attrs
(hid_t loc_id
)
+H5Anum_attrs
returns the number of attributes
+ attached to the object specified by its identifier,
+ loc_id
.
+ The object can be a group, dataset, or named datatype.
+loc_id
+ H5Aiterate
(hid_t loc_id
,
+ unsigned * idx
,
+ H5A_operator_t op
,
+ void *op_data
+ )
+H5Aiterate
iterates over the attributes of
+ the object specified by its identifier, loc_id
.
+ The object can be a group, dataset, or named datatype.
+ For each attribute of the object, the op_data
+ and some additional information specified below are passed
+ to the operator function op
.
+ The iteration begins with the attribute specified by its
+ index, idx
; the index for the next attribute
+ to be processed by the operator, op
, is
+ returned in idx
.
+ If idx
is the null pointer, then all attributes
+ are processed.
+
+ The prototype for H5A_operator_t
is:
+ typedef herr_t (*H5A_operator_t)(hid_t loc_id,
+ const char *attr_name,
+ void *operator_data);
+
+
+ The operation receives the identifier for the group, dataset
+ or named datatype being iterated over, loc_id
, the
+ name of the current attribute about the object, attr_name
,
+ and the pointer to the operator data passed in to H5Aiterate
,
+ op_data
. The return values from an operator are:
+
loc_id
+ idx
+ op
+ op_data
+ H5Adelete
(hid_t loc_id
,
+ const char *name
+ )
+H5Adelete
removes the attribute specified by its
+ name, name
, from a dataset, group, or named datatype.
+ This function should not be used when attribute identifiers are
+ open on 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.
+loc_id
+ name
+ H5Aclose
(hid_t attr_id
)
+H5Aclose
terminates access to the attribute
+ specified by its identifier, attr_id
.
+ Further use of the attribute identifier will result in
+ undefined behavior.
+attr_id
+
+
|
+
| + + |
H5Dcreate
(hid_t loc_id
,
+ const char *name
,
+ hid_ttype_id
,
+ hid_tspace_id
,
+ hid_tcreate_plist_id
+ )
+H5Dcreate
creates a data set with a name,
+ name
, in the file or in the group specified by
+ the identifier loc_id
.
+ The dataset has the datatype and dataspace identified by
+ type_id
and space_id
, respectively.
+ The specified datatype and dataspace are the datatype and
+ dataspace of the dataset as it will exist in the file,
+ which may be different than in application memory.
+ Dataset creation properties are specified by the argument
+ create_plist_id
.
+
+ create_plist_id
is a H5P_DATASET_CREATE
+ property list created with H5Pcreate()
and
+ initialized with the various functions described above.
+ H5Dcreate()
returns a dataset identifier for success
+ or negative for failure. The identifier should eventually be
+ closed by calling H5Dclose()
to release resources
+ it uses.
+
loc_id
+ name
+ type_id
+ space_id
+ create_plist_id
+ H5Dopen
(hid_t loc_id
,
+ const char *name
+ )
+H5Dopen
opens an existing dataset for access in the file
+ or group specified in loc_id
. name
is
+ a dataset name and is used to identify the dataset in the file.
+loc_id
+ name
+ H5Dget_space
(hid_t dataset_id
+ )
+H5Dget_space
returns an identifier for a copy of the
+ dataspace for a dataset.
+ The dataspace identifier should be released with the
+ H5Sclose()
function.
+dataset_id
+ H5Dget_type
(hid_t dataset_id
+ )
+H5Dget_type
returns an identifier for a copy of the
+ datatype for a dataset.
+ The datatype should be released with the H5Tclose()
function.
+ + 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. +
dataset_id
+ H5Dget_create_plist
(hid_t dataset_id
+ )
+H5Dget_create_plist
returns an identifier for a
+ copy of the dataset creation property list for a dataset.
+ The creation property list identifier should be released with
+ the H5Pclose()
function.
+dataset_id
+ H5Dread
(hid_t dataset_id
,
+ hid_t mem_type_id
,
+ hid_t mem_space_id
,
+ hid_t file_space_id
,
+ hid_t xfer_plist_id
,
+ void * buf
+ )
+buf
,
+ converting from file datatype and dataspace to
+ memory datatype and dataspace.
+H5Dread
reads a (partial) dataset, specified by its
+ identifier dataset_id
, from the file into the
+ application memory buffer buf
.
+ Data transfer properties are defined by the argument
+ xfer_plist_id
.
+ The memory datatype of the (partial) dataset is identified by
+ the identifier mem_type_id
.
+ The part of the dataset to read is defined by
+ mem_space_id
and file_space_id
.
+
+ file_space_id
can be the constant H5S_ALL
,
+ which indicates that the entire file data space is to be referenced.
+
+ mem_space_id
can be the constant H5S_ALL
,
+ in which case the memory data space is the same as the file data space
+ defined when the dataset was created.
+
+ The number of elements in the memory data space must match + the number of elements in the file data space. +
+ xfer_plist_id
can be the constant H5P_DEFAULT
,
+ in which case the default data transfer properties are used.
+
+
dataset_id
+ mem_type_id
+ mem_space_id
+ file_space_id
+ xfer_plist_id
+ buf
+ H5Dwrite
(hid_t dataset_id
,
+ hid_t mem_type_id
,
+ hid_t mem_space_id
,
+ hid_t file_space_id
,
+ hid_t xfer_plist_id
,
+ const void * buf
+ )
+buf
to
+ the specified dataset, converting from
+ memory datatype and dataspace to file datatype and dataspace.
+H5Dwrite
writes a (partial) dataset, specified by its
+ identifier dataset_id
, from the
+ application memory buffer buf
into the file.
+ Data transfer properties are defined by the argument
+ xfer_plist_id
.
+ The memory datatype of the (partial) dataset is identified by
+ the identifier mem_type_id
.
+ The part of the dataset to write is defined by
+ mem_space_id
and file_space_id
.
+
+ file_space_id
can be the constant H5S_ALL
.
+ which indicates that the entire file data space is to be referenced.
+
+ mem_space_id
can be the constant H5S_ALL
,
+ in which case the memory data space is the same as the file data space
+ defined when the dataset was created.
+
+ The number of elements in the memory data space must match + the number of elements in the file data space. +
+ xfer_plist_id
can be the constant H5P_DEFAULT
.
+ in which case the default data transfer properties are used.
+
dataset_id
+ mem_type_id
+ mem_space_id
+ file_space_id
+ xfer_plist_id
+ buf
+ H5Dextend
(hid_t dataset_id
,
+ const hsize_t * size
+ )
+H5Dextend
verifies that the dataset is at least of size
+ size
.
+ The dimensionality of size
is the same as that of
+ the dataspace of the dataset being changed.
+ This function cannot be applied to a dataset with fixed dimensions.
+dataset_id
+ size
+ H5Dclose
(hid_t dataset_id
+ )
+H5Dclose
ends access to a dataset specified by
+ dataset_id
and releases resources used by it.
+ Further use of the dataset identifier is illegal in calls to
+ the dataset API.
+dataset_id
+
+
|
+
|
+
|
+The Error interface provides error handling in the form of a stack.
+The FUNC_ENTER()
macro clears the error stack whenever
+an interface function is entered.
+When an error is detected, an entry is pushed onto the stack.
+As the functions unwind, additional entries are pushed onto the stack.
+The API function will return some indication that an error occurred and
+the application can print the error stack.
+
+Certain API functions in the H5E package, such as H5Eprint()
,
+do not clear the error stack. Otherwise, any function which
+does not have an underscore immediately after the package name
+will clear the error stack. For instance, H5Fopen()
+clears the error stack while H5F_open()
does not.
+
+An error stack has a fixed maximum size. +If this size is exceeded then the stack will be truncated and only the +inner-most functions will have entries on the stack. +This is expected to be a rare condition. +
+Each thread has its own error stack, but since +multi-threading has not been added to the library yet, this +package maintains a single error stack. The error stack is +statically allocated to reduce the complexity of handling +errors within the H5E package. + + +
H5Eset_auto
(H5E_auto_t func
,
+ void *client_data
+ )
+H5Eset_auto
turns on or off automatic printing of
+ errors. When turned on (non-null func
pointer),
+ any API function which returns an error indication will
+ first call func
, passing it client_data
+ as an argument.
+
+ When the library is first initialized the auto printing function
+ is set to H5Eprint()
(cast appropriately) and
+ client_data
is the standard error stream pointer,
+ stderr
.
+
+ Automatic stack traversal is always in the
+ H5E_WALK_DOWNWARD
direction.
+
func
+ client_data
+ H5Eget_auto
(H5E_auto_t * func
,
+ void **client_data
+ )
+H5Eget_auto
returns the current settings for the
+ automatic error stack traversal function, func
,
+ and its data, client_data
. Either (or both)
+ arguments may be null in which case the value is not returned.
+func
+ client_data
+ H5Eclear
(void
)
+H5Eclear
clears the error stack for the current thread.
+
+ The stack is also cleared whenever an API function is called,
+ with certain exceptions (for instance, H5Eprint()
).
+
+ H5Eclear
can fail if there are problems initializing
+ the library.
+
H5Eprint
(FILE * stream
)
+H5Eprint
prints the error stack on the specified
+ stream, stream
.
+ Even if the error stack is empty, a one-line message will be printed:
+ HDF5-DIAG: Error detected in thread 0.
+
+ H5Eprint
is a convenience function for
+ H5Ewalk()
with a function that prints error messages.
+ Users are encouraged to write there own more specific error handlers.
+
stream
+ H5Ewalk
(H5E_direction_t direction
,
+ H5E_walk_t func
,
+ void * client_data
+ )
+H5Ewalk
walks the error stack for the current thread
+ and calls the specified function for each error along the way.
+
+ direction
determines whether the stack is walked
+ from the inside out or the outside in.
+ A value of H5E_WALK_UPWARD
means begin with the
+ most specific error and end at the API;
+ a value of H5E_WALK_DOWNWARD
means to start at the
+ API and end at the inner-most function where the error was first
+ detected.
+
+ func
will be called for each error in the error stack.
+ Its arguments will include an index number (beginning at zero
+ regardless of stack traversal direction), an error stack entry,
+ and the client_data
pointer passed to
+ H5E_print
.
+
+ H5Ewalk
can fail if there are problems initializing
+ the library.
+
direction
+ func
+ client_data
+ func
.
+ H5Ewalk_cb
(int n
,
+ H5E_error_t *err_desc
,
+ void *client_data
+ )
+H5Ewalk_cb
is a default error stack traversal callback
+ function that prints error messages to the specified output stream.
+ It is not meant to be called directly but rather as an
+ argument to the H5Ewalk()
function.
+ This function is called also by H5Eprint()
.
+ Application writers are encouraged to use this function as a
+ model for their own error stack walking functions.
+
+ n
is a counter for how many times this function
+ has been called for this particular traversal of the stack.
+ It always begins at zero for the first error on the stack
+ (either the top or bottom error, or even both, depending on
+ the traversal direction and the size of the stack).
+
+ err_desc
is an error description. It contains all the
+ information about a particular error.
+
+ client_data
is the same pointer that was passed as the
+ client_data
argument of H5Ewalk()
.
+ It is expected to be a file pointer (or stderr if null).
+
n
+ err_desc
+ *client_data
+ H5Eget_major
(H5E_major_t n
)
+H5Eget_major
returns a
+ constant character string that describes the error.
+n
+ H5Eget_minor
(H5E_minor_t n
)
+H5Eget_minor
returns a
+ constant character string that describes the error.
+n
+ + + |
+
| + + |
H5Fopen
(const char *name
,
+ unsigned flags
,
+ hid_t access_id
+ )
+H5Fopen
opens an existing file and is the primary
+ function for accessing existing HDF5 files.
+
+ The parameter access_id
is a file access property
+ list identifier or H5P_DEFAULT
for the default I/O access
+ parameters.
+
+ The flags
argument determines whether writing
+ to an existing file will be allowed or not.
+ The file is opened with read and write permission if
+ flags
is set to H5F_ACC_RDWR
.
+ All flags may be combined with the bit-wise OR operator (`|')
+ to change the behavior of the file open call.
+ The more complex behaviors of a file's access are controlled
+ through the file-access property list.
+
+ Files which are opened more than once return a unique identifier
+ for each H5Fopen()
call and can be accessed
+ through all file identifiers.
+
+ The return value is a file identifier for the open file and it
+ should be closed by calling H5Fclose()
when it is
+ no longer needed.
+
name
+ flags
+ H5Fcreate
+ parameters list for a list of possible values.
+ access_id
+ H5Fcreate
(const char *name
,
+ unsigned flags
,
+ hid_t create_id
,
+ hid_t access_id
+ )
+H5Fcreate
is the primary function for creating
+ HDF5 files .
+
+ The flags
parameter determines whether an
+ existing file will be overwritten. All newly created files
+ are opened for both reading and writing. All flags may be
+ combined with the bit-wise OR operator (`|') to change
+ the behavior of the H5Fcreate
call.
+
+ The more complex behaviors of file creation and access
+ are controlled through the file-creation and file-access
+ property lists. The value of H5P_DEFAULT
for
+ a template value indicates that the library should use
+ the default values for the appropriate template. Also see
+ H5Fpublic.h
for the list of supported flags.
+
name
+ flags
+ create_id
+ access_id
+ access_template
.
+ Use 0
for default access template.
+ H5Fis_hdf5
(const char *name
+ )
+H5Fis_hdf5
determines whether a file is in
+ the HDF5 format.
+name
+ TRUE
or FALSE
if successful.
+ Otherwise returns FAIL (-1).
+H5Fget_create_template
(hid_t file_id
+ )
+H5Fget_create_template
returns a file creation
+ property list identifier identifying the creation properties
+ used to create this file. This function is useful for
+ duplicating properties when creating another file.
+ + See "File Creation Properties" in + H5P: Property List Interface + in this reference manual and + "File Creation Properties" + in Files in the + HDF5 User's Guide for + additional information and related functions. +
file_id
+ H5Fget_access_template
(hid_t file_id
)
+H5Fget_access_template
returns the
+ file access property list identifier of the specified file.
+ + See "File Access Properties" in + H5P: Property List Interface + in this reference manual and + "File Access Property Lists" + in Files in the + HDF5 User's Guide for + additional information and related functions. +
file_id
+ H5Fclose
(hid_t file_id
+ )
+H5Fclose
terminates access to an HDF5 file.
+ If this is the last file identifier open for a file
+ and if access identifiers are still in use,
+ this function will fail.
+file_id
+ + + | + + |
+
| ||
+(NYI = Not yet implemented) + |
+A group associates names with objects and provides a mechanism +for mapping a name to an object. Since all objects appear in at +least one group (with the possible exception of the root object) +and since objects can have names in more than one group, the set +of all objects in an HDF5 file is a directed graph. The internal +nodes (nodes with out-degree greater than zero) must be groups +while the leaf nodes (nodes with out-degree zero) are either empty +groups or objects of some other type. Exactly one object in every +non-empty file is the root object. The root object always has a +positive in-degree because it is pointed to by the file boot block. + +
+Every file identifier returned by H5Fcreate
or
+H5Fopen
maintains an independent current working group
+stack, the top item of which is the current working group. The
+stack can be manipulated with H5Gset
, H5Gpush
,
+and H5Gpop
. The root object is the current working group
+if the stack is empty.
+
+
+An object name consists of one or more components separated from +one another by slashes. An absolute name begins with a slash and the +object is located by looking for the first component in the root +object, then looking for the second component in the first object, etc., +until the entire name is traversed. A relative name does not begin +with a slash and the traversal begins with the current working group. + +
+The library does not maintain the full absolute name of its current
+working group because (1) cycles in the graph can make the name length
+unbounded and (2) a group does not necessarily have a unique name. A
+more Unix-like hierarchical naming scheme can be implemented on top of
+the directed graph scheme by creating a ".." entry in each group that
+points to its single predecessor; a getcwd
function would
+then be trivial.
+
+
H5Gcreate
(hid_t loc_id
,
+ const char *name
,
+ size_t size_hint
+ )
+ H5Gcreate
creates a new group with the specified
+ name at the specified location, loc_id
.
+ The location is identified by a file or group identifier.
+ The name, name
, must not already be taken by some
+ other object and all parent groups must already exist.
+
+ size_hint
is a hint for the number of bytes to
+ reserve to store the names which will be eventually added to
+ the new group. Passing a value of zero for size_hint
+ is usually adequate since the library is able to dynamically
+ resize the name heap, but a correct hint may result in better
+ performance.
+ If a non-positive value is supplied for size_hint,
+ then a default size is chosen.
+
+ The return value is a group identifier for the open group.
+ This group identifier should be closed by calling
+ H5Gclose()
when it is no longer needed.
+
loc_id
+ name
+ size_hint
+ H5Gopen
(hid_t loc_id
,
+ const char *name
+ )
+ H5Gopen
opens an existing group with the specified name at
+ the specified location, loc_id
.
+ The location is identified by a file or
+ group identifier, and returns a group identifier for the group.
+ The obtained group identifier should be released by calling
+ H5Gclose()
when it is no longer needed.
+ loc_id
+ name
+ H5Gset
(hid_t loc_id
,
+ const char *name
+ )
+ H5Gset
sets the group with the specified name
+ to be the current working group for the file which contains it.
+ This function sets the current working group by modifying the
+ top element of the current working group stack or, if the
+ stack is empty, by pushing a new element onto the stack.
+ The initial current working group is the root group.
+
+ loc_id
can be a file identifier or a group identifier.
+
+ name
is an absolute or relative name and is resolved as follows. Each file identifier
+ has a current working group, initially the root group of the
+ file. Relative names do not begin with a slash and are relative
+ to the specified group or to the current working group.
+ Absolute names begin with a slash and are relative to the file's
+ root group. For instance, the name /Foo/Bar/Baz
is
+ resolved by first looking up Foo
in the root group;
+ the name Foo/Bar/Baz
is resolved by first looking
+ up the name Foo
in the current working group.
+
+ Each file identifier maintains its own notion of the current
+ working group. If loc_id
is a group identifier, the
+ file identifier is derived from the group identifier.
+
+ If a single file is opened with multiple calls to H5Fopen()
,
+ which would return multiple file identifiers, then each
+ identifier's current working group can be set independently
+ of the other file identifiers for that file.
+
loc_id
+ name
+ H5Gpush
(hid_t loc_id
,
+ const char *name
+ )
+ H5Gpush
pushes a new group
+ onto the stack, thus setting a new current working group.
+ loc_id
+ name
+ H5Gpop
(hid_t loc_id
)
+ H5Gpop
restores the previous current working group by
+ popping an element from the current working group stack.
+ An empty stack implies that the current working group is the root
+ object. Attempting to pop an empty stack results in failure.
+
+ Each file identfier maintains its own notion of the current
+ working group. That is, if a single file is opened with
+ multiple calls to H5Fopen()
, which returns multiple file
+ handles, then each identfier's current working group can be
+ set independently of the other file identfiers for that file.
+
+ If loc_id
is a group identifier, it is used only to determine the
+ file identifier for the stack from which to pop the top entry.
+
loc_id
+ H5Gclose
(hid_t group_id
)
+ H5Gclose
releases resources used by a group which was
+ opened by H5Gcreate()
or H5Gopen()
.
+ After closing a group, the group_id
cannot be used again.
+ + Failure to release a group with this call will result in resource leaks. +
group_id
+ H5Glink
(hid_t loc_id
,
+ H5G_link_t link_type
,
+ const char *current_name
,
+ const char *new_name
+ )
+ new_name
+ to current_name
.
+ H5Glink
creates a new name for an object that has some current
+ name, possibly one of many names it currently has.
+
+ If link_type
is H5G_LINK_HARD
, then
+ current_name
must name an existing object and both
+ names are interpreted relative to loc_id
, which is
+ either a file identifier or a group identifier.
+
+ If link_type
is H5G_LINK_SOFT
, then
+ current_name
can be anything and is interpreted at
+ lookup time relative to the group which contains the final
+ component of new_name
. For instance, if
+ current_name
is ./foo
,
+ new_name
is ./x/y/bar
, and a request
+ is made for ./x/y/bar
, then the actual object looked
+ up is ./x/y/./foo
.
+
loc_id
+ link_type
+ H5G_LINK_HARD
and H5G_LINK_SOFT
.
+ current_name
+ new_name
+ H5Gunlink
(hid_t loc_id
,
+ const char *name
+ )
+ name
from the group graph and
+ decrements the link count for the object to which name
points
+ H5Gunlink
removes an association between a name and an object.
+ Object headers keep track of how many hard links refer to the object;
+ when the hard link count reaches zero, the object can be removed
+ from the file. Objects which are open are not removed until all
+ identifiers to the object are closed.
+ + If the link count reaches zero, all file-space associated with + the object will be reclaimed. If the object is open, the + reclamation of the file space is delayed until all handles to the + object are closed. +
loc_id
+ name
+ H5Giterate
(hid_t loc_id
,
+ const char *name
,
+ int *idx
,
+ H5G_operator_t operator
,
+ void *operator_data
+ )
+ H5Giterate
iterates over the members of
+ name
in the file or group specified with
+ loc_id
.
+ For each object in the group, the operator_data
+ and some additional information, specified below, are
+ passed to the operator
function.
+ The iteration begins with the idx
object in the
+ group and the next element to be processed by the operator is
+ returned in idx
. If idx
+ is NULL, then the iterator starts at the first group member;
+ since no stopping point is returned in this case, the iterator
+ cannot be restarted if one of the calls to its operator returns
+ non-zero.
+
+ The prototype for H5G_operator_t
is:
+
typedef
herr_t *(H5G_operator_t
)(hid_t group_id
,
+ const char *member_name
, void *operator_data/*in,out*/
);
+ group_id
, the name of the current
+ object within the group, member_name
, and the
+ pointer to the operator data passed in to H5Giterate
,
+ operator_data
.
+ + The return values from an operator are: +
loc_id
+ *name
+ *idx
+ operator
+ *operator_data
+ H5Gmove
(hid_t loc_id
,
+ const char *src
,
+ const char *dst
+ )
+ H5Gmove
renames an object within an HDF5 file.
+ The original name, src
, is unlinked from the
+ group graph and the new name, dst
, is inserted
+ as an atomic operation. Both names are interpreted relative
+ to loc_id
, which is either a file or a group
+ identifier.
+ loc_id
+ *src
+ *dst
+ H5Gstat
(hid_t loc_id
,
+ const char *name
,
+ hbool_t follow_link
,
+ H5G_stat_t *statbuf
+ )
+ H5Gstat
returns information about the
+ specified object through the statbuf
argument.
+ loc_id
(a file, group, or dataset identifier) and
+ name
together determine the object.
+ If the object is a symbolic link and follow_link
is
+ zero (0
), then the information returned is that for the link itself;
+ otherwise the link is followed and information is returned about
+ the object to which the link points.
+ If follow_link
is non-zero but the final symbolic link
+ is dangling (does not point to anything), then an error is returned.
+ The statbuf
fields are undefined for an error.
+ The existence of an object can be tested by calling this function
+ with a null statbuf
.
+
+ H5Gstat()
fills in the following data structure:
+
+ typedef struct H5G_stat_t { + unsigned long fileno[2]; + unsigned long objno[2]; + unsigned nlink; + H5G_type_t type; + size_t linklen; + } H5G_stat_t ++ The
fileno
and objno
fields contain
+ four values which uniquely itentify an object among those
+ HDF5 files which are open: if all four values are the same
+ between two objects, then the two objects are the same
+ (provided both files are still open).
+ The nlink
field is the number of hard links to
+ the object or zero when information is being returned about a
+ symbolic link (symbolic links do not have hard links but
+ all other objects always have at least one).
+ The type
field contains the type of the object,
+ one of H5G_GROUP
, H5G_DATASET
,
+ or H5G_LINK
.
+ If information is being returned about a symbolic link then
+ linklen
will be the length of the link value
+ (the name of the pointed-to object with the null terminator);
+ otherwise linklen
will be zero.
+ Other fields may be added to this structure in the future.
+ loc_id
+ *name
+ follow_link
+ *statbuf
+ H5Gget_linkval
(hid_t loc_id
,
+ const char *name
,
+ size_t size
,
+ char *value
+ )
+ H5Gget_linkval
returns size
+ characters of the link value through the value
+ argument if loc_id
(a file or group identifier)
+ and name
specify a symbolic link.
+ If size
is smaller than the link value, then
+ value
will not be null terminated.
+
+ This function fails if the specified object is not a symbolic link.
+ The presence of a symbolic link can be tested by passing zero for
+ size
and NULL for value
.
+
+ Use H5Gstat()
to get the size of a link value.
+
loc_id
+ name
+ size
+ value
+ to be returned.
+ value
+ value
,
+ if successful.
+ Otherwise returns FAIL (-1).
+
+
+ General Property List Operations
+
File Creation Properties + + + |
+
+ File Access Properties
+
|
+
+ Dataset Creation Properties
+
Dataset Memory and Transfer Properties +
| ||
+ +|| Available only in the parallel HDF5 library. + |
H5Pcreate
(H5P_class_t type
+ )
+ H5Pcreate
creates a new property as an instance of some
+ property list class. The new property list is initialized
+ with default values for the specified class. The classes are:
+ H5P_FILE_CREATE
+ H5P_FILE_ACCESS
+ H5P_DATASET_CREATE
+ H5P_DATASET_XFER
+ type
+ plist
) if successful;
+ otherwise Fail (-1).
+H5Pclose
(hid_t plist
+ )
+ H5Pclose
terminates access to a property list.
+ All property lists should be closed when the application is
+ finished accessing them.
+ This frees resources used by the property list.
+ plist
+ H5Pget_class
(hid_t plist
+ )
+ H5Pget_class
returns the property list class for the
+ property list identied by the plist
parameter.
+ Valid property list classes are defined in the description of
+ H5Pcreate()
.
+ plist
+ H5Pcopy
(hid_t plist
+ )
+ H5Pcopy
copies an existing property list to create
+ a new property list.
+ The new property list has the same properties and values
+ as the original property list.
+ plist
+ H5Pget_version
(hid_t plist
,
+ int * boot
,
+ int * freelist
,
+ int * stab
,
+ int * shhdr
+ )
+ H5Pget_version
retrieves the version information of various objects
+ for a file creation property list. Any pointer parameters which are
+ passed as NULL are not queried.
+ plist
+ boot
+ freelist
+ stab
+ shhdr
+ H5Pset_userblock
(hid_t plist
,
+ hsize_t size
+ )
+ H5Pset_userblock
sets the user block size of a
+ file creation property list.
+ The default user block size is 0; it may be set to any
+ power of 2 equal to 512 or greater (512, 1024, 2048, etc.).
+ plist
+ size
+ H5Pget_userblock
(hid_t plist
,
+ hsize_t * size
+ )
+ H5Pget_userblock
retrieves the size of a user block
+ in a file creation property list.
+ plist
+ size
+ H5Pset_sizes
(hid_t plist
,
+ size_t sizeof_addr
,
+ size_t sizeof_size
+ )
+ H5Pset_sizes
sets the byte size of the offsets and lengths used to
+ address objects in an HDF5 file. This function is only valid for
+ file creation property lists. Passing in a value of 0 for one of the
+ sizeof parameters retains the current value. The default value
+ for both values is 4 bytes. Valid values currenly are 2, 4, 8 and
+ 16.
+ plist
+ sizeof_addr
+ sizeof_size
+ H5Pget_sizes
(hid_t plist
,
+ size_t * sizeof_addr
,
+ size_t * sizeof_size
+ )
+ H5Pget_sizes
retrieves the size of the offsets
+ and lengths used in an HDF5 file.
+ This function is only valid for file creation property lists.
+ plist
+ size
+ size
+ H5Pset_mpi
(hid_t plist
,
+ MPI_Comm comm
,
+ MPI_Info info
+ )
+ H5Pset_mpi
stores the access mode for MPIO call and the user supplied
+ communicator and info in the access property list, which can then
+ be used to open file. This function is available only in the
+ parallel HDF5 library and is not a collective function.
+ plist
+ comm
+ comm
. Any modification to comm
after
+ this function call returns may have undetermined effect
+ to the access property list. Users should call this function
+ again to setup the property list.
+ info
+ info
. Any modification to info
after
+ this function call returns may have undetermined effect
+ to the access property list. Users should call this function
+ again to setup the property list.
+ H5Pget_mpi
(hid_t plist
,
+ MPI_Comm *comm
,
+ MPI_Info *info
+ )
+ H5Pget_mpi
retrieves the communicator and info object
+ that have been set by H5Pset_mpi.
+ This function is available only in the parallel HDF5 library
+ and is not a collective function.
+ plist
+ comm
+ info
+ H5Pset_xfer
(hid_t plist
,
+ H5D_transfer_t data_xfer_mode
+ )
+ H5Pset_xfer
sets the transfer mode of the dataset transfer property list.
+ The list can then be used to control the I/O transfer mode
+ during dataset accesses. This function is available only
+ in the parallel HDF5 library and is not a collective function.
+ + Valid data transfer modes are: +
plist
+ data_xfer_mode
+ H5Pget_xfer
(hid_t plist
,
+ H5D_transfer_t * data_xfer_mode
+ )
+ H5Pget_xfer
retrieves the transfer mode from the dataset
+ transfer property list.
+ This function is available only in the parallel HDF5 library
+ and is not a collective function.
+ plist
+ data_xfer_mode
+ H5Pset_sym_k
(hid_t plist
,
+ int ik
,
+ int lk
+ )
+ H5Pset_sym_k
sets the size of parameters used to control the
+ symbol table nodes. This function is only valid for
+ file creation property lists. Passing in a value of 0 for one of the
+ parameters retains the current value.
+
+ ik
is one half the rank of a tree that stores a symbol
+ table for a group. Internal nodes of the symbol table are on
+ average 75% full. That is, the average rank of the tree is
+ 1.5 times the value of ik
.
+
+ lk
is one half of the number of symbols that can be stored in
+ a symbol table node. A symbol table node is the leaf of a
+ symbol table tree which is used to store a group. When
+ symbols are inserted randomly into a group, the group's
+ symbol table nodes are 75% full on average. That is, they
+ contain 1.5 times the number of symbols specified by lk
.
+
plist
+ ik
+ lk
+ H5Pget_sym_k
(hid_t plist
,
+ int * ik
,
+ int * lk
+ )
+ H5Pget_sym_k
retrieves the size of the
+ symbol table B-tree 1/2 rank and the symbol table leaf node 1/2 size.
+ This function is only valid for file creationproperty lists.
+ If a parameter valued is set to NULL, that parameter is not retrieved.
+ See the description for H5Pset_sym_k
+ for more information.
+ plist
+ ik
+ size
+ H5Pset_istore_k
(hid_t plist
,
+ int ik
+ )
+ H5Pset_istore_k
sets the size of the parameter used to control the
+ B-trees for indexing chunked datasets. This function is only valid for
+ file creation property lists. Passing in a value of 0 for one of the
+ parameters retains the current value.
+
+ ik
is one half the rank of a tree that stores chunked raw
+ data. On average, such a tree will be 75% full, or have an
+ average rank of 1.5 times the value of ik
.
+
plist
+ ik
+ H5Pget_istore_k
(hid_t plist
,
+ int * ik
+ )
+ H5Pget_istore_k
queries the 1/2 rank of
+ an indexed storage B-tree.
+ The argument ik
may be the null pointer (NULL).
+ This function is only valid for file creation property lists.
+ + See H5Pset_istore_k for details. +
plist
+ ik
+ H5Pset_layout
(hid_t plist
,
+ H5D_layout_t layout
+ )
+ H5Pset_layout
sets the type of storage used store the
+ raw data for a dataset.
+ This function is only valid for dataset creation property lists.
+ Valid parameters for layout
are:
+ plist
+ layout
+ H5Pget_layout
(hid_t plist
)
+ H5Pget_layout
returns the layout of the raw data for a dataset.
+ This function is only valid for dataset creation property lists.
+ Valid types for layout
are:
+ plist
+ H5Pset_chunk
(hid_t plist
,
+ int ndims
,
+ const hsize_t * dim
+ )
+ H5Pset_chunk
sets the size of the chunks used to store a chunked
+ layout dataset. This function is only valid for dataset creation
+ property lists. The ndims
parameter currently must be the
+ same size as the rank of the dataset. The values of the
+ dim
array define the size of the chunks to store the
+ dataset's raw data. As a side-effect, the layout of the dataset is
+ changed to H5D_CHUNKED, if it isn't already.
+ plist
+ ndims
+ dim
+ H5Pget_chunk
(hid_t plist
,
+ int max_ndims
,
+ hsize_t * dims
+ )
+ H5Pget_chunk
retrieves the size of chunks for the
+ raw data of a chunked layout dataset.
+ This function is only valid for dataset creation property lists.
+ At most, max_ndims
elements of dims
+ will be initialized.
+ plist
+ max_ndims
+ dims
array.
+ dims
+ H5Pset_alignment
(hid_t plist
,
+ hsize_t threshold
,
+ hsize_t alignment
+ )
+ H5Pset_alignment
sets the alignment properties
+ of a file access property list
+ so that any file object >= THRESHOLD bytes will be aligned on
+ an address which is a multiple of ALIGNMENT. The addresses
+ are relative to the end of the user block; the alignment is
+ calculated by subtracting the user block size from the
+ absolute file address and then adjusting the address to be a
+ multiple of ALIGNMENT.
+ + Default values for THRESHOLD and ALIGNMENT are one, implying + no alignment. Generally the default values will result in + the best performance for single-process access to the file. + For MPI-IO and other parallel systems, choose an alignment + which is a multiple of the disk block size. +
plist
+ threshold
+ alignment
+ H5Pget_alignment
(hid_t plist
,
+ hsize_t *threshold
,
+ hsize_t *alignment
+ )
+ H5Pget_alignment
retrieves the current settings for
+ alignment properties from a file access property list.
+ The threshold
and/or alignment
pointers
+ may be null pointers (NULL).
+ plist
+ *threshold
+ *alignment
+ H5Pset_external
(hid_t plist
,
+ const char *name
,
+ off_t offset
,
+ hsize_t size
+ )
+ H5Pset_external
adds an external file to the
+ list of external files.
+ + If a dataset is split across multiple files then the files + should be defined in order. The total size of the dataset is + the sum of the SIZE arguments for all the external files. If + the total size is larger than the size of a dataset then the + dataset can be extended (provided the data space also allows + the extending). +
plist
+ *name
+ offset
+ size
+ H5Pget_external_count
(hid_t plist
,
+ )
+ H5Pget_external_count
returns the number of external files
+ for the specified dataset.
+ plist
+ H5Pget_external
(hid_t plist
,
+ int idx
,
+ size_t name_size
,
+ char *name
,
+ off_t *offset
,
+ hsize_t *size
+ )
+ H5Pget_external
returns information about an external file.
+ The external file is specified by its index, idx
,
+ which is a number from zero to N-1, where N is the value
+ returned by H5Pget_external_count()
.
+ At most name_size
characters are copied into the
+ name
array. If the external file name is
+ longer than name_size
with the null terminator, the
+ return value is not null terminated (similar to strncpy()
).
+
+ If name_size
is zero or name
is the
+ null pointer, the external file name is not returned.
+ If offset
or size
are null pointers
+ then the corresponding information is not returned.
+
plist
+ idx
+ name_size
+ name
array.
+ *name
+ *offset
+ *size
+ H5Pget_driver
(hid_t plist
,
+ )
+ H5Pget_driver
returns the identifier of the
+ low-level file driver. Valid identifiers are:
+ plist
+ H5Pset_stdio
(hid_t plist
)
+ H5Pset_stdio
sets the low level file driver to use
+ the functions declared
+ in the stdio.h file: fopen(), fseek() or fseek64(), fread(),
+ fwrite(), and fclose().
+ plist
+ H5Pget_stdio
(hid_t plist
)
+ H5Pget_stdio
checks to determine whether the
+ file access property list is set to the stdio driver.
+ In the future, additional arguments may be added to this
+ function to match those added to H5Pset_stdio().
+ plist
+ H5Pset_sec2
(hid_t plist
,
+ )
+ H5Pset_sec2
sets the low-level file driver to use
+ the functions declared
+ in the unistd.h file: open(), lseek() or lseek64(), read(),
+ write(), and close().
+ plist
+ H5Pget_sec2
(hid_t plist
)
+ H5Pget_sec2
checks to determine whether the
+ file access property list is set to the sec2 driver.
+ In the future, additional arguments may be
+ added to this function to match those added to H5Pset_sec2().
+ plist
+ H5Pset_core
(hid_t plist
,
+ size_t increment
+ )
+ H5Pset_core
sets the low-level file driver to use malloc() and free().
+ This driver is restricted to temporary files which are not
+ larger than the amount of virtual memory available. The
+ INCREMENT argument determines the file block size and memory
+ will be allocated in multiples of INCREMENT bytes. A liberal
+ INCREMENT results in fewer calls to realloc() and probably
+ less memory fragmentation.
+ plist
+ increment
+ H5Pget_core
(hid_t plist
,
+ size_t *increment
+ )
+ H5Pget_core
checks to determine whether the
+ file access property list is set to the core driver.
+ On success, the block size is returned
+ through the INCREMENT argument if it isn't the null pointer.
+ In the future, additional arguments may be added to this
+ function to match those added to H5Pset_core().
+ plist
+ *increment
+ H5Pset_split
(hid_t plist
,
+ const char *meta_ext
,
+ hid_t meta_plist
,
+ const char *raw_ext
,
+ hid_t raw_plist
+ )
+ H5Pset_split
sets the low-level driver to
+ split meta data from raw data, storing meta data in one file and
+ raw data in another file. The meta file will have a name
+ which is formed by adding meta_extension (recommended
+ default value: .meta
) to the end of the base name
+ and will be accessed according to the meta_properties.
+ The raw file will have a name which is formed by appending
+ raw_extension (recommended default value:
+ .raw
) to the base name and will be accessed according
+ to the raw_properties.
+ Additional parameters may be added to this function in the future.
+ plist
+ *meta_ext
+ .meta
.
+ meta_plist
+ *raw_ext
+ .raw
.
+ raw_plist
+ H5Pget_split
(hid_t plist
,
+ size_t meta_ext_size
,
+ char *meta_ext
,
+ hid_t *meta_properties
,
+ size_t raw_ext_size
,
+ char *raw_ext
,
+ hid_t *raw_properties
+ )
+ H5Pget_split
checks to determine whether the file
+ access property list is set to the split driver.
+ On successful return,
+ meta_properties and raw_properties will
+ point to copies of the meta and raw access property lists
+ which should be closed by calling H5Pclose()
when
+ the application is finished with them, but if the meta and/or
+ raw file has no property list then a negative value is
+ returned for that property list identifier. Also, if
+ meta_extension and/or raw_extension are
+ non-null pointers, at most meta_ext_size or
+ raw_ext_size characters of the meta or raw file name
+ extension will be copied to the specified buffer. If the
+ actual name is longer than what was requested then the result
+ will not be null terminated (similar to
+ strncpy()
). In the future, additional arguments
+ may be added to this function to match those added to
+ H5Pset_split()
.
+ plist
+ meta_ext_size
+ meta_ext
buffer.
+ *meta_ext
+ *meta_properties
+ raw_ext_size
+ raw_ext
buffer.
+ *raw_ext
+ *raw_properties
+ H5Pset_family
(hid_t plist
,
+ hsize_t memb_size
,
+ hid_t memb_plist
+ )
+ H5Pset_family
sets the file access properties
+ to use the family
+ driver; any previously defined driver properties are erased
+ from the property list. Each member of the file family will
+ use member_properties as its file access property
+ list. The memb_size argument gives the logical size
+ in bytes of each family member but the actual size could be
+ smaller depending on whether the file contains holes. The
+ member size is only used when creating a new file or
+ truncating an existing file; otherwise the member size comes
+ from the size of the first member of the family being
+ opened. Note: if the size of the off_t
type is
+ four bytes then the maximum family member size is usually
+ 2^31-1 because the byte at offset 2,147,483,647 is generally
+ inaccessable. Additional parameters may be added to this
+ function in the future.
+ plist
+ memb_size
+ memb_plist
+ H5Pget_family
(hid_t tid
,
+ hsize_t *memb_size
,
+ hid_t *memb_plist
+ )
+ H5Pget_family
checks to determine whether the
+ file access property list is set to the family driver.
+ On successful return,
+ access_properties will point to a copy of the member
+ access property list which should be closed by calling
+ H5Pclose()
when the application is finished with
+ it. If memb_size is non-null then it will contain
+ the logical size in bytes of each family member. In the
+ future, additional arguments may be added to this function to
+ match those added to H5Pset_family()
.
+ plist
+ *memb_size
+ *memb_plist
+ H5Pset_cache
(hid_t plist
,
+ int mdc_nelmts
,
+ size_t rdcc_nbytes
,
+ double rdcc_w0
+ )
+ H5Pset_cache
sets the number of elements (objects) in the meta data cache and the
+ total number of bytes in the raw data chunk cache.
+
+ Sets or queries the meta data cache and raw data chunk cache
+ parameters. The plist is a file access property
+ list. The number of elements (objects) in the meta data cache
+ is mdc_nelmts. The total size of the raw data chunk
+ cache and the preemption policy is rdcc_nbytes and
+ w0. For H5Pget_cache()
any (or all) of
+ the pointer arguments may be null pointers.
+
+ The RDCC_W0 value should be between 0 and 1 inclusive and + indicates how much chunks that have been fully read are + favored for preemption. A value of zero means fully read + chunks are treated no differently than other chunks (the + preemption is strictly LRU) while a value of one means fully + read chunks are always preempted before other chunks. +
plist
+ mdc_nelmts
+ rdcc_nbytes
+ rdcc_w0
+ H5Pget_cache
(hid_t plist
,
+ int *mdc_nelmts
,
+ size_t *rdcc_nbytes
,
+ double *rdcc_w0
+ )
+ plist
+ *mdc_nelmts
+ *rdcc_nbytes
+ *rdcc_w0
+ H5Pset_buffer
(hid_t plist
,
+ size_t size
,
+ void *tconv
,
+ void *bkg
+ )
+ H5Pset_buffer
+ sets the maximum size
+ for the type conversion buffer and background buffer and
+ optionally supply pointers to application-allocated buffers.
+ If the buffer size is smaller than the entire amount of data
+ being transfered between application and file, and a type
+ conversion buffer or background buffer is required then
+ strip mining will be used. However, certain restrictions
+ apply for the size of buffer which can be used for strip
+ mining. For instance, when strip mining a 100x200x300
+ hyperslab of a simple data space the buffer must be large
+ enough to hold a 1x200x300 slab.
+ + If TCONV and/or BKG are null pointers then buffers will be + allocated and freed during the data transfer. +
+ The default value for the maximum buffer is 1 Mb. +
plist
+ size
+ tconv
+ bkg
+ H5Pget_buffer
(hid_t plist
,
+ void **tconv
,
+ void **bkg
+ )
+ H5Pget_buffer
reads values previously set
+ with H5Pset_buffer().
+ plist
+ **tconv
+ **bkg
+ H5Pset_preserve
(hid_t plist
,
+ hbool_t status
+ )
+ H5Pset_preserve
sets the
+ dataset transfer property list status to TRUE or FALSE.
+ + When reading or writing compound data types and the + destination is partially initialized and the read/write is + intended to initialize the other members, one must set this + property to TRUE. Otherwise the I/O pipeline treats the + destination datapoints as completely uninitialized. +
plist
+ status
+ H5Pget_preserve
(hid_t plist
)
+ H5Pget_preserve
checks the status of the
+ dataset transfer property list.
+ plist
+ H5Pset_compression
(hid_t plist
,
+ H5Z_method_t method
,
+ unsigned int flags
,
+ size_t cd_size
,
+ const void *client_data
+ )
+ H5Pset_compression
sets the compression method in a dataset creation property
+ list. This is a catch-all function for defining compresion methods
+ and is intended to be called from a wrapper such as
+ H5Pset_deflate()
. The dataset creation property
+ list plist is adjusted to use the specified
+ compression method. The flags is an 8-bit vector
+ which is stored in the file as part of the compression message
+ and passed to the compress and uncompress functions. The
+ client_data is a byte array of length
+ cd_size which is copied to the file and passed to the
+ compress and uncompress methods.
+ + The FLAGS, CD_SIZE, and CLIENT_DATA are copied to the + property list and eventually to the file and passed to the + compression functions. +
+ See Compression + in the HDF5 User's Guide for further information. +
plist
+ method
+ flags
+ cd_size
+ client_data
.
+ *client_data
+ H5Pget_compression
(hid_t plist
,
+ unsigned int *flags
,
+ size_t *cd_size
,
+ void *client_data
+ )
+ H5Pget_compression
gets the compression method
+ information from a dataset creation property list.
+ The CLIENT_DATA buffer is initially CD_SIZE bytes.
+ On return, CLIENT_DATA will be initialized
+ with at most that many bytes, and CD_SIZE will contain the
+ actual size of the client data, which might be larger than
+ its original value.plist
+ *flags
+ *cd_size
+ client_data
array.
+ *client_data
+ H5Pset_deflate
(hid_t plist
,
+ int level
+ )
+ H5Pset_deflate
sets the compression method for a
+ dataset creation property
+ list to H5D_COMPRESS_DEFLATE and the compression level to
+ LEVEL which should be a value between zero and nine,
+ inclusive. Lower compression levels are faster but result in
+ less compression. This is the same algorithm as used by the
+ GNU gzip program.
+ plist
+ level
+ H5Pget_deflate
(hid_t plist
+ )
+ H5Pget_deflate
returns the deflate compression level
+ from a dataset creation property list that uses that method.
+ plist
+ + + | + + | + + |
H5Screate
(H5S_class_t type
)
+H5Screate
creates a new dataspace of a particular
+ type
.
+ The types currently supported are H5S_SCALAR
,
+ H5S_SIMPLE
, and H5S_NONE
;
+ others are planned to be added later. The H5S_NONE
+ dataspace can only hold a selection, not an extent.
+type
+ H5Screate_simple
(int rank
,
+ const hsize_t * dims
,
+ const hsize_t * maxdims
+ )
+H5Screate_simple
creates a new simple data space
+ and opens it for access. The rank
is the number of
+ dimensions used in the dataspace.
+ The dims
argument is the size
+ of the simple dataset and the maxdims
argument is
+ the upper limit on the size of the dataset. maxdims
+ may be the null pointer in which case the upper limit is the
+ same as dims
. If an element of maxdims
+ is zero then the corresponding dimension is unlimited, otherwise
+ no element of maxdims
should be smaller than the
+ corresponding element of dims
. The dataspace
+ identifier returned from this function should be released with
+ H5Sclose
or resource leaks will occur.
+rank
+ dims
+ maxdims
+ H5Scopy
(hid_t space_id
+ )
+H5Scopy
creates a new dataspace which is an exact
+ copy of the dataspace identified by space_id
.
+ The dataspace identifier returned from this function should be
+ released with H5Sclose
or resource leaks will occur.
+space_id
+ H5Sselect_elements
(hid_t space_id
,
+ dh5s_selopt_t op
,
+ const size_t num_elements
,
+ const hssize_t *coord
[ ]
+ )
+H5Sselect_elements
selects array elements to be
+ included in the selection for the space_id
+ dataspace. The number of elements selected must be set with
+ the num_elements
. The coord
array
+ is a two-dimensional array of size dataspace rank
+ by num_elements
(ie. a list of coordinates in
+ the array). The order of the element coordinates in the
+ coord
array also specifies the order in which
+ the array elements are iterated through when I/O is performed.
+ Duplicate coordinate locations are not checked for.
+
+ The selection operator op
determines how the
+ new selection is to be combined with the previously existing
+ selection for the dataspace. Currently, only the
+ H5S_SELECT_SET
operator is supported, which
+ replaces the existing selection with the parameters from
+ this call. When operators other than H5S_SELECT_SET
+ are used to combine a new selection with an existing selection,
+ the selection ordering is reset to 'C' array ordering.
+
space_id
+ op
+ num_elements
+ coord
[ ]
+ H5Sextent_npoints
(hid_t space_id
)
+H5Sextent_npoints
determines the number of elements
+ in a dataspace. For example, a simple 3-dimensional dataspace
+ with dimensions 2, 3, and 4 would have 24 elements.
+space_id
+ H5Sselect_npoints
(hid_t space_id
)
+H5Sselect_npoints
determines the number of elements
+ in the current selection of a dataspace.
+space_id
+ H5Sextent_ndims
(hid_t space_id
)
+H5Sextent_ndims
determines the dimensionality (or rank)
+ of a dataspace.
+space_id
+ H5Sextent_dims
(hid_t space_id
,
+ hsize_t *dims
,
+ hsize_t *maxdims
+ )
+H5Sextent_dims
returns the size and maximum sizes
+ of each dimension of a dataspace through the dims
+ and maxdims
parameters.
+space_id
+ dims
+ maxdims
+ H5S_set_extent_simple
(hid_t space_id
,
+ int rank
,
+ const hsize_t *current_size
,
+ const hsize_t *maximum_size
+ )
+H5S_set_extent_simple
sets or resets the size of
+ an existing dataspace.
+
+ rank
is the dimensionality, or number of
+ dimensions, of the dataspace.
+
+ current_size
is an array of size rank
+ which contains the new size of each dimension in the dataspace.
+ maximum_size
is an array of size rank
+ which contains the maximum size of each dimension in the
+ dataspace.
+
+ Any previous extent is removed from the dataspace, the dataspace
+ type is set to H5S_SIMPLE
, and the extent is set as
+ specified.
+
space_id
+ rank
+ current_size
+ maximum_size
+ H5Sis_simple
(hid_t space_id
)
+H5Sis_simple
determines whether a dataspace is
+ a simple dataspace. [Currently, all dataspace objects are simple
+ dataspaces, complex dataspace support will be added in the future]
+space_id
+ H5Sget_class
(hid_t space_id
)
+H5Sget_class
queries a dataspace to determine the
+ current class of a dataspace.
+
+ The function returns a class name, one of the following:
+ H5S_SCALAR
,
+ H5S_SIMPLE
, or
+ H5S_NONE
.
+
space_id
+ H5Sselect_hyperslab
(hid_t space_id
,
+ h5s_selopt_top
,
+ const hssize_t *start
,
+ const hsize_t *stride
+ const hsize_t *count
,
+ const hsize_t *block
+ )
+H5Sselect_hyperslab
selects a hyperslab region
+ to add to the current selected region for the dataspace
+ specified by space_id
.
+
+ The start
, stride
, count
,
+ and block
arrays must be the same size as the rank
+ of the dataspace.
+
+ The selection operator op
determines how the new
+ selection is to be combined with the already existing selection
+ for the dataspace.
+
+ Currently, only the H5S_SELECT_SET
operator is
+ supported; it replaces the existing selection with the
+ parameters from this call. Overlapping blocks are not
+ supported with the H5S_SELECT_SET
operator.
+
+The start
array determines the starting coordinates
+of the hyperslab
+to select.
+
+The stride
array chooses array locations
+from the dataspace
+with each value in the stride
array determining how
+many elements to move
+in each dimension. Setting a value in the stride
+array to 1 moves to
+each element in that dimension of the dataspace; setting a value of 2 in a
+location in the stride
array moves to every other
+element in that
+dimension of the dataspace. In other words, the stride
+determines the
+number of elements to move from the start
location
+in each dimension.
+Stride values of 0 are not allowed. If the stride
+parameter is NULL
,
+a contiguous hyperslab is selected (as if each value in the
+stride
array
+was set to all 1's).
+
+The count
array determines how many blocks to
+select from the dataspace, in each dimension.
+
+The block
array determines
+the size of the element block selected from the dataspace.
+If the block
+parameter is set to NULL
, the block size defaults
+to a single element
+in each dimension (as if the block
array was set to all 1's).
+
+For example, in a 2-dimensional dataspace, setting
+start
to [1,1],
+stride
to [4,4], count
to [3,7], and
+block
to [2,2] selects
+21 2x2 blocks of array elements starting with location (1,1) and selecting
+blocks at locations (1,1), (5,1), (9,1), (1,5), (5,5), etc.
+
+Regions selected with this function call default to C order iteration when +I/O is performed. +
space_id
+ op
+ start
+ count
+ stride
+ block
+ H5Sclose
(hid_t space_id
+ )
+H5Sclose
releases a dataspace.
+ Further access through the dataspace identifier is illegal.
+ Failure to release a dataspace with this call will
+ result in resource leaks.
+space_id
+
+General Datatype Operations
+ +Atomic Datatype Properties + |
+ +Properties of Compound Types + |
+ +Conversion Functions + |
+The Datatype interface, H5T, provides a mechanism to describe the + storage format of individual data points of a data set and is + hopefully designed in such a way as to allow new features to be + easily added without disrupting applications that use the data + type interface. A dataset (the H5D interface) is composed of a + collection or raw data points of homogeneous type organized + according to the data space (the H5S interface). + +
+A datatype is a collection of datatype properties, all of + which can be stored on disk, and which when taken as a whole, + provide complete information for data conversion to or from that + datatype. The interface provides functions to set and query + properties of a datatype. + +
+A data point is an instance of a datatype, + which is an instance of a type class. We have defined + a set of type classes and properties which can be extended at a + later time. The atomic type classes are those which describe + types which cannot be decomposed at the datatype interface + level; all other classes are compound. + +
+See The Datatype Interface (H5T) +in the HDF5 User's Guide for further information. + + +
H5Topen
(hid_t loc_id
,
+ const char * name
+ )
+H5Topen
opens a named datatype at the location
+ specified by loc_id
and returns an identifier
+ for the datatype. loc_id
is either a file or
+ group identifier. The identifier should eventually be closed
+ by calling H5Tclose()
to release resources.
+loc_id
+ name
+ H5Tcommit
(hid_t loc_id
,
+ const char * name
,
+ hid_t type
+ )
+H5Tcommit
commits a transient datatype
+ (not immutable) to a file, turned it into a named datatype.
+ The loc_id
is either a file or group identifier
+ which, when combined with name
, refers to a new
+ named datatype.
+loc_id
+ name
+ type
+ H5Tcommitted
(hid_t type
)
+H5Tcommitted
queries a type to determine whether
+ the type specified by the type
identifier
+ is a named type or a transient type. If this function returns
+ a positive value, then the type is named (that is, it has been
+ committed, perhaps by some other application). Datasets which
+ return committed datatypes with H5Dget_type()
are
+ able to share the datatype with other datasets in the same file.
+type
+ H5Tinsert_array
(hid_t parent_id
,
+ const char *name
,
+ size_t offset
,
+ int ndims
,
+ const size_t *dim
,
+ const int *perm
,
+ hid_t member_id
+ )
+H5Tinsert_array
adds a new member to the
+ compound datatype parent_id
.
+ The member is an array with ndims
dimensionality
+ and the size of the array is dim
.
+ The new member's name, name
, must be unique
+ within the compound datatype.
+ The offset
argument defines the start of the
+ member in an instance of the compound datatype and
+ member_id
is the type identifier of the new member.
+ The total member size should be relatively small.
+parent_id
+ name
+ offset
+ ndims
+ dim
+ perm
+ member_id
+ H5Tfind
(hid_t src_id
,
+ hid_t dst_id
,
+ H5T_cdata_t **pcdata
+ )
+H5Tfind
finds a conversion function that can
+ handle a conversion from type src_id
to type
+ dst_id
.
+ The pcdata
argument is a pointer to a pointer
+ to type conversion data which was created and initialized
+ by the soft type conversion function of this path when the
+ conversion function was installed on the path.
+src_id
+ dst_id
+ pcdata
+ H5Tconvert
(hid_t src_id
,
+ hid_t dst_id
,
+ size_t nelmts
,
+ void *buf
,
+ void *background
+ )
+H5Tconvert
converts nelmts
elements
+ from the type specified by the src_id
identifier
+ to type dst_id
.
+ The source elements are packed in buf
and on return
+ the destination will be packed in buf
.
+ That is, the conversion is performed in place.
+ The optional background buffer is an array of nelmts
+ values of destination type which are merged with the converted
+ values to fill in cracks (for instance, background
+ might be an array of structs with the a
and
+ b
fields already initialized and the conversion
+ of buf
supplies the c
and d
+ field values).
+src_id
+ dst_id
+ nelmts
+ buf
.
+ buf
+ background
+ H5Tset_overflow
(H5T_overflow_t func
)
+H5Tset_overflow
sets the overflow handler
+ to be the function specified by func
.
+ func
will be called for all datatype conversions that
+ result in an overflow.
+
+ See the definition of H5T_overflow_t
in
+ H5Tpublic.h
for documentation
+ of arguments and return values.
+ The prototype for H5T_overflow_t
is as follows:
+ herr_t (*H5T_overflow_t)(hid_t src_id, hid_t dst_id,
+ void *src_buf, void *dst_buf);
+
+
+ The NULL pointer may be passed to remove the overflow handler. +
func
+ H5Tget_overflow
(void
)
+H5Tset_overflow
returns a pointer
+ to the current global overflow function.
+ This is an application-defined function that is called whenever a
+ datatype conversion causes an overflow.
+H5Tcreate
(H5T_class_t class
,
+ size_tsize
+ )
+H5Tcreate
creates a new dataype of the specified
+ class with the specified number of bytes.
+ Currently, only the H5T_COMPOUND
datatype class is
+ supported with this function. Use H5Tcopy
+ to create integer or floating-point datatypes.
+ The datatype identifier returned from this function should be
+ released with H5Tclose
or resource leaks will result.
+class
+ size
+ H5Tcopy
(hid_t type_id
)
+H5Tcopy
copies an existing datatype.
+ The returned type is always transient and unlocked.
+
+ The type_id
argument can be either a datatype
+ identifier, a predefined datatype (defined in
+ H5Tpublic.h
), or a dataset identifier.
+ If type_id
is a dataset identifier instead of a
+ datatype identifier, then this function returns a transient,
+ modifiable datatype which is a copy of the dataset's datatype.
+
+ The datatype identifier returned should be released with
+ H5Tclose
or resource leaks will occur.
+
+
type_id
+ H5Tpublic.h
), or a dataset identifier.
+ H5Tequal
(hid_t type_id1
,
+ hid_ttype_id2
+ )
+H5Tequal
determines whether two datatype identifiers
+ refer to the same datatype.
+type_id1
+ type_id2
+ H5Tlock
(hid_t type_id
+ )
+H5Tlock
locks the datatype specified by the
+ type_id
identifier, making it read-only and
+ non-destrucible. This is normally done by the library for
+ predefined datatypes so the application does not
+ inadvertently change or delete a predefined type.
+ Once a datatype is locked it can never be unlocked.
+type_id
+ H5Tget_class
(hid_t type_id
+ )
+H5Tget_class
returns the datatype class identifier.
+
+ Valid class identifiers, as defined in H5Tpublic.h
, are:
+
H5T_INTEGER
(0
)
+ H5T_FLOAT
(1
)
+ H5T_TIME
(2
)
+ H5T_STRING
(3
)
+ H5T_BITFIELD
(4
)
+ H5T_OPAQUE
(5
)
+ H5T_COMPOUND
(6
)
+ type_id
+ H5Tget_size
(hid_t type_id
+ )
+H5Tget_size
returns the size of a datatype in bytes.
+type_id
+ H5Tset_size
(hid_t type_id
,
+ size_tsize
+ )
+H5Tset_size
sets the total size in bytes,
+ size
, for an atomic datatype (this operation
+ is not permitted on compound datatypes). If the size is
+ decreased so that the significant bits of the datatype extend beyond
+ the edge of the new size, then the `offset' property is decreased
+ toward zero. If the `offset' becomes zero and the significant
+ bits of the datatype still hang over the edge of the new size, then
+ the number of significant bits is decreased.
+ Adjusting the size of an H5T_STRING automatically sets the precision
+ to 8*size. All datatypes have a positive size.
+type_id
+ size
+ H5Tget_order
(hid_t type_id
+ )
+H5Tget_order
returns the byte order of an
+ atomic datatype.
+ + Possible return values are: +
H5T_ORDER_LE
(0
)
+ H5T_ORDER_BE
(1
)
+ H5T_ORDER_VAX
(2
)
+ type_id
+ H5T_ORDER_ERROR
(-1).
+H5Tset_order
(hid_t type_id
,
+ H5T_order_torder
+ )
+H5Tset_order
sets the byte ordering of an atomic datatype.
+ Byte orderings currently supported are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ order
+ H5Tget_precision
(hid_t type_id
+ )
+H5Tget_precision
returns the precision of an atomic datatype. The
+ precision is the number of significant bits which, unless padding is
+ present, is 8 times larger than the value returned by H5Tget_size().
+type_id
+ H5Tset_precision
(hid_t type_id
,
+ size_tprecision
+ )
+H5Tset_precision
sets the precision of an atomic datatype.
+ The precision is the number of significant bits which, unless padding
+ is present, is 8 times larger than the value returned by H5Tget_size().
+ If the precision is increased then the offset is decreased and then + the size is increased to insure that significant bits do not "hang + over" the edge of the datatype. +
Changing the precision of an H5T_STRING automatically changes the + size as well. The precision must be a multiple of 8. +
When decreasing the precision of a floating point type, set the + locations and sizes of the sign, mantissa, and exponent fields + first. +
type_id
+ precision
+ H5Tget_offset
(hid_t type_id
+ )
+H5Tget_offset
retrieves the bit offset of the first significant bit.
+ The signficant bits of an atomic datum can be offset from the beginning
+ of the memory for that datum by an amount of padding. The `offset'
+ property specifies the number of bits of padding that appear to the
+ "right of" the value. That is, if we have a 32-bit datum with 16-bits
+ of precision having the value 0x1122 then it will be layed out in
+ memory as (from small byte address toward larger byte addresses):
+ Byte Position | +Big-Endian Offset=0 | +Big-Endian Offset=16 | +Little-Endian Offset=0 | +Little-Endian Offset=16 | +
---|---|---|---|---|
0: | +[ pad] | +[0x11] | +[0x22] | +[ pad] | +
1: | +[ pad] | +[0x22] | +[0x11] | +[ pad] | +
2: | +[0x11] | +[ pad] | +[ pad] | +[0x22] | +
3: | +[0x22] | +[ pad] | +[ pad] | +[0x11] | +
type_id
+ H5Tset_offset
(hid_t type_id
,
+ size_t offset
+ )
+H5Tset_offset
sets the bit offset of the first significant bit. The
+ signficant bits of an atomic datum can be offset from the beginning of
+ the memory for that datum by an amount of padding. The `offset'
+ property specifies the number of bits of padding that appear to the
+ "right of" the value. That is, if we have a 32-bit datum with 16-bits
+ of precision having the value 0x1122 then it will be layed out in
+ memory as (from small byte address toward larger byte addresses):
+ Byte Position | +Big-Endian Offset=0 | +Big-Endian Offset=16 | +Little-Endian Offset=0 | +Little-Endian Offset=16 | +
---|---|---|---|---|
0: | +[ pad] | +[0x11] | +[0x22] | +[ pad] | +
1: | +[ pad] | +[0x22] | +[0x11] | +[ pad] | +
2: | +[0x11] | +[ pad] | +[ pad] | +[0x22] | +
3: | +[0x22] | +[ pad] | +[ pad] | +[0x11] | +
If the offset is incremented then the total size is +incremented also if necessary to prevent significant bits of +the value from hanging over the edge of the datatype. + +
The offset of an H5T_STRING cannot be set to anything but +zero. +
type_id
+ offset
+ H5Tget_pad
(hid_t type_id
,
+ H5T_pad_t * lsb
,
+ H5T_pad_t * msb
+ )
+H5Tget_pad
retrieves the padding type of the least and most-significant
+ bit padding. Valid types are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ lsb
+ msb
+ H5Tset_pad
(hid_t type_id
,
+ H5T_pad_t lsb
,
+ H5T_pad_t msb
+ )
+H5Tset_pad
sets the least and most-significant bits padding types.
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ lsb
+ msb
+ H5Tget_sign
(hid_t type_id
+ )
+H5Tget_sign
retrieves the sign type for an integer type.
+ Valid types are:
+ 0
)
+ 1
)
+ type_id
+ H5T_SGN_ERROR
(-1).
+H5Tset_sign
(hid_t type_id
,
+ H5T_sign_t sign
+ )
+H5Tset_sign
sets the sign proprety for an integer type.
+ 0
)
+ 1
)
+ type_id
+ sign
+ H5Tget_fields
(hid_t type_id
,
+ size_t * epos
,
+ size_t * esize
,
+ size_t * mpos
,
+ size_t * msize
+ )
+H5Tget_fields
retrieves information about the locations of the various
+ bit fields of a floating point datatype. The field positions are bit
+ positions in the significant region of the datatype. Bits are
+ numbered with the least significant bit number zero.
+ Any (or even all) of the arguments can be null pointers.
+type_id
+ epos
+ esize
+ mpos
+ msize
+ H5Tset_fields
(hid_t type_id
,
+ size_t epos
,
+ size_t esize
,
+ size_t mpos
,
+ size_t msize
+ )
+H5Tset_fields
sets the locations and sizes of the various floating
+ point bit fields. The field positions are bit positions in the
+ significant region of the datatype. Bits are numbered with the least
+ significant bit number zero.
+
+ Fields are not allowed to extend beyond the number of bits of + precision, nor are they allowed to overlap with one another. +
type_id
+ epos
+ esize
+ mpos
+ msize
+ H5Tget_ebias
(hid_t type_id
+ )
+H5Tget_ebias
retrieves the exponent bias of a floating-point type.
+type_id
+ H5Tset_ebias
(hid_t type_id
,
+ size_t ebias
+ )
+H5Tset_ebias
sets the exponent bias of a floating-point type.
+type_id
+ ebias
+ H5Tget_norm
(hid_t type_id
+ )
+H5Tget_norm
retrieves the mantissa normalization of
+ a floating-point datatype. Valid normalization types are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ H5T_NORM_ERROR
(-1).
+H5Tset_norm
(hid_t type_id
,
+ H5T_norm_t norm
+ )
+H5Tset_norm
sets the mantissa normalization of
+ a floating-point datatype. Valid normalization types are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ norm
+ H5Tget_inpad
(hid_t type_id
+ )
+H5Tget_inpad
retrieves the internal padding type for
+ unused bits in floating-point datatypes.
+ Valid padding types are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ H5T_PAD_ERROR
(-1).
+H5Tset_inpad
(hid_t type_id
,
+ H5T_pad_t inpad
+ )
+H5Tset_inpad
will be filled
+ according to the value of the padding value property inpad
.
+ Valid padding types are:
+ 0
)
+ 1
)
+ 2
)
+ type_id
+ pad
+ H5Tget_cset
(hid_t type_id
+ )
+H5Tget_cset
retrieves the character set type
+ of a string datatype. Valid character set types are:
+ 0
)
+ type_id
+ H5T_CSET_ERROR
(-1).
+H5Tset_cset
(hid_t type_id
,
+ H5T_cset_t cset
+ )
+H5Tset_cset
the character set to be used.
+ + HDF5 is able to distinguish between character sets of different + nationalities and to convert between them to the extent possible. + Valid character set types are: +
0
)
+ type_id
+ cset
+ H5Tget_strpad
(hid_t type_id
+ )
+H5Tget_strpad
retrieves the string padding method
+ for a string datatype. Valid string padding types are:
+ 0
)
+ 1
)
+ type_id
+ H5T_STR_ERROR
(-1).
+H5Tset_strpad
(hid_t type_id
,
+ H5T_str_t strpad
+ )
+H5Tset_strpad
defines the storage mechanism for the string.
+ Valid string padding values are:
+ 0
)
+ 1
)
+ type_id
+ strpad
+ H5Tget_nmembers
(hid_t type_id
+ )
+H5Tget_nmembers
retrieves the number of fields a compound datatype has.
+type_id
+ H5Tget_member_name
(hid_t type_id
,
+ int field_idx
+ )
+H5Tget_member_name
retrieves the name of a field
+ of a compound datatype. Fields are stored in no particular
+ order, with indexes 0 through N-1, where N is the value returned
+ by H5Tget_nmembers()
. The name of the field is
+ allocated with malloc()
and the caller is responsible
+ for freeing the memory used by the name.
+type_id
+ field_idx
+ H5Tget_member_dims
(hid_t type_id
,
+ int field_idx
,
+ size_t *dims
,
+ int *perm
+ )
+H5Tget_member_dims
returns the dimensionality of
+ the field. The dimensions and permuation vector are returned
+ through arguments dims
and perm
,
+ both arrays of at least four elements.
+ Either (or even both) may be null pointers.
+type_id
+ field_idx
+ dims
+ to retrieve.
+ dims
+ perm
+ H5Tget_member_type
(hid_t type_id
,
+ int field_idx
+ )
+H5Tget_member_type
returns the datatype of the specified member. The caller
+ should invoke H5Tclose() to release resources associated with the type.
+type_id
+ field_idx
+ H5Tinsert
(hid_t type_id
,
+ const char * name
,
+ off_t offset
,
+ hid_t field_id
+ )
+H5Tinsert
adds another member to the compound datatype
+ type_id
. The new member has a name
which
+ must be unique within the compound datatype.
+ The offset
argument defines the start of the member
+ in an instance of the compound datatype, and field_id
+ is the datatype identifier of the new member.
+ + Note: All members of a compound datatype must be atomic; a + compound datatype cannot have a member which is a compound + datatype. +
type_id
+ name
+ offset
+ field_id
+ H5Tpack
(hid_t type_id
+ )
+H5Tpack
recursively removes padding from within a compound
+ datatype to make it more efficient (space-wise) to store that data.
+type_id
+ H5Tregister_hard
(const char
+ * name
, hid_t src_id
,
+ hid_t dst_id
,
+ H5T_conv_t func
+ )
+H5Tregister_hard
registers a hard conversion function for a datatype
+ conversion path. The path is specified by the source and destination
+ datatypes src_id
and dst_id
. A conversion
+ path can only have one hard function, so func
replaces any
+ previous hard function.
+
+ If func
is the null pointer then any hard function
+ registered for this path is removed from this path. The soft functions
+ are then used when determining which conversion function is appropriate
+ for this path. The name
argument is used only
+ for debugging and should be a short identifier for the function.
+
+ The type of the conversion function pointer is declared as:
+
+ typedef
herr_t (*H5T_conv_t
) (hid_t src_id
,
+ hid_t dst_id
,
+ H5T_cdata_t *cdata
,
+ size_t nelmts
,
+ void *buf
,
+ void *bkg)
;
+
name
+ src_id
+ dst_id
+ func
+ H5Tregister_soft
(const char
+ * name
, H5T_class_t src_cls
,
+ H5T_class_t dst_cls
,
+ H5T_conv_t func
+ )
+H5Tregister_soft
registers a soft conversion function by adding it to the
+ end of the master soft list and replacing the soft function in all
+ applicable existing conversion paths. The name
+ is used only for debugging and should be a short identifier
+ for the function.
+
+ The type of the conversion function pointer is declared as:
+
+ typedef
herr_t (*H5T_conv_t
) (hid_t src_id
,
+ hid_t dst_id
,
+ H5T_cdata_t *cdata
,
+ size_t nelmts
,
+ void *buf
,
+ void *bkg)
;
+
name
+ src_cls
+ dst_cls
+ func
+ H5Tunregister
(H5T_conv_t func
+ )
+H5Tunregister
removes a conversion function from all conversion paths.
+
+ The type of the conversion function pointer is declared as:
+
+ typedef
herr_t (*H5T_conv_t
) (hid_t src_id
,
+ hid_t dst_id
,
+ H5T_cdata_t *cdata
,
+ size_t nelmts
,
+ void *buf
,
+ void *bkg)
;
+
func
+ H5Tclose
(hid_t type_id
+ )
+H5Tclose
releases a datatype. Further access
+ through the datatype identifier is illegal. Failure to release
+ a datatype with this call will result in resource leaks.
+type_id
+
+
|
+
|
+HDF5 supports compression of raw data by compression methods
+built into the library or defined by an application.
+A compression method is associated with a dataset when the dataset is
+created and is applied independently to each storage chunk of the dataset.
+The dataset must use the H5D_CHUNKED
storage layout.
+
+The HDF5 library does not support compression for contiguous datasets +because of the difficulty of implementing random access for partial I/O. +Compact dataset compression is not supported because it would not produce +significant results. +
+See Compression in the +HDF5 User's Guide for further information. + +
H5Zregister
(H5Z_method_t method
,
+ const char *name
,
+ H5Z_func_tcfunc
,
+ H5Z_func_t ufunc
+ )
+H5Zregister
registers new compression and uncompression
+ functions for a method specified by a method number, method
.
+ name
is used for debugging and may be the null pointer.
+ Either or both of cfunc
(the compression function) and
+ ufunc
(the uncompression method) may be null pointers.
+ + The statistics associated with a method number are not reset + by this function; they accumulate over the life of the library. +
method
+ name
+ cfunc
+ ufunc
+