# SLEEF ![Github Actions](https://github.com/shibatch/sleef/actions/workflows/build_and_test.yml/badge.svg?event=push&branch=master) [![DOI:10.1109/TPDS.2019.2960333](http://img.shields.io/badge/DOI-10.1109/TPDS.2019.2960333-blue.svg)](https://ieeexplore.ieee.org/document/8936472) [![License](https://img.shields.io/badge/License-Boost_1.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt) ![CMake](https://img.shields.io/badge/cmake-v3.18+-yellow.svg) [![Spack](https://img.shields.io/spack/v/sleef)](https://spack.readthedocs.io/en/v0.16.2/package_list.html#sleef) SLEEF is a library that implements vectorized versions of C standard math functions. This library also includes DFT subroutines. - **Web Page:** [https://sleef.org/][webpage_url] - **Sources:** [https://github.com/shibatch/sleef][repo_url] ## Supported vector extensions ### Warning Due to limited test capacities, SLEEF is currently only officially supported on Linux with gcc or llvm/clang. [This issue](https://github.com/shibatch/sleef/issues/481) tracks progress on improving test coverage. Compilation of SLEEF on previously supported environments might still be safe, we just cannot verify it yet. ### Summary The following table summarises currently supported vector extensions, compilers and OS-es. :green_circle: : Tested extensively in CI. :x: : Currently failing some tests in CI. :white_circle: : Not tested in CI. Might have passed tests in previous CI framework.
OS/Compiler
Linux MacOS Windows
Arch. Vector Extensions gccllvmicc gccllvm gccllvmmsvc
x86_64SSE2, SSE4,
AVX, AVX2, AVX512F
:green_circle::green_circle::white_circle: :white_circle::white_circle: :white_circle::white_circle::white_circle:
x86 32bit
(i386)
SSE :green_circle::green_circle::white_circle: :white_circle::white_circle: :white_circle::white_circle::white_circle:
AArch64
(arm)
Neon, SVE :green_circle::x:N/A Preliminary N/A
AArch32
(armhf)
NEON :green_circle::green_circle:N/A Preliminary N/A
PowerPC
(ppc64el)
VSX, VSX3 :green_circle::green_circle:N/A N/A N/A
IBM/Z
(s390x)
VXE, VXE2 :green_circle::green_circle:N/A N/A N/A
Risc-V
(riscv64)
RVV1, RVV2 N/A (14+):green_circle:N/A N/A N/A
### Compiler support Results are displayed for gcc 11 and llvm 17, the compiler versions used in CI tests with GitHub Actions. Older versions should be supported too, while newer ones are either not tested or have known issues. ### OS support Only Linux distributions are currently tested in CI and thus officially supported. Building SLEEF for MacOS and Windows on x86 machines was officially supported (:white_circle:), as of 3.5.1, however it is not currently tested. ### More on supported environment Refer to our web page for [more on supported environment][supported_env_url]. ## Install SLEEF dependencies The library itself does not have any additional dependency. However some tests require: - libssl and libcrypto, that can be provided by installing openssl. - libm, libgmp and libmpfr - libfftw. These tests can be disabled if necessary. ## How to build SLEEF We recommend relying on CMake as much as possible in the build process to ensure portability. CMake 3.18+ is the minimum required currently. 1. Check out the source code from our GitHub repository ``` git clone https://github.com/shibatch/sleef ``` 2. Make a separate directory to create an out-of-source build ``` cd sleef && mkdir build ``` 3. Run cmake to configure the project ``` cmake -S . -B build ``` 4. Run make to build the project ``` cmake --build build -j --clean-first ``` 5. Run tests using ctests ``` ctest --test-dir build -j ``` Refer to our web page for [detailed build instructions][build_info_url]. ## Install SLEEF ### From source Assuming following instructions were followed. 6. Install to specified directory `` ``` cmake --install build --prefix= ``` ### Using Spack SLEEF can also be directly installed using Spack. ``` spack install sleef@master ``` ## License The software is distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE.txt or copy at [http://www.boost.org/LICENSE_1_0.txt][license_url]. Contributions to this project are accepted under the same license. Copyright Naoki Shibata and contributors 2010 - 2024. [webpage_url]: https://sleef.org/ [build_info_url]: https://sleef.org/compile.xhtml [supported_env_url]: https://sleef.org/index.xhtml#environment [repo_url]: https://github.com/shibatch/sleef [repo_license_url]: https://github.com/shibatch/sleef/blob/main/LICENSE.txt [license_url]: http://www.boost.org/LICENSE_1_0.txt