Skip to content

Commit d40e088

Browse files
committed
parameter flags for checking external BLAS/LAPACK presence
1 parent b782ddc commit d40e088

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/stdlib_linalg_constants.fypp

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,36 @@ module stdlib_linalg_constants
66
implicit none(type,external)
77
public
88

9+
! Checks whether BLAS is provided by an external library
10+
#ifdef STDLIB_EXTERNAL_BLAS
11+
logical(lk), parameter :: external_blas_ilp32 = .true._lk
12+
#else
13+
logical(lk), parameter :: external_blas_ilp32 = .false._lk
14+
#endif
15+
#ifdef STDLIB_EXTERNAL_BLAS_I64
16+
logical(lk), parameter :: external_blas_ilp64 = .true._lk
17+
#else
18+
logical(lk), parameter :: external_blas_ilp64 = .false._lk
19+
#endif
20+
21+
#ifdef STDLIB_EXTERNAL_LAPACK
22+
logical(lk), parameter :: external_lapack_ilp32 = .true._lk
23+
#else
24+
logical(lk), parameter :: external_lapack_ilp32 = .false._lk
25+
#endif
26+
#ifdef STDLIB_EXTERNAL_LAPACK_I64
27+
logical(lk), parameter :: external_lapack_ilp64 = .true._lk
28+
#else
29+
logical(lk), parameter :: external_lapack_ilp64 = .false._lk
30+
#endif
31+
32+
! Generic checks
33+
logical(lk), parameter :: external_blas = external_blas_ilp32 .or. external_blas_ilp64
34+
logical(lk), parameter :: external_lapack = external_lapack_ilp32 .or. external_lapack_ilp64
935

1036
! Support both 32-bit (ilp) and 64-bit (ilp64) integer kinds
1137
integer, parameter :: ilp = int32
1238
integer, parameter :: ilp64 = int64
1339
private :: int32, int64
14-
40+
1541
end module stdlib_linalg_constants

0 commit comments

Comments
 (0)