diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-11-03 16:22:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 16:22:00 (GMT) |
commit | 6a3c859e5857860f66b4bd20c0c7d57f3fb50724 (patch) | |
tree | 093c1313dc72af1cd53ef8942a9adc75e4b49c1f /fortran/src | |
parent | 5e787741cdc991eb0011c9393152c1678ca737a8 (diff) | |
download | hdf5-6a3c859e5857860f66b4bd20c0c7d57f3fb50724.zip hdf5-6a3c859e5857860f66b4bd20c0c7d57f3fb50724.tar.gz hdf5-6a3c859e5857860f66b4bd20c0c7d57f3fb50724.tar.bz2 |
Fortran Wrappers H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f (#3801)
* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f
* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f tests
* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f tests
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5VLff.F90 | 64 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 2 |
2 files changed, 66 insertions, 0 deletions
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90 index 5a1fa9f..4467a59 100644 --- a/fortran/src/H5VLff.F90 +++ b/fortran/src/H5VLff.F90 @@ -401,4 +401,68 @@ CONTAINS END SUBROUTINE H5VLunregister_connector_f +!> +!! \ingroup FH5VL +!! +!! \brief Retrieves the token representation from an address for a location identifier. +!! +!! \param loc_id Specifies a location identifier +!! \param addr Address for object in the file +!! \param token Token representing the object in the file +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5VLnative_addr_to_token() +!! + SUBROUTINE h5vlnative_addr_to_token_f(loc_id, addr, token, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + INTEGER(HADDR_T) , INTENT(IN) :: addr + TYPE(H5O_TOKEN_T_F), INTENT(OUT) :: token + INTEGER , INTENT(OUT) :: hdferr + + INTERFACE + INTEGER(C_INT) FUNCTION H5VLnative_addr_to_token(loc_id, addr, token) BIND(C, NAME='H5VLnative_addr_to_token') + IMPORT :: HID_T, C_INT, HADDR_T, H5O_TOKEN_T_F + INTEGER(HID_T) , VALUE :: loc_id + INTEGER(HADDR_T), VALUE :: addr + TYPE(H5O_TOKEN_T_F) :: token + END FUNCTION H5VLnative_addr_to_token + END INTERFACE + + hdferr = INT(H5VLnative_addr_to_token(loc_id, addr, token)) + + END SUBROUTINE h5vlnative_addr_to_token_f + +!> +!! \ingroup FH5VL +!! +!! \brief Retrieves the object address from a token representation for a location identifier. +!! +!! \param loc_id Specifies a location identifier +!! \param token Token representing the object in the file +!! \param addr Address for object in the file +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5VLnative_token_to_addr() +!! + SUBROUTINE h5vlnative_token_to_addr_f(loc_id, token, addr, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token + INTEGER(HADDR_T) , INTENT(OUT) :: addr + INTEGER , INTENT(OUT) :: hdferr + + INTERFACE + INTEGER(C_INT) FUNCTION H5VLnative_token_to_addr(loc_id, token, addr) BIND(C, NAME='H5VLnative_token_to_addr') + IMPORT :: HID_T, C_INT, HADDR_T, H5O_TOKEN_T_F + INTEGER(HID_T) , VALUE :: loc_id + TYPE(H5O_TOKEN_T_F), VALUE :: token + INTEGER(HADDR_T) :: addr + END FUNCTION H5VLnative_token_to_addr + END INTERFACE + + hdferr = INT(H5VLnative_token_to_addr(loc_id, token, addr)) + + END SUBROUTINE h5vlnative_token_to_addr_f + END MODULE H5VL diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 0080177..a8399a3 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -553,6 +553,8 @@ H5VL_mp_H5VLGET_CONNECTOR_ID_BY_VALUE_F H5VL_mp_H5VLGET_CONNECTOR_NAME_F H5VL_mp_H5VLCLOSE_F H5VL_mp_H5VLUNREGISTER_CONNECTOR_F +H5VL_mp_H5VLNATIVE_ADDR_TO_TOKEN_F +H5VL_mp_H5VLNATIVE_TOKEN_TO_ADDR_F ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F |