Skip to content

Commit

Permalink
Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Oct 30, 2023
1 parent 119e694 commit 481b6b6
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
64 changes: 64 additions & 0 deletions fortran/src/H5VLff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,68 @@ END FUNCTION H5VLunregister_connector

END SUBROUTINE H5VLunregister_connector_f

!>
!! \ingroup FH5VL
!!
!! \brief
!!
!! \param loc_id
!! \param addr
!! \param token
!! \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 TODO
!!
!! \param loc_id
!! \param token
!! \param addr
!! \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
2 changes: 2 additions & 0 deletions fortran/src/hdf5_fortrandll.def.in
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,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
Expand Down

0 comments on commit 481b6b6

Please sign in to comment.