<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
|
C++ Template Linear Algebra PACKage
First things to know about <T>LAPACK:
tlapack
for files, folders, and links, to make it more portable and easier to use.<T>LAPACK provides:
Supported in part by NSF ACI 2004850.
<T>LAPACK is a work in progress (WIP) project. This is a list of the current functionality:
The complete documentation and implementation for the routines that are available are listed in the API documentation.
<T>LAPACK is built and installed with CMake.
You can either download binaries for the latest stable or previous release of CMake, or build the current development distribution from source. CMake is also available in the APT repository on Ubuntu 16.04 or higher.
<T>LAPACK can be build following the standard CMake recipe
To install <T>LAPACK in your system, use
Standard environment variables affect CMake. Some examples are
CXX C++ compiler CXXFLAGS C++ compiler flags LDFLAGS linker flags
The Fortran and C wrappers to <T>LAPACK also use, among others,
CC C compiler CFLAGS C compiler flags FC Fortran compiler FFLAGS Fortran compiler flags
It is also possible to pass variables to CMake during the configuration step using the -D
flag. The following example builds <T>LAPACK in debug mode inside the directory build
Here are the <T>LAPACK specific options and their default values
# Option # Default BUILD_BLASPP_TESTS OFF Use BLAS++ tests to test <T>LAPACK templates. REQUIRES: BUILD_TESTING=ON BUILD_EXAMPLES ON Build examples BUILD_LAPACKPP_TESTS OFF Use LAPACK++ tests to test <T>LAPACK templates. REQUIRES: BUILD_TESTING=ON BUILD_STANDALONE_TESTS OFF Build tests as standalone executables in addition to tests for CTest. The executables are installed in the test directory. The executables do not use Catch2. REQUIRES: BUILD_TESTING=ON BUILD_testBLAS_TESTS ON Build testBLAS tests. REQUIRES: BUILD_TESTING=ON BUILD_TESTING ON Build the testing tree BUILD_C_WRAPPERS OFF Build and install C wrappers (Work In Progress) BUILD_CBLAS_WRAPPERS OFF Build and install CBLAS wrappers (Work In Progress) BUILD_Fortran_WRAPPERS OFF Build and install Fortran wrappers (Work In Progress) TLAPACK_CHECK_INPUT ON Enable checks on input arguments. REQUIRES: TLAPACK_NDEBUG=OFF TLAPACK_DEFAULT_INFCHECK ON Default behavior of checks for Infs. Checks can be activated/deactivated at runtime. REQUIRES: TLAPACK_NDEBUG=OFF TLAPACK_ENABLE_INFCHECK=ON TLAPACK_DEFAULT_NANCHECK ON Default behavior of checks for NaNs. Checks can be activated/deactivated at runtime. REQUIRES: TLAPACK_NDEBUG=OFF TLAPACK_ENABLE_NANCHECK=ON TLAPACK_ENABLE_INFCHECK OFF Enable check for Infs as specified in the documentation of each routine. REQUIRES: TLAPACK_NDEBUG=OFF TLAPACK_ENABLE_NANCHECK OFF Enable check for NaNs as specified in the documentation of each routine. REQUIRES: TLAPACK_NDEBUG=OFF TLAPACK_INT_T int64_t Type of all non size-related integers in libtlapack_c, libtlapack_cblas, libtlapack_fortran, and in the routines of the legacy API. It is the type used for the array increments, e.g., incx and incy. Supported types: int, short, long, long long, int8_t, int16_t, int32_t, int64_t, int_least8_t, int_least16_t, int_least32_t, int_least64_t, int_fast8_t, int_fast16_t, int_fast32_t, int_fast64_t, intmax_t, intptr_t, ptrdiff_t NOTE: TLAPACK_INT_T=int64_t if TLAPACK_USE_LAPACKPP=ON TLAPACK_NDEBUG OFF Disable all error checks. TLAPACK_SIZE_T size_t Type of all size-related integers in libtlapack_c, libtlapack_cblas, libtlapack_fortran, and in the routines of the legacy API. Supported types: int, short, long, long long, int8_t, int16_t, int32_t, int64_t, int_least8_t, int_least16_t, int_least32_t, int_least64_t, int_fast8_t, int_fast16_t, int_fast32_t, int_fast64_t, intmax_t, intptr_t, ptrdiff_t, size_t, uint8_t, uint16_t, uint32_t, uint64_t NOTE: TLAPACK_SIZE_T=int64_t if TLAPACK_USE_LAPACKPP=ON TLAPACK_USE_LAPACKPP OFF Use LAPACK++ wrappers to link with optimized BLAS and LAPACK libraries. Mind that LAPACK++ needs BLAS++. Branches compatible with <T>LAPACK: https://bitbucket.org/weslleyspereira/blaspp/branch/tlapack https://bitbucket.org/weslleyspereira/lapackpp/branch/tlapack
<T>LAPACK currently depends on the following projects:
Project | Version | When |
---|---|---|
CMake | >= v3.14 | Always |
ClangFormat | 11 | Always |
Catch2 | >= 3.0.1 | BUILD_TESTING=ON |
Git | - | BUILD_BLASPP_TESTS=ON OR BUILD_LAPACKPP_TESTS=ON |
github.com/icl-utk-edu/testsweeper | >= 2021.04.00 | BUILD_BLASPP_TESTS=ON OR BUILD_LAPACKPP_TESTS=ON |
LAPACK | >= 3.9.0 | BUILD_BLASPP_TESTS=ON OR BUILD_LAPACKPP_TESTS=ON |
ICL BLAS++ test suite | 2023.06.00 | BUILD_BLASPP_TESTS=ON |
ICL LAPACK++ test suite | 2022.07.00 | BUILD_LAPACKPP_TESTS=ON |
LAPACKE | >= 3.9.0 | BUILD_LAPACKPP_TESTS=ON |
github.com/tlapack/testBLAS | Latest | BUILD_testBLAS_TESTS=ON |
Note that:
ON
.<T>LAPACK may also use the following projects when available:
Project | Version tested | When |
---|---|---|
ICL BLAS++ | 2023.11.05 | TLAPACK_USE_LAPACKPP=ON |
ICL LAPACK++ | 2023.11.05 | TLAPACK_USE_LAPACKPP=ON |
kokkos mdspan | 0.4.0 | TLAPACK_TEST_MDSPAN=ON or in some examples |
Eigen | commit: 2873916f | TLAPACK_TEST_EIGEN=ON or in some examples |
GNU MPFR C++ | Latest in APT | TLAPACK_TEST_MPFR=ON or in some examples |
GNU libquad | Latest in APT | TLAPACK_TEST_QUAD=ON |
StarPU | 1.4.1 | Running StarPU examples |
We also continuously test <T>LAPACK with optimized BLAS and LAPACK implementations: OpenBLAS, Intel MKL, Flame BLIS, LAPACK, Netlib BLAS.
[!NOTE] <T>LAPACK supports Eigen v3.4.0 after applying the patch 9210e71f. This commit fixes an ADL conflict between
Eigen::internal::size()
andstd::size()
.
The documentation of <T>LAPACK is generated using Doxygen. The documentation is available online at https://tlapack.github.io/tlapack. Alternatively, you can generate the documentation in your local machine. To do so, follow the steps below:
doxygen docs/Doxyfile
to generate the <T>LAPACK documentation via Doxygen in your local machine.Additional information about the software can be found in the Wiki pages of the project.
Please read CONTRIBUTING.md for details on how to contribute to <T>LAPACK.
<T>LAPACK is continuously tested on Ubuntu, MacOS and Windows using GNU compilers. See the latest test results in the Github Actions webpage for <T>LAPACK. The tests split into three categories:
float
, double
, std::complex<float>
, std::complex<double>
and Eigen::half
.tlapack::LegacyMatrix
, Eigen::Matrix
and std::experimental::mdspan
(the latter from https://github.com/kokkos/mdspan
).To test <T>LAPACK, build with BUILD_TESTING=ON
. Then, run ctest
inside the build directory.
BSD 3-Clause License
Copyright (c) 2025, University of Colorado Denver. All rights reserved.
Copyright (c) 2017-2021, University of Tennessee. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[1] Higham, N. J. (2002). Accuracy and stability of numerical algorithms. Society for industrial and applied mathematics.