Reads selected data to an application buffer.
Procedure:
H5LT_READ_REGION(file, path, block_coord, mem_type, buf)
Signature:
herr_t H5LTread_region( const char *file, const char *path, const hsize_t *block_coord, hid_t mem_type, void *buf )
SUBROUTINE H5LTread_region_f(file, path, block_coord, mem_type, buf, error)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: file ! Name of file
CHARACTER(LEN=*), INTENT(IN) :: path ! Full path to a dataset
INTEGER(hsize_t), DIMENSION(:), INTENT(IN) :: block_coord ! Hyperslab coordinates
INTEGER(hid_t), INTENT(IN) :: mem_type ! Memory datatype, describing the buffer
! the referenced data will be read into
TYPE(C_PTR), INTENT(OUT) :: buf ! Buffer containing data from
! the referenced region
INTEGER, INTENT(OUT) :: error ! Error code:
! 0 on success and -1 on failure
END SUBROUTINE H5LTread_region_f
Parameters:
const char *file | | IN: Name of file |
const char *path | | IN: Full path to a dataset |
const hsize_t *block_coord | | IN: Hyperslab coordinates |
hid_t mem_type | | IN: Memory datatype, describing the buffer the referenced data will be read into |
void *buf | | OUT: Buffer containing data from the referenced region |
Description:
H5LTread_region
reads data from a region described by the hyperslab coordinates in block_coord
, located in the dataset specified by its absolute path path
in a file specified by its name file
. Data is read into a buffer buf
of the datatype that corresponds to the HDF5 datatype specified by mem_type
.
Buffer block_coord
has size 2*rank and is the coordinates of the starting point following by the coordinates of the ending point of the hyperslab. For example, to extract a rectangular hyperslab region starting at element (2,2) to element (5,4) then block_coord
would be {2, 2, 5, 4}.
Buffer buf
should be big enough to hold selected elements of the type that corresponds to the mem_type
datatype.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
1.0 | C function introduced in this release. |
1.1 | Fortran wrapper introduced in this release. |
--- Last Modified: December 04, 2017 | 07:27 AM