diff options
author | Brad King <brad.king@kitware.com> | 2020-12-10 11:58:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-12-10 11:58:51 (GMT) |
commit | 86157e219d732cdbdf67d285fba083f33d047b8f (patch) | |
tree | a0e1f9f708cade8100d9ffa88783c609897e0687 | |
parent | ff7f4e0b53001c38224ece8508e19bc7e6782562 (diff) | |
parent | d6df83a690b6b7e8bb1cc763c087017b6ccb37f7 (diff) | |
download | CMake-86157e219d732cdbdf67d285fba083f33d047b8f.zip CMake-86157e219d732cdbdf67d285fba083f33d047b8f.tar.gz CMake-86157e219d732cdbdf67d285fba083f33d047b8f.tar.bz2 |
Merge topic 'EML-Support'
d6df83a690 Find{BLAS,LAPACK}: Add support for Elbrus Math Library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5590
-rw-r--r-- | Modules/FindBLAS.cmake | 30 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 29 |
2 files changed, 59 insertions, 0 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 93c0a11..01d0236 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -53,6 +53,8 @@ The following variables may be set to influence this module's behavior: * ``Arm_mp`` * ``Arm_ilp64`` * ``Arm_ilp64_mp`` + * ``EML`` + * ``EML_mt`` * ``Generic`` .. versionadded:: 3.6 @@ -74,6 +76,9 @@ The following variables may be set to influence this module's behavior: .. versionadded:: 3.19 ``FlexiBLAS`` support. + .. versionadded:: 3.20 + Elbrus Math Library support (``EML``, ``EML_mt``). + ``BLA_F95`` if ``ON`` tries to find the BLAS95 interfaces @@ -983,6 +988,31 @@ if(BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") endif() endif() +# Elbrus Math Library? +if(BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All") + + set(BLAS_EML_LIB "eml") + + # Check for OpenMP support, VIA BLA_VENDOR of eml_mt + if(BLA_VENDOR MATCHES "_mt") + set(BLAS_EML_LIB "${BLAS_EML_LIB}_mt") + endif() + + if(NOT BLAS_LIBRARIES) + check_blas_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "${BLAS_EML_LIB}" + "" + "" + "" + ) + endif() + +endif() + # Generic BLAS library? if(BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 4f769ba..d5af5da 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -43,6 +43,8 @@ The following variables may be set to influence this module's behavior: * ``Arm_mp`` * ``Arm_ilp64`` * ``Arm_ilp64_mp`` + * ``EML`` + * ``EML_mt`` * ``Generic`` .. versionadded:: 3.6 @@ -64,6 +66,9 @@ The following variables may be set to influence this module's behavior: .. versionadded:: 3.19 ``FlexiBLAS`` support. + .. versionadded:: 3.20 + Elbrus Math Library support (``EML``, ``EML_mt``). + ``BLA_F95`` if ``ON`` tries to find the BLAS95/LAPACK95 interfaces @@ -515,6 +520,30 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) ) endif() + # Elbrus Math Library? + if(NOT LAPACK_LIBRARIES + AND (BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All")) + + set(LAPACK_EML_LIB "eml") + + # Check for OpenMP support, VIA BLA_VENDOR of eml_mt + if(BLA_VENDOR MATCHES "_mt") + set(LAPACK_EML_LIB "${LAPACK_EML_LIB}_mt") + endif() + + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "${LAPACK_EML_LIB}" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + # Generic LAPACK library? if(NOT LAPACK_LIBRARIES AND (BLA_VENDOR STREQUAL "Generic" |