The property list interface provides a mechanism for adding functionality to HDF5 calls, without increasing the number of arguments used for a given call.
A property list is a collection of values which can
be passed to various HDF5 functions to control features that
are typically unimportant or whose default values are usually used
(by specifying H5P_DEFAULT
/ H5P_DEFAULT_F
).
It supports unusual cases when:
The following example shows how to create a file with 64-bit object offsets and lengths:
hid_t create_plist; hid_t file_id; create_plist = H5Pcreate(H5P_FILE_CREATE); H5Pset_sizes(create_plist, 8, 8); file_id = H5Fcreate("test.h5", H5F_ACC_TRUNC, create_plist, H5P_DEFAULT); . . . H5Fclose(file_id);
Following is an example of using the H5P_FILE_ACCESS property list for creating
HDF5 files with the metadata and data split into different files:
[ C program ]
- h5split.c
The following code sets the maximum size for the type conversion buffer
and background buffer:
Creating Datasets
The Dataset Creation property list, H5P_DATASET_CREATE, applies to
H5Dcreate() and controls information on how raw data
is organized on disk and how the raw data is compressed. The dataset API
partitions these terms by layout, compression, and external storage:
[ C program ]
- h5_extend.c
[ C program ]
- h5_crtextd.c
Reading or Writing Data
The Data Transfer property list, H5P_DATASET_XFER, is used to control
various aspects of I/O, such as caching hints or collective I/O information.
plist_xfer = H5Pcreate (H5P_DATASET_XFER);
H5Pset_buffer(plist_xfer, (hsize_t)NX*NY*NZ, NULL, NULL);
status = H5Dread (dataset, H5T_NATIVE_UCHAR, memspace, dataspace,
plist_xfer);
The National Center for Supercomputing Applications
University of Illinois
at Urbana-Champaign
hdfhelp@ncsa.uiuc.edu
Last Modified: June 22, 2001