From d40e088bee2c1dca95a36e307116ad89f789eca2 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Fri, 20 Dec 2024 13:13:04 +0100 Subject: [PATCH] `parameter` flags for checking external BLAS/LAPACK presence --- src/stdlib_linalg_constants.fypp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/stdlib_linalg_constants.fypp b/src/stdlib_linalg_constants.fypp index ff8dad44c..46d35f760 100644 --- a/src/stdlib_linalg_constants.fypp +++ b/src/stdlib_linalg_constants.fypp @@ -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