diff options
Diffstat (limited to 'fortran/src/H5test_kind.f90')
-rw-r--r-- | fortran/src/H5test_kind.f90 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 index db2971e..1f5dca3 100644 --- a/fortran/src/H5test_kind.f90 +++ b/fortran/src/H5test_kind.f90 @@ -23,11 +23,36 @@ ! Generate a program write(*,*) "program int_kind" write(*,*) "write(*,*) "" /*generating header file*/ """ + j = 0 + write(*, "("" call i"", i2.2,""()"")") j do i = 1, ii j = kind_numbers(i) write(*, "("" call i"", i2.2,""()"")") j enddo write(*,*) "end program int_kind" + j = 0 + write(*, "("" subroutine i"" i2.2,""()"")") j + write(*,*)" implicit none" + write(*,*)" integer :: a" + write(*,*)" integer :: a_size" + write(*,*)" a_size = bit_size(a)" + write(*,*)" if (a_size .eq. 8) then" + write(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_NATIVE_1"" " + write(*,*)" endif" + write(*,*)" if (a_size .eq. 16) then" + write(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_NATIVE_2"" " + write(*,*)" endif" + write(*,*)" if (a_size .eq. 32) then" + write(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_NATIVE_4"" " + write(*,*)" endif" + write(*,*)" if (a_size .eq. 64) then" + write(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_NATIVE_8"" " + write(*,*)" endif" + write(*,*)" if (a_size .eq. 128) then" + write(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_NATIVE_16"" " + write(*,*)" endif" + write(*,*)" return" + write(*,*)" end subroutine" do i = 1, ii j = kind_numbers(i) write(*, "("" subroutine i"" i2.2,""()"")") j |