Skip to content

Commit

Permalink
specify real kind via preprocessor directive
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwilliams committed Mar 6, 2024
1 parent 70364c3 commit d6d05e4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
25 changes: 25 additions & 0 deletions src/kind_module.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
!*****************************************************************************************
!> author: Jacob Williams
!
! Define the numeric kinds.

module kind_module

use, intrinsic :: iso_fortran_env, only: real32,real64,real128

implicit none

private

#ifdef REAL32
integer,parameter,public :: wp = real32 !! real kind used by this module [4 bytes]
#elif REAL64
integer,parameter,public :: wp = real64 !! real kind used by this module [8 bytes]
#elif REAL128
integer,parameter,public :: wp = real128 !! real kind used by this module [16 bytes]
#else
integer,parameter,public :: wp = real64 !! real kind used by this module [8 bytes]
#endif

end module kind_module
!*****************************************************************************************
19 changes: 0 additions & 19 deletions src/kind_module.f90

This file was deleted.

0 comments on commit d6d05e4

Please sign in to comment.