Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5LR_COPY_REFERENCE

Copies data from the specified dataset to a new location and creates a reference to it.

Procedure:

H5LR_COPY_REFERENCE(obj_id, ref, file, path, block_coord, ref_new)

Signature:

herr_t H5LRcopy_reference( hid_t obj_id, hdset_reg_ref_t *ref, const char *file, const char *path, const hsize_t *block_coord, hdset_reg_ref_t *ref_new )

SUBROUTINE H5LRcopy_reference_f( obj_id, ref, file, path, block_coord, ref_new, error )

  IMPLICIT NONE

  INTEGER(hid_t), INTENT(in) :: obj_id                       ! Identifier of any object in a file an 
                                                             !  HDF5 reference belongs to 
  TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref                 ! Reference to the datasets region 
  CHARACTER(LEN=*), INTENT(IN) :: file                       ! Name of the destination file
  CHARACTER(LEN=*), INTENT(IN) :: path                       ! Full path to the destination dataset 
  INTEGER(hsize_t), DIMENSION(:), INTENT(IN) :: block_coord  ! Hyperslab coordinates in the destination dataset 
  TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref_new            ! Region reference to the new location of data 
  INTEGER, INTENT(OUT) :: error                              ! Error code:
                                                             !  0 on success and -1 on failure
END SUBROUTINE H5LRcopy_reference_f

Parameters:
hid_t obj_id    IN: Identifier of any object in a file an HDF5 reference belongs to
hdset_reg_ref_t ref IN: Reference to the datasets region
const char *file IN: Name of the destination file
const char *path IN: Full path to the destination dataset
const hsize_t *block_coord IN: Hyperslab coordinates in the destination dataset
hdset_reg_ref_t *ref_new OUT: Region reference to the new location of data

Description:

Given a data set pointed to by a region reference, the function H5LRcopy_reference will copy the hyperslab data referenced by a datasets region reference into existing dataset specified by its path path in the file with the name file, and to location specified by the hyperslab coordinates block_coord. It will create the region reference ref_new to point to the new location. The number of elements in the old and newly specified regions has to be the same.

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}.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

Coming Soon!

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

--- Last Modified: December 04, 2017 | 07:27 AM