Hardware Reference
In-Depth Information
to construct a model of their higher-level concepts. As a software library,
HDF5 is designed to provide applications with an object-oriented program-
ming interface that is powerful, exible and high performance. HDF5's le
format provides a portable, backward- and forward-compatible, and extensi-
ble instantiation of the HDF5 data model.
16.3.1 The HDF5 Data Model
At the highest level, the HDF5 data model provides classes that applica-
tion developers use to construct models of their domain-specific objects. The
primary classes in the HDF5 data model are:
File: A container which holds HDF5 dataset and group objects. Files always
contain at least one group object, the \root" group.
Dataset: A multi-dimensional array of data elements.
Group: A set of links to HDF5 dataset and group objects.
Link: A named reference to an HDF5 dataset or group object.
Attribute: User-level metadata associated with an HDF5 dataset or group.
Figure 16.1 shows an HDF5 container (typically stored as a file), with
examples of the primary HDF5 object model classes. HDF5 objects in a con-
tainer do not have explicit names because they can be referenced with links
from multiple locations in the container's group hierarchy, so the objects dis-
cussed here are labeled numerically. Object 1 is the root group for the file,
referenced with the name \/" and is shown with a set of user-dened attributes
attached to it. Object 2 is a dataset, referenced with the name \/A/C" and
has a single attribute attached to it. Object 3 shows a dataset object that can
be reached from two different groups in the container, and can be referenced
as either \/A/E" or \/B/F."
Figure 16.1 shows a sample of the power of HDF5 groups and links for
structuring application information in ways that best match the application's
needs. HDF5 groups can be nested to arbitrary depth and HDF5 links allow
dataset or group objects to be referenced from multiple groups. This flexi-
bility allows the creation of directed graphs, not just hierarchical structures.
Although not shown in Figure 16.1, links can also \dangle" (referring to ob-
jects not yet placed in the container) or refer to objects in another container.
Groups and links provide the structure for the objects in an HDF5 con-
tainer, but datasets are where an application's bulk data is stored. HDF5
datasets are multi-dimensional array objects that are stored in the container
and referred to by links from one or more groups. Each dataset has metadata
that describes the array dimensions, the array element type and the storage
layout in the container. Figure 16.2 shows a three-dimensional dataset with
32-bit floating-point elements, stored contiguously in the container.
 
Search WWH ::




Custom Search