H5Sselect_hyperslab
/ h5sselect_hyperslab_f
.
sds.h5
(sdsf.h5
in FORTRAN). It
selects a 3 x 4 hyperslab from the dataset as follows (Dimension 0 is
offset by 1 and Dimension 1 is offset by 2):
5 x 6 array:
X |
X |
X |
X |
||
X |
X |
X |
X |
||
X |
X |
X |
X |
||
Then it reads the hyperslab from this file into a 2-dimensional plane (size 7 x 7) of a 3-dimensional array (size 7 x 7 x 3), as follows (with Dimension 0 offset by 3):
X |
X |
X |
X |
|||
X |
X |
X |
X |
|||
X |
X |
X |
X |
|||
To obtain the example, download:
h5_hyperslab.c
hyperslab.f90
HyperSlab.java
C:
FORTRAN:
The start, stride, count, and block arrays must
be the same size as the rank of the dataspace.
The FORTRAN example does not use these calls, though they
are available as
Remarks
H5Sselect_hyperslab
/ h5sselect_hyperslab_f
selects a hyperslab region to
add to the current selected region for a specified dataspace.
herr_t H5Sselect_hyperslab (hid_t space_id, H5S_seloper_t operator,
const hsize_t *start, const hsize_t *stride,
const hsize_t *count, const hsize_t *block )
h5sselect_hyperslab_f (space_id, operator, start, count, &
hdferr, stride, block)
space_id IN: INTEGER(HID_T)
operator IN: INTEGER
start IN: INTEGER(HSIZE_T), DIMENSION(*)
count IN: INTEGER(HSIZE_T), DIMENSION(*)
hdferr OUT: INTEGER
stride IN: INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL
block IN: INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL
H5S_SELECT_SET
(H5S_SELECT_SET_F
in FORTRAN)
H5S_SELECT_OR
(H5S_SELECT_OR_F
in FORTRAN)
H5Dget_space / h5dget_space_f:
H5Sget_simple_extent_dims:
H5Sget_simple_extent_ndims:
h5sget_simple_extent_dims_f
and
h5sget_simple_extent_ndims_f
.
The National Center for Supercomputing Applications
University of Illinois
at Urbana-Champaign
hdfhelp@ncsa.uiuc.edu
Last Modified: June 22, 2001