[svn-r27754] HDFFV-548:H5LT patches for F90 Lite API in 1.8.0 Beta

tested: h5committest
This commit is contained in:
Scot Breitenfeld 2015-09-10 16:18:17 -05:00
parent 54d0a36947
commit 672e6bd8a9
3 changed files with 903 additions and 569 deletions

View File

@ -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)

View File

@ -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')

File diff suppressed because it is too large Load Diff