summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Dff.F90
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Dff.F90')
-rw-r--r--fortran/src/H5Dff.F90104
1 files changed, 103 insertions, 1 deletions
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index d15e59e..1e88399 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -1098,7 +1098,7 @@ CONTAINS
!>
!! \ingroup FH5D
!!
-!! \brief Writes raw data from a dataset into a buffer.
+!! \brief Writes raw data from a buffer to a dataset.
!!
!! \attention \fortran_approved
!!
@@ -1762,6 +1762,108 @@ CONTAINS
CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr)
END SUBROUTINE h5dfill_char
+!>
+!! \ingroup FH5D
+!!
+!! \brief Reads data from a file to memory buffers for multiple datasets.
+!!
+!! \param count Number of datasets to write to.
+!! \param dset_id Identifier of the dataset to write to.
+!! \param mem_type_id Identifier of the memory datatype.
+!! \param mem_space_id Identifier of the memory dataspace.
+!! \param file_space_id Identifier of the dataset's dataspace in the file.
+!! \param buf Buffer with data to be written to the file.
+!! \param hdferr \fortran_error
+!! \param xfer_prp Identifier of a transfer property list for this I/O operation.
+!!
+ SUBROUTINE H5Dread_multi_f(count, dset_id, mem_type_id, mem_space_id, file_space_id, buf, hdferr, xfer_prp)
+ IMPLICIT NONE
+
+ INTEGER(SIZE_T), INTENT(IN) :: count
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: dset_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_space_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: file_space_id
+ TYPE(C_PTR), DIMENSION(*) :: buf
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
+
+ INTEGER(HID_T) :: xfer_prp_default
+
+ INTERFACE
+ INTEGER FUNCTION H5Dread_multi(count, dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf) &
+ BIND(C, NAME='H5Dread_multi')
+ IMPORT :: SIZE_T
+ IMPORT :: HID_T
+ IMPORT :: C_PTR
+ IMPLICIT NONE
+ INTEGER(SIZE_T), VALUE :: count
+ INTEGER(HID_T), DIMENSION(*) :: dset_id
+ INTEGER(HID_T), DIMENSION(*) :: mem_type_id
+ INTEGER(HID_T), DIMENSION(*) :: mem_space_id
+ INTEGER(HID_T), DIMENSION(*) :: file_space_id
+ INTEGER(HID_T), VALUE :: xfer_prp
+ TYPE(C_PTR), DIMENSION(*) :: buf
+ END FUNCTION H5Dread_multi
+ END INTERFACE
+
+ xfer_prp_default = H5P_DEFAULT_F
+ IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
+
+ hdferr = H5Dread_multi(count, dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp_default, buf)
+
+ END SUBROUTINE H5Dread_multi_f
+!>
+!! \ingroup FH5D
+!!
+!! \brief Writes data in memory to a file for multiple datasets.
+!!
+!! \param count Number of datasets to write to.
+!! \param dset_id Identifier of the dataset to write to.
+!! \param mem_type_id Identifier of the memory datatype.
+!! \param mem_space_id Identifier of the memory dataspace.
+!! \param file_space_id Identifier of the dataset's dataspace in the file.
+!! \param buf Buffer with data to be written to the file.
+!! \param hdferr \fortran_error
+!! \param xfer_prp Identifier of a transfer property list for this I/O operation.
+!!
+ SUBROUTINE H5Dwrite_multi_f(count, dset_id, mem_type_id, mem_space_id, file_space_id, buf, hdferr, xfer_prp)
+ IMPLICIT NONE
+
+ INTEGER(SIZE_T), INTENT(IN) :: count
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: dset_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_space_id
+ INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: file_space_id
+ TYPE(C_PTR), DIMENSION(*) :: buf
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
+
+ INTEGER(HID_T) :: xfer_prp_default
+
+ INTERFACE
+ INTEGER FUNCTION H5Dwrite_multi(count, dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf) &
+ BIND(C, NAME='H5Dwrite_multi')
+ IMPORT :: SIZE_T
+ IMPORT :: HID_T
+ IMPORT :: C_PTR
+ IMPLICIT NONE
+ INTEGER(SIZE_T), VALUE :: count
+ INTEGER(HID_T), DIMENSION(*) :: dset_id
+ INTEGER(HID_T), DIMENSION(*) :: mem_type_id
+ INTEGER(HID_T), DIMENSION(*) :: mem_space_id
+ INTEGER(HID_T), DIMENSION(*) :: file_space_id
+ INTEGER(HID_T), VALUE :: xfer_prp
+ TYPE(C_PTR), DIMENSION(*) :: buf
+ END FUNCTION H5Dwrite_multi
+ END INTERFACE
+
+ xfer_prp_default = H5P_DEFAULT_F
+ IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
+
+ hdferr = H5Dwrite_multi(count, dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp_default, buf)
+
+ END SUBROUTINE H5Dwrite_multi_f
#endif