summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pff.F90
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Pff.F90')
-rw-r--r--fortran/src/H5Pff.F90257
1 files changed, 222 insertions, 35 deletions
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index b595100..3ec6e93 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -1,12 +1,10 @@
-!****h* ROBODoc/H5P (F90)
+!****h* ROBODoc/H5Pff
!
! NAME
-! H5P_PROVISIONAL
+! H5P
!
! PURPOSE
-! This file contains Fortran interfaces for H5P functions. It includes
-! all the functions that are independent on whether the Fortran 2003 functions
-! are enabled or disabled.
+! This file contains Fortran interfaces for H5P functions.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -36,7 +34,7 @@
MODULE H5P
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, &
- c_char, c_int, C_NULL_CHAR, C_LOC
+ c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT
USE H5GLOBAL
INTERFACE h5pset_fapl_multi_f
@@ -46,7 +44,8 @@ MODULE H5P
INTERFACE h5pset_fill_value_f
MODULE PROCEDURE h5pset_fill_value_integer
- MODULE PROCEDURE h5pset_fill_value_real
+ MODULE PROCEDURE h5pset_fill_value_c_float
+ MODULE PROCEDURE h5pset_fill_value_c_double
MODULE PROCEDURE h5pset_fill_value_char
! Recommended procedure:
MODULE PROCEDURE h5pset_fill_value_ptr
@@ -55,7 +54,8 @@ MODULE H5P
INTERFACE h5pget_fill_value_f
MODULE PROCEDURE h5pget_fill_value_integer
- MODULE PROCEDURE h5pget_fill_value_real
+ MODULE PROCEDURE h5pget_fill_value_c_float
+ MODULE PROCEDURE h5pget_fill_value_c_double
MODULE PROCEDURE h5pget_fill_value_char
! Recommended procedure:
MODULE PROCEDURE h5pget_fill_value_ptr
@@ -64,7 +64,8 @@ MODULE H5P
INTERFACE h5pset_f
MODULE PROCEDURE h5pset_integer
- MODULE PROCEDURE h5pset_real
+ MODULE PROCEDURE h5pset_c_float
+ MODULE PROCEDURE h5pset_c_double
MODULE PROCEDURE h5pset_char
! Recommended procedure:
MODULE PROCEDURE h5pset_ptr
@@ -73,23 +74,24 @@ MODULE H5P
INTERFACE h5pget_f
MODULE PROCEDURE h5pget_integer
- MODULE PROCEDURE h5pget_real
- MODULE PROCEDURE h5pget_char
+ MODULE PROCEDURE h5pget_c_float
+ MODULE PROCEDURE h5pget_c_double
! Recommended procedure:
MODULE PROCEDURE h5pget_ptr
END INTERFACE
INTERFACE h5pregister_f
MODULE PROCEDURE h5pregister_integer
- MODULE PROCEDURE h5pregister_real
- MODULE PROCEDURE h5pregister_char
+ MODULE PROCEDURE h5pregister_c_float
+ MODULE PROCEDURE h5pregister_c_double
! Recommended procedure:
MODULE PROCEDURE h5pregister_ptr
END INTERFACE
INTERFACE h5pinsert_f
MODULE PROCEDURE h5pinsert_integer
- MODULE PROCEDURE h5pinsert_real
+ MODULE PROCEDURE h5pinsert_c_float
+ MODULE PROCEDURE h5pinsert_c_double
MODULE PROCEDURE h5pinsert_char
! Recommended procedure:
MODULE PROCEDURE h5pinsert_ptr
@@ -6257,38 +6259,65 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pget_fill_value_integer
- SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr)
+ SUBROUTINE h5pset_fill_value_c_float(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
! of fillvalue datatype
! (in memory)
- REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue
+ REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fillvalue ! Fillvalue
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr ! C address
f_ptr = C_LOC(fillvalue)
-
hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
- END SUBROUTINE h5pset_fill_value_real
+ END SUBROUTINE h5pset_fill_value_c_float
+ SUBROUTINE h5pset_fill_value_c_double(prp_id, type_id, fillvalue, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
+ ! of fillvalue datatype
+ ! (in memory)
+ REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ TYPE(C_PTR) :: f_ptr ! C address
- SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr)
+ f_ptr = C_LOC(fillvalue)
+ hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
+ END SUBROUTINE h5pset_fill_value_c_double
+
+ SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
! of fillvalue datatype
! (in memory)
- REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue
+ REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: fillvalue ! Fillvalue
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr ! C address
f_ptr = C_LOC(fillvalue)
+ hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
+
+ END SUBROUTINE h5pget_fill_value_c_float
+ SUBROUTINE h5pget_fill_value_c_double(prp_id, type_id, fillvalue, &
+ hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
+ ! of fillvalue datatype
+ ! (in memory)
+ REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ TYPE(C_PTR) :: f_ptr ! C address
+
+ f_ptr = C_LOC(fillvalue)
hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
- END SUBROUTINE h5pget_fill_value_real
+ END SUBROUTINE h5pget_fill_value_c_double
SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
@@ -6301,7 +6330,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
TYPE(C_PTR) :: f_ptr ! C address
f_ptr = C_LOC(fillvalue)
-
hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
END SUBROUTINE h5pset_fill_value_char
@@ -6331,7 +6359,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
ENDIF
f_ptr = C_LOC(chr(1)(1:1))
-
hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
DO i = 1, chr_len
@@ -6500,11 +6527,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pset_integer
- SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
+ SUBROUTINE h5pset_c_float(prp_id, name, value, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify
- REAL, INTENT(IN), TARGET :: value ! Property value
+ REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER :: name_len
TYPE(C_PTR) :: f_ptr
@@ -6514,7 +6541,45 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
name_len = LEN(name)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
- END SUBROUTINE h5pset_real
+ END SUBROUTINE h5pset_c_float
+
+!
+!****s* H5P (F90)/h5pset_c_double
+!
+! NAME
+! h5pset_c_double
+!
+! PURPOSE
+! Sets a property list value
+!
+! INPUTS
+! prp_id - iproperty list identifier to modify
+! name - name of property to modify
+! value - value to set property to
+! OUTPUTS
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! AUTHOR
+! Elena Pourmal
+! October 9, 2002
+! SOURCE
+ SUBROUTINE h5pset_c_double(prp_id, name, value, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
+ REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+!*****
+ INTEGER :: name_len
+ TYPE(C_PTR) :: f_ptr ! C address
+
+ f_ptr = C_LOC(value)
+
+ name_len = LEN(name)
+ hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
+
+ END SUBROUTINE h5pset_c_double
SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
IMPLICIT NONE
@@ -6599,11 +6664,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pget_integer
- SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
+ SUBROUTINE h5pget_c_float(prp_id, name, value, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
- REAL, INTENT(OUT), TARGET :: value ! Property value
+ REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: value ! Property value
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER :: name_len
TYPE(C_PTR) :: f_ptr
@@ -6612,7 +6677,44 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
name_len = LEN(name)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
- END SUBROUTINE h5pget_real
+ END SUBROUTINE h5pget_c_float
+
+!****s* H5P (F90)/h5pget_c_double
+!
+! NAME
+! h5pget_c_double
+!
+! PURPOSE
+! Gets a property list value
+!
+! INPUTS
+! prp_id - iproperty list identifier to modify
+! name - name of property to modify
+! OUTPUTS
+! value - value of property
+! hdferr - error code
+! Success: 0
+! Failure: -1
+! AUTHOR
+! Elena Pourmal
+! October 9, 2002
+!
+! SOURCE
+ SUBROUTINE h5pget_c_double(prp_id, name, value, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
+ REAL(KIND=C_DOUBLE), INTENT(OUT), TARGET :: value ! Property value
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+!*****
+ INTEGER :: name_len
+ TYPE(C_PTR) :: f_ptr ! C address
+
+ f_ptr = C_LOC(value)
+
+ name_len = LEN(name)
+ hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
+ END SUBROUTINE h5pget_c_double
SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
IMPLICIT NONE
@@ -6778,12 +6880,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pregister_integer
- SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
+ SUBROUTINE h5pregister_c_float(class, name, size, value, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register
INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value
- REAL, INTENT(IN), TARGET :: value ! Property value
+ REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER :: name_len
TYPE(C_PTR) :: f_ptr
@@ -6793,7 +6895,51 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
name_len = LEN(name)
hdferr = h5pregister_c(class, name, name_len, size, f_ptr)
- END SUBROUTINE h5pregister_real
+ END SUBROUTINE h5pregister_c_float
+
+!
+!****s* H5P (F90)/h5pregister_c_double
+!
+! NAME
+! h5pregister_c_double
+!
+! PURPOSE
+! Registers a permanent property with a property list class.
+!
+! INPUTS
+! class - property list class to register
+! permanent property within
+! name - name of property to register
+! size - size of property in bytes
+! value - default value for property in newly
+! created property lists
+! OUTPUTS
+! hdferr - error code
+! Success: 0
+! Failure: -1
+! AUTHOR
+! Elena Pourmal
+! October 10, 2002
+!
+! SOURCE
+ SUBROUTINE h5pregister_c_double(class, name, size, value, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier
+ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register
+ INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value
+ REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+!*****
+ INTEGER :: name_len
+ TYPE(C_PTR) :: f_ptr ! C address
+
+
+ f_ptr = C_LOC(value)
+
+ name_len = LEN(name)
+ hdferr = h5pregister_c(class, name, name_len, size, f_ptr)
+
+ END SUBROUTINE h5pregister_c_double
SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
IMPLICIT NONE
@@ -6921,13 +7067,54 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)
END SUBROUTINE h5pinsert_integer
- SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
+ SUBROUTINE h5pinsert_c_float(plist, name, size, value, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier
+ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert
+ INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value
+ REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER :: name_len
+ TYPE(c_ptr) :: f_ptr
+
+ f_ptr = c_loc(value)
+
+ name_len = LEN(name)
+ hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)
+
+ END SUBROUTINE h5pinsert_c_float
+
+!****s* H5P (F90)/h5pinsert_c_double
+!
+! NAME
+!
+! h5pinsert_c_double
+!
+! PURPOSE
+! Registers a temporary property with a property list class.
+!
+! INPUTS
+! plist - property list identifier
+! permanent property within
+! name - name of property to insert
+! size - size of property in bytes
+! value - initial value for the property
+! OUTPUTS
+! hdferr - error code
+! Success: 0
+! Failure: -1
+! AUTHOR
+! Elena Pourmal
+! October 10, 2002
+! SOURCE
+ SUBROUTINE h5pinsert_c_double(plist, name, size, value, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert
INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value
- REAL, INTENT(IN), TARGET :: value ! Property value
+ REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value
INTEGER, INTENT(OUT) :: hdferr ! Error code
+!*****
INTEGER :: name_len
TYPE(c_ptr) :: f_ptr
@@ -6936,7 +7123,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
name_len = LEN(name)
hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)
- END SUBROUTINE h5pinsert_real
+ END SUBROUTINE h5pinsert_c_double
SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
IMPLICIT NONE