Reads selected data to an application buffer.


H5LT_READ_REGION(file, path, block_coord, mem_type, buf)


<pre><code class="language-c">herr_t H5LTread_region( const char *file, const char *path, const hsize_t *block_coord, hid_t mem_type, void *buf )</code></pre>

<pre><code class="language-fortran">SUBROUTINE H5LTread_region_f(file, path, block_coord, mem_type, buf, error)
  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</code></pre>

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


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 a non-negative value if successful; otherwise returns a negative value.


Coming Soon!

Release    Change
1.0C function introduced in this release.
1.1Fortran wrapper introduced in this release.