Hardware Reference
In-Depth Information
FIGURE 16.3 (See color insert): An overview of HDF5 datatypes. [Image
courtesy of Gerd Heber, The HDF Group.]
The datatype of an HDF5 dataset describes the type of the element stored
at each location of the array. Each element of a dataset must have the same
datatype, but datatypes themselves are capable of describing very complex
structures for each element. Figure 16.3 shows the categories of datatypes
and some of their capabilities. Notable features include the ability to nest
array, compound, and variable-length datatypes arbitrarily to create user-
defined integer and floating-point types, and to reference other objects and
regions of objects within the container. HDF5 datatypes give great power to
the application developer, allowing them to describe their data in memory and
store it in HDF5 containers without forcing them to convert the data when
storing it.
The layout of an HDF5 dataset describes how elements of the array de-
scribed by the dataset's dataspace and datatype are stored within the le. As
part of HDF5's exibility, dataset layouts allow for multiple optimizations,
such as contiguously storing all the elements together, storing the elements
for very small arrays with the dataset's metadata (for faster access), chunking
an array up into regular pieces (allowing for array dimension expansion and
data compression), and storing the array elements externally in another file.
Finally, HDF5 attributes allow an application to add user-defined meta-
data to any object in the container. Attributes are name-value pairs that can
be attached to any object, with the value for each attribute being essentially
a small dataset, with a datatype, dataspace, and array elements. Attributes
provide the full richness of the datatypes available to datasets, but are limited
in size and access operations, as they are designed to be small objects that
augment a larger component in the application's data model.
 
Search WWH ::




Custom Search