Skip to content

Commit

Permalink
parameter flags for checking external BLAS/LAPACK presence
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed Dec 20, 2024
1 parent b782ddc commit d40e088
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/stdlib_linalg_constants.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,36 @@ module stdlib_linalg_constants
implicit none(type,external)
public

! Checks whether BLAS is provided by an external library
#ifdef STDLIB_EXTERNAL_BLAS
logical(lk), parameter :: external_blas_ilp32 = .true._lk
#else
logical(lk), parameter :: external_blas_ilp32 = .false._lk
#endif
#ifdef STDLIB_EXTERNAL_BLAS_I64
logical(lk), parameter :: external_blas_ilp64 = .true._lk
#else
logical(lk), parameter :: external_blas_ilp64 = .false._lk
#endif

#ifdef STDLIB_EXTERNAL_LAPACK
logical(lk), parameter :: external_lapack_ilp32 = .true._lk
#else
logical(lk), parameter :: external_lapack_ilp32 = .false._lk
#endif
#ifdef STDLIB_EXTERNAL_LAPACK_I64
logical(lk), parameter :: external_lapack_ilp64 = .true._lk
#else
logical(lk), parameter :: external_lapack_ilp64 = .false._lk
#endif

! Generic checks
logical(lk), parameter :: external_blas = external_blas_ilp32 .or. external_blas_ilp64
logical(lk), parameter :: external_lapack = external_lapack_ilp32 .or. external_lapack_ilp64

! Support both 32-bit (ilp) and 64-bit (ilp64) integer kinds
integer, parameter :: ilp = int32
integer, parameter :: ilp64 = int64
private :: int32, int64

end module stdlib_linalg_constants

0 comments on commit d40e088

Please sign in to comment.