summaryrefslogtreecommitdiffstats
path: root/hl/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-09-10 21:18:17 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-09-10 21:18:17 (GMT)
commit672e6bd8a9e666df50f54531a95cdff8dfd4f5c1 (patch)
tree0164e8e30fb521045b108a01477bc35f66b63151 /hl/fortran/src
parent54d0a3694785431dee7a46cab56694cf6ba9bde2 (diff)
downloadhdf5-672e6bd8a9e666df50f54531a95cdff8dfd4f5c1.zip
hdf5-672e6bd8a9e666df50f54531a95cdff8dfd4f5c1.tar.gz
hdf5-672e6bd8a9e666df50f54531a95cdff8dfd4f5c1.tar.bz2
[svn-r27754] HDFFV-548:H5LT patches for F90 Lite API in 1.8.0 Beta
tested: h5committest
Diffstat (limited to 'hl/fortran/src')
-rw-r--r--hl/fortran/src/H5HL_buildiface.F90179
-rw-r--r--hl/fortran/src/H5LTff.F9034
2 files changed, 171 insertions, 42 deletions
diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90
index 0e85e27..9dd879c 100644
--- a/hl/fortran/src/H5HL_buildiface.F90
+++ b/hl/fortran/src/H5HL_buildiface.F90
@@ -83,13 +83,13 @@ PROGRAM H5HL_buildiface
/)
! pointer to the buffer
CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ &
- ' f_ptr = C_LOC(buf) ', &
- ' f_ptr = C_LOC(buf(1)) ', &
- ' f_ptr = C_LOC(buf(1,1)) ', &
- ' f_ptr = C_LOC(buf(1,1,1)) ', &
- ' f_ptr = C_LOC(buf(1,1,1,1)) ', &
- ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', &
- ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', &
+ ' f_ptr = C_LOC(buf )', &
+ ' f_ptr = C_LOC(buf(1) )', &
+ ' f_ptr = C_LOC(buf(1,1) )', &
+ ' f_ptr = C_LOC(buf(1,1,1) )', &
+ ' f_ptr = C_LOC(buf(1,1,1,1) )', &
+ ' f_ptr = C_LOC(buf(1,1,1,1,1) )', &
+ ' f_ptr = C_LOC(buf(1,1,1,1,1,1) )', &
' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' &
/)
@@ -154,6 +154,13 @@ PROGRAM H5HL_buildiface
WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
ENDDO
END DO
+ DO i = 1, num_ikinds
+ j = ikind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_integer_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
WRITE(11,'(A)') " END INTERFACE"
! h5ltread_dataset_f
@@ -165,6 +172,35 @@ PROGRAM H5HL_buildiface
WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
ENDDO
END DO
+ DO i = 1, num_ikinds
+ j = ikind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_integer_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ WRITE(11,'(A)') " END INTERFACE"
+
+! h5ltread_dataset_int_f
+ WRITE(11,'(A)') " INTERFACE h5ltread_dataset_int_f"
+ DO i = 1, num_ikinds
+ j = ikind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_int_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ WRITE(11,'(A)') " END INTERFACE"
+
+! h5ltmake_dataset_int_f
+ WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_int_f"
+ DO i = 1, num_ikinds
+ j = ikind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_int_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
WRITE(11,'(A)') " END INTERFACE"
! h5ltmake_dataset_float_f
@@ -346,7 +382,6 @@ PROGRAM H5HL_buildiface
k = rkind(i)
WRITE(chr2,'(I2)') k
DO j = 1, 8
-
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)'
WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
@@ -402,6 +437,134 @@ PROGRAM H5HL_buildiface
ENDDO
ENDDO
+! h5ltmake_dataset_f
+ DO i = 1, num_ikinds
+ k = ikind(i)
+ WRITE(chr2,'(I2)') k
+ DO j = 1, 8
+
+! DLL definitions for windows
+ WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)'
+ WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ WRITE(11,'(A)') '!DEC$endif'
+
+! Subroutine API
+ WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))&
+ &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,type_id,buf,errcode)'
+ WRITE(11,'(A)') ' IMPLICIT NONE'
+ WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
+ WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
+ WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank'
+ WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
+ WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id'
+ WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
+ WRITE(11,'(A)') ' INTEGER :: errcode '
+ WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
+ WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
+
+ WRITE(11,'(A)') f_ptr_line(j)
+ WRITE(11,'(A)') ' namelen = LEN(dset_name)'
+ WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id, namelen, dset_name, rank, dims, type_id, f_ptr)'
+ WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ ENDDO
+ ENDDO
+
+! h5ltmake_dataset_int_f
+ DO i = 1, num_ikinds
+ k = ikind(i)
+ WRITE(chr2,'(I2)') k
+ DO j = 1, 8
+
+! DLL definitions for windows
+ WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)'
+ WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ WRITE(11,'(A)') '!DEC$endif'
+
+! Subroutine API
+ WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))&
+ &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)'
+ WRITE(11,'(A)') ' IMPLICIT NONE'
+ WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
+ WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
+ WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank'
+ WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
+ WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
+ WRITE(11,'(A)') ' INTEGER :: errcode '
+ WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
+ WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
+ WRITE(11,'(A)') ' INTEGER(hid_t) :: type_id'
+
+ WRITE(11,'(A)') f_ptr_line(j)
+ WRITE(11,'(A)') ' namelen = LEN(dset_name)'
+ WRITE(11,'(A)') ' type_id = h5kind_to_type(KIND('//f_ptr_line(j)(19:36)//'), H5_INTEGER_KIND)'
+ WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id, namelen, dset_name, rank, dims, type_id, f_ptr)'
+ WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ ENDDO
+ ENDDO
+
+! h5ltread_dataset_f
+ DO i = 1, num_ikinds
+ k = ikind(i)
+ WRITE(chr2,'(I2)') k
+ DO j = 1, 8
+
+! DLL definitions for windows
+ WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)'
+ WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ WRITE(11,'(A)') '!DEC$endif'
+
+! Subroutine API
+ WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))&
+ &//'_rank'//chr_rank(j)//'(loc_id,dset_name, type_id, buf,dims,errcode)'
+ WRITE(11,'(A)') ' IMPLICIT NONE'
+ WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
+ WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
+ WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
+ WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id'
+ WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
+ WRITE(11,'(A)') ' INTEGER :: errcode '
+ WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
+ WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
+
+ WRITE(11,'(A)') f_ptr_line(j)
+ WRITE(11,'(A)') ' namelen = LEN(dset_name)'
+ WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id, namelen, dset_name, type_id, f_ptr)'
+ WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ ENDDO
+ ENDDO
+
+! h5ltread_dataset_int_f
+ DO i = 1, num_ikinds
+ k = ikind(i)
+ WRITE(chr2,'(I2)') k
+ DO j = 1, 8
+
+! DLL definitions for windows
+ WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)'
+ WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ WRITE(11,'(A)') '!DEC$endif'
+
+! Subroutine API
+ WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))&
+ &//'_rank'//chr_rank(j)//'(loc_id,dset_name, buf,dims,errcode)'
+ WRITE(11,'(A)') ' IMPLICIT NONE'
+ WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
+ WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
+ WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
+ WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
+ WRITE(11,'(A)') ' INTEGER :: errcode '
+ WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
+ WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
+ WRITE(11,'(A)') ' INTEGER(hid_t) :: type_id'
+
+ WRITE(11,'(A)') f_ptr_line(j)
+ WRITE(11,'(A)') ' namelen = LEN(dset_name)'
+ WRITE(11,'(A)') ' type_id = h5kind_to_type(KIND('//f_ptr_line(j)(19:36)//'), H5_INTEGER_KIND)'
+ WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id, namelen, dset_name, type_id, f_ptr)'
+ WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j)
+ ENDDO
+ ENDDO
+
WRITE(11,'(A)') 'END MODULE H5LT' ! change this to be generic MSB
CLOSE(11)
diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90
index ffc7ab5..d36d92c 100644
--- a/hl/fortran/src/H5LTff.F90
+++ b/hl/fortran/src/H5LTff.F90
@@ -38,47 +38,13 @@ MODULE H5LT_CONST
USE hdf5
INTERFACE h5ltmake_dataset_f
- MODULE PROCEDURE h5ltmake_dataset_f_int1
- MODULE PROCEDURE h5ltmake_dataset_f_int2
- MODULE PROCEDURE h5ltmake_dataset_f_int3
- MODULE PROCEDURE h5ltmake_dataset_f_int4
- MODULE PROCEDURE h5ltmake_dataset_f_int5
- MODULE PROCEDURE h5ltmake_dataset_f_int6
- MODULE PROCEDURE h5ltmake_dataset_f_int7
MODULE PROCEDURE h5ltmake_dataset_f_ptr
END INTERFACE
INTERFACE h5ltread_dataset_f
- MODULE PROCEDURE h5ltread_dataset_f_int1
- MODULE PROCEDURE h5ltread_dataset_f_int2
- MODULE PROCEDURE h5ltread_dataset_f_int3
- MODULE PROCEDURE h5ltread_dataset_f_int4
- MODULE PROCEDURE h5ltread_dataset_f_int5
- MODULE PROCEDURE h5ltread_dataset_f_int6
- MODULE PROCEDURE h5ltread_dataset_f_int7
MODULE PROCEDURE h5ltread_dataset_f_ptr
END INTERFACE
- INTERFACE h5ltmake_dataset_int_f
- MODULE PROCEDURE h5ltmake_dataset_int_f_1
- MODULE PROCEDURE h5ltmake_dataset_int_f_2
- MODULE PROCEDURE h5ltmake_dataset_int_f_3
- MODULE PROCEDURE h5ltmake_dataset_int_f_4
- MODULE PROCEDURE h5ltmake_dataset_int_f_5
- MODULE PROCEDURE h5ltmake_dataset_int_f_6
- MODULE PROCEDURE h5ltmake_dataset_int_f_7
- END INTERFACE
-
- INTERFACE h5ltread_dataset_int_f
- MODULE PROCEDURE h5ltread_dataset_int_f_1
- MODULE PROCEDURE h5ltread_dataset_int_f_2
- MODULE PROCEDURE h5ltread_dataset_int_f_3
- MODULE PROCEDURE h5ltread_dataset_int_f_4
- MODULE PROCEDURE h5ltread_dataset_int_f_5
- MODULE PROCEDURE h5ltread_dataset_int_f_6
- MODULE PROCEDURE h5ltread_dataset_int_f_7
- END INTERFACE
-
INTERFACE
INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) &
BIND(C,NAME='h5ltmake_dataset_c')