Copies data from a referenced region to a region in a destination dataset.
Procedure:
H5LR_COPY_REGION(obj_id, ref, file_dest, path_dest, block_coord_dest)
Signature:
herr_t H5LRcopy_region( hid_t obj_id, hdset_reg_ref_t *ref, const char *file_dest, const char *path_dest, const hsize_t *block_coord_dest )
SUBROUTINE H5LRcopy_region_f(obj_id, ref, file_dest, path_dest, block_coord_dest, error)
IMPLICIT NONE
INTEGER(hid_t), INTENT(IN) :: obj_id ! Identifier of any object in a file
! dataset region reference belongs to
TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference
CHARACTER(LEN=*), INTENT(IN) :: file_dest ! Name of the destination file
CHARACTER(LEN=*), INTENT(IN) :: path_dest ! Full path to the destination dataset
INTEGER(hsize_t), DIMENSION(:), INTENT(IN) :: block_coord_dest ! Hyperslab coordinates in the destination dataset
INTEGER, INTENT(OUT) :: error ! Error code:
! 0 on success and -1 on failure
END SUBROUTINE H5LRcopy_region_f
Parameters:
hid_t obj_id | | IN: Identifier of any object in a file dataset region reference belongs to |
hdset_reg_ref_t *ref | | IN: Dataset region reference |
const char *file_dest | | IN: Name of the destination file |
const char *path_dest | | IN: Full path to the destination dataset |
const hsize_t *block_coord_dest | | IN: Hyperslab coordinates in the destination dataset |
Description:
Given a dataset region reference ref
in a source file specified by an identifier of any object in that file obj_id
, the function will write data to the existing dataset path_dest
in file file_dest
to the simple hyperslab specified by block_coord_dest
.
Buffer block_coord_dest
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 specify a rectangular hyperslab destination region starting at element (2,2) to element (5,4) then block_coord_dest
would be {2, 2, 5, 4}.
If path
does not exist in the destination file (as may be the case when writing to a new file) then the dataset will be copied directly to the path
and block_coord
will be disregarded.
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:28 AM