From 220a0db842dd9f7d67be2fcaf5169db31a8500c5 Mon Sep 17 00:00:00 2001 From: Frank Baker Date: Fri, 11 Sep 1998 16:18:33 -0500 Subject: [svn-r696] Added copyright notice/link. Added dataspace mapping immage (H5.intro.datamap.gif). Fixed a few formatting errors. --- doc/html/H5.intro.html | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/html/H5.intro.html b/doc/html/H5.intro.html index 8dd217b..2e44ad6 100644 --- a/doc/html/H5.intro.html +++ b/doc/html/H5.intro.html @@ -164,9 +164,9 @@ Example: H5Eprint, which prints the current error stack.

Include files

There are a number definitions and declarations that should be included with any HDF5 program. These definitions and declarations are contained in several include files. The main include file is hdf5.h. This file includes all of the other files that your program is likely to need. Be sure to include hdf5.h in any program that accesses HDF5.

Predefined atomic datatypes

-

A datatype is a collection of data type 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 data type. The datatype (H5D) interface provides functions to set and query properties of a data type. -

A data point is an instance of a data type, 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 describe types that cannot be decomposed at the data type interface level; all other classes are compound. -

NATIVE datatypes. Although it is possible to describe nearly any kind of atomic data type, most applications will use predefined datatypes that are supported by their compiler. In HDF5 these are called "native" datatypes. NATIVE datatypes are C-like datatypes that are generally supported by the hardware of the machine on which the library was compiled. In order to be portable, applications should almost always use the NATIVE designation to describe data values in memory. +

A datatype is a collection of data type 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 data type. The datatype interface (H5T) provides functions to set and query properties of a data type. +

A data point is an instance of a data type, 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 describe types that cannot be decomposed at the data type interface level; all other classes are compound. +

NATIVE datatypes. Although it is possible to describe nearly any kind of atomic data type, most applications will use predefined datatypes that are supported by their compiler. In HDF5 these are called native datatypes. NATIVE datatypes are C-like datatypes that are generally supported by the hardware of the machine on which the library was compiled. In order to be portable, applications should almost always use the NATIVE designation to describe data values in memory.

The NATIVE architecture has base names which do not follow the same rules as the others. Instead, native type names are similar to the C type names. Here are some examples:

@@ -370,9 +370,7 @@ status_n = H5Sextent_dims(dataspace, dims_out); printf("rank %d, dimensions %d x %d \n", rank, dims_out[0], dims_out[1]);

Reading and writing a portion of a dataset

In the previous discussion, we describe how to access an entire dataset with one write (or read) operation. HDF5 also supports access to portions (or selections) of a dataset in one read/write operation. Currently selections are limited to hyperslabs and the lists of independent points. Both types of selection will be discussed in the following sections. Several sample cases of selection reading/writing are shown on the following figure. -

<<< Insert dataspace figure here. (If you see this -note, check the copy of this Introduction at -http://hdf.ncsa.uiuc.edu/HDF5/H5.intro.html to see the figure.) >>> +

In example (a) a single hyperslab is read from the midst of a 2-D array in a file and stored in the corner of a smaller 2-D array in memory. In (b) a regular series of blocks is read from a 2-D array in the file and stored as a contiguous sequence of values at a certain offset in a 1-D array in memory. In (c) a sequence of points with no regular pattern is read from a 2-D array in a file and stored as a sequence of points with no regular pattern in a 3-D array in memory.

As these examples illustrate, whenever we perform partial read/write operations on the data, the following information must be provided: file dataspace, file dataspace selection, memory dataspace and memory dataspace selection. After the required information is specified, actual read/write operation on the portion of data is done in a single call to the HDF5 read/write functions H5Dread(write).

Selecting hyperslabs
@@ -2682,14 +2680,20 @@ herr_t attr_info(hid_t loc_id, const char *name, void *opdata)

  +


+ + +
HDF Help Desk - - +
Last modified: 11 September 1998 - +
+Copyright   +
+ -- cgit v0.12