diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-04-21 16:53:40 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-04-21 16:53:40 (GMT) |
commit | 6813b25007280afa9b8bec13c19c134029acd26c (patch) | |
tree | f2462aa00644888fa0798b11125bf8be29726339 /fortran/src/H5Dff.F90 | |
parent | c88f2abea5c4295cd20564fede8b3010933c0e6f (diff) | |
download | hdf5-6813b25007280afa9b8bec13c19c134029acd26c.zip hdf5-6813b25007280afa9b8bec13c19c134029acd26c.tar.gz hdf5-6813b25007280afa9b8bec13c19c134029acd26c.tar.bz2 |
[svn-r26866] Removed the default REAL and DOUBLE PRECESION dependency.
Diffstat (limited to 'fortran/src/H5Dff.F90')
-rw-r--r-- | fortran/src/H5Dff.F90 | 772 |
1 files changed, 701 insertions, 71 deletions
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 411a3bf..a7120f6 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -81,7 +81,7 @@ MODULE H5D - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC USE H5GLOBAL INTERFACE h5dextend_f @@ -120,14 +120,22 @@ MODULE H5D MODULE PROCEDURE h5dwrite_char_5 MODULE PROCEDURE h5dwrite_char_6 MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 + MODULE PROCEDURE h5dwrite_c_float_scalar + MODULE PROCEDURE h5dwrite_c_float_1 + MODULE PROCEDURE h5dwrite_c_float_2 + MODULE PROCEDURE h5dwrite_c_float_3 + MODULE PROCEDURE h5dwrite_c_float_4 + MODULE PROCEDURE h5dwrite_c_float_5 + MODULE PROCEDURE h5dwrite_c_float_6 + MODULE PROCEDURE h5dwrite_c_float_7 + MODULE PROCEDURE h5dwrite_c_double_scalar + MODULE PROCEDURE h5dwrite_c_double_1 + MODULE PROCEDURE h5dwrite_c_double_2 + MODULE PROCEDURE h5dwrite_c_double_3 + MODULE PROCEDURE h5dwrite_c_double_4 + MODULE PROCEDURE h5dwrite_c_double_5 + MODULE PROCEDURE h5dwrite_c_double_6 + MODULE PROCEDURE h5dwrite_c_double_7 ! This is the preferred way to call h5dwrite ! by passing an address @@ -155,14 +163,22 @@ MODULE H5D MODULE PROCEDURE h5dread_char_5 MODULE PROCEDURE h5dread_char_6 MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 + MODULE PROCEDURE h5dread_c_float_scalar + MODULE PROCEDURE h5dread_c_float_1 + MODULE PROCEDURE h5dread_c_float_2 + MODULE PROCEDURE h5dread_c_float_3 + MODULE PROCEDURE h5dread_c_float_4 + MODULE PROCEDURE h5dread_c_float_5 + MODULE PROCEDURE h5dread_c_float_6 + MODULE PROCEDURE h5dread_c_float_7 + MODULE PROCEDURE h5dread_c_double_scalar + MODULE PROCEDURE h5dread_c_double_1 + MODULE PROCEDURE h5dread_c_double_2 + MODULE PROCEDURE h5dread_c_double_3 + MODULE PROCEDURE h5dread_c_double_4 + MODULE PROCEDURE h5dread_c_double_5 + MODULE PROCEDURE h5dread_c_double_6 + MODULE PROCEDURE h5dread_c_double_7 ! This is the preferred way to call h5dread ! by passing an address @@ -170,6 +186,7 @@ MODULE H5D END INTERFACE + ! Interface for the function used to pass the C pointer of the buffer ! to the C H5Dwrite routine @@ -212,7 +229,8 @@ MODULE H5D INTERFACE h5dfill_f MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_c_float + MODULE PROCEDURE h5dfill_c_double MODULE PROCEDURE h5dfill_char END INTERFACE @@ -1862,14 +1880,14 @@ CONTAINS END SUBROUTINE h5dwrite_char_7 - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -1890,17 +1908,17 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_scalar + END SUBROUTINE h5dwrite_c_float_scalar - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1923,16 +1941,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_1 + END SUBROUTINE h5dwrite_c_float_1 - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1956,16 +1974,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_2 + END SUBROUTINE h5dwrite_c_float_2 - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1988,16 +2006,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_3 + END SUBROUTINE h5dwrite_c_float_3 - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2020,16 +2038,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_4 + END SUBROUTINE h5dwrite_c_float_4 - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2052,16 +2070,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_5 + END SUBROUTINE h5dwrite_c_float_5 - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2084,16 +2102,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_6 + END SUBROUTINE h5dwrite_c_float_6 - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2116,7 +2134,7 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_7 + END SUBROUTINE h5dwrite_c_float_7 ! ! NAME @@ -2807,7 +2825,7 @@ CONTAINS END SUBROUTINE h5dread_char_7 - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -2815,7 +2833,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + REAL(KIND=C_FLOAT), INTENT(INOUT), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -2837,16 +2855,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_scalar + END SUBROUTINE h5dread_c_float_scalar - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2869,16 +2887,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_1 + END SUBROUTINE h5dread_c_float_1 - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2901,16 +2919,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_2 + END SUBROUTINE h5dread_c_float_2 - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2933,16 +2951,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_3 + END SUBROUTINE h5dread_c_float_3 - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2965,16 +2983,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_4 + END SUBROUTINE h5dread_c_float_4 - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2997,9 +3015,9 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_5 + END SUBROUTINE h5dread_c_float_5 - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -3007,7 +3025,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -3030,16 +3048,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_6 + END SUBROUTINE h5dread_c_float_6 - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -3063,7 +3081,571 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_7 + END SUBROUTINE h5dread_c_float_7 + + SUBROUTINE h5dread_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_scalar + + SUBROUTINE h5dread_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_1 + + SUBROUTINE h5dread_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_2 + + SUBROUTINE h5dread_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_3 + + SUBROUTINE h5dread_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_4 + + SUBROUTINE h5dread_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_5 + + SUBROUTINE h5dread_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_6 + + SUBROUTINE h5dread_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_7 + + SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_scalar + + SUBROUTINE h5dwrite_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_1 + + SUBROUTINE h5dwrite_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_2 + + SUBROUTINE h5dwrite_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_3 + + SUBROUTINE h5dwrite_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_4 + + SUBROUTINE h5dwrite_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_5 + + SUBROUTINE h5dwrite_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_6 + + SUBROUTINE h5dwrite_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_7 !****s* H5D (F03)/h5dwrite_f_F03 ! @@ -3247,7 +3829,7 @@ CONTAINS ! ! NAME -! h5dfill_real +! h5dfill_c_float ! ! PURPOSE ! Fills dataspace elements with a fill value in a memory buffer. @@ -3270,12 +3852,12 @@ CONTAINS ! Elena Pourmal ! March 12, 2003 ! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + REAL(KIND=C_FLOAT), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier @@ -3293,7 +3875,55 @@ CONTAINS hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & f_ptr_buf, mem_type_id) - END SUBROUTINE h5dfill_real + END SUBROUTINE h5dfill_c_float + + !---------------------------------------------------------------------- + ! Name: h5dfill_c_double + ! + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! of the fillvalues and buffers are supported. Buffer and fillvalue + ! are assumed to have the same datatype. + ! Only one-dimesional buffers are supported. + ! + ! Inputs: + ! fill_value - fill value + ! space_id - memory space selection identifier + ! buf - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_c_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_double ! ! NAME |