diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-09-07 22:25:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 22:25:07 (GMT) |
commit | 08e115b7d8f95551be8bede824847997d95d0cf1 (patch) | |
tree | a377c6607419278eaafc8cf3043608f93afe1ad7 /fortran/src/H5Sff.F90 | |
parent | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (diff) | |
download | hdf5-08e115b7d8f95551be8bede824847997d95d0cf1.zip hdf5-08e115b7d8f95551be8bede824847997d95d0cf1.tar.gz hdf5-08e115b7d8f95551be8bede824847997d95d0cf1.tar.bz2 |
Added new Fortran API wrappers (#3511)
* Added new wrappers for
h5get_free_list_sizes_f
H5Sselect_intersect_block_f
H5Sselect_shape_same_f
h5pget_no_selection_io_cause_f
h5pget_mpio_no_collective_cause_f
H5Lvisit_by_name_f
H5Lvisit_f
H5Fget_info_f
h5dwrite_chunk_f
h5dread_chunk_f
* added h5pget_file_space_page_size_f, h5pset_file_space_page_size_f, h5pget_file_space_strategy_f, h5pset_file_space_strategy_f, h5info tests
* added fortran tests
* Update tH5F.F90
Diffstat (limited to 'fortran/src/H5Sff.F90')
-rw-r--r-- | fortran/src/H5Sff.F90 | 87 |
1 files changed, 86 insertions, 1 deletions
diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index fff32c0..5a1ca53 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -439,6 +439,91 @@ CONTAINS !> !! \ingroup FH5S !! +!! \brief Checks if two selections are the same shape. +!! +!! \param space1_id Dataspace identifier +!! \param space2_id Dataspace identifier +!! \param same Value of check +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5Sselect_shape_same() +!! + SUBROUTINE H5Sselect_shape_same_f(space1_id, space2_id, same, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + LOGICAL , INTENT(OUT) :: same + INTEGER , INTENT(OUT) :: hdferr + + INTEGER(C_INT) :: c_same + + INTERFACE + INTEGER(C_INT) FUNCTION H5Sselect_shape_same(space1_id, space2_id) BIND(C,NAME='H5Sselect_shape_same') + IMPORT :: C_INT, HID_T + IMPLICIT NONE + INTEGER(HID_T), VALUE :: space1_id + INTEGER(HID_T), VALUE :: space2_id + END FUNCTION H5Sselect_shape_same + END INTERFACE + + c_same = H5Sselect_shape_same(space1_id, space2_id) + + same = .FALSE. + IF(c_same .GT. 0_C_INT) same = .TRUE. + + hdferr = 0 + IF(c_same .LT. 0_C_INT) hdferr = -1 + + END SUBROUTINE H5Sselect_shape_same_f + +!> +!! \ingroup FH5S +!! +!! \brief Checks if current selection intersects with a block. +!! +!! \param space_id Dataspace identifier +!! \param istart Starting coordinate of the block +!! \param iend Opposite ("ending") coordinate of the block +!! \param intersects Dataspace intersects with the block specified +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5Sselect_intersect_block() +!! + + SUBROUTINE H5Sselect_intersect_block_f(space_id, istart, iend, intersects, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: istart + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: iend + LOGICAL, INTENT(OUT) :: intersects + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(C_INT) :: c_intersects + + INTERFACE + INTEGER(C_INT) FUNCTION H5Sselect_intersect_block(space_id, istart, iend) & + BIND(C,NAME='H5Sselect_intersect_block') + IMPORT :: C_INT, HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), VALUE :: space_id + INTEGER(HSIZE_T), DIMENSION(*) :: istart + INTEGER(HSIZE_T), DIMENSION(*) :: iend + END FUNCTION H5Sselect_intersect_block + END INTERFACE + + c_intersects = H5Sselect_intersect_block(space_id, istart, iend) + + intersects = .FALSE. + IF(c_intersects .GT. 0_C_INT) intersects = .TRUE. + + hdferr = 0 + IF(c_intersects .LT. 0_C_INT) hdferr = -1 + + END SUBROUTINE H5Sselect_intersect_block_f + +!> +!! \ingroup FH5S +!! !! \brief Resets the selection region to include no elements. !! !! \param space_id The identifier for the dataspace in which the selection is being reset. @@ -808,7 +893,7 @@ CONTAINS !! \param operator Flag, valid values are: !! \li H5S_SELECT_SET_F !! \li H5S_SELECT_OR_F -!! \param start Array with hyperslab offsets. +!! \param start Array with hyperslab offsets, \Bold{0-based indices}. !! \param count Number of blocks included in the hyperslab. !! \param hdferr \fortran_error !! \param stride Array with hyperslab strides. |