Skip to content

Commit

Permalink
added specification of real kinds via preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwilliams committed Dec 27, 2023
1 parent e581804 commit a11a9ed
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
32 changes: 32 additions & 0 deletions src/lsqr_kinds.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
!***************************************************************************************************
!>
! Module for LSQR kinds and parameters
!
!### History
! * Jacob Williams : 8 Nov 2019 : created module

module lsqr_kinds

use iso_fortran_env

implicit none

private

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

! parameters:
real(wp),parameter,public :: zero = 0.0_wp
real(wp),parameter,public :: one = 1.0_wp

!***************************************************************************************************
end module lsqr_kinds
!***************************************************************************************************
22 changes: 0 additions & 22 deletions src/lsqr_kinds.f90

This file was deleted.

0 comments on commit a11a9ed

Please sign in to comment.