Copies data from a specified region in a source dataset to a specified region in a destination dataset.
Procedure:
H5LT_COPY_REGION(file_src, path_src, block_coord_src, file_dest, path_dest, block_coord_dest)
Signature:
herr_t H5LTcopy_region( const char *file_src, const char *path_src, const hsize_t *block_coord_src, const char *file_dest, const char *path_dest, const hsize_t *block_coord_dest )
SUBROUTINE H5LTcopy_region_f(file_src, path_src, block_coord_src, &
file_dest, path_dest, block_coord_dest, error)
IMPLICIT NONE
CHARACTER(LEN=*),INTENT(IN) :: file_src ! Name of the source file
CHARACTER(LEN=*),INTENT(IN) :: path_src ! Full path to the source dataset
INTEGER(hsize_t), DIMENSION(:),INTENT(IN) :: block_coord_src ! Hyperslab coordinates in the source dataset
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 H5LTcopy_region_f
Parameters:
const char *file_src , | IN: Name of the source file |
const char *path_src , | IN: Full path to the source dataset |
const hsize_t *block_coord_src , | IN: Hyperslab coordinates in the source dataset |
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 path to a dataset path_src in a file with the name file_src, and description of a simple hyperslab of the source block_coord_src, the function will write data to the dataset path_dest in file file_dest to the simple hyperslab specified by block_coord_dest. The arrays block_coord_src and block_coord_dest have a length of 2*rank and are 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_dest 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_dest and block_coord_dest 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