|
numerics
|
Backend enum for linear algebra operations. More...
Go to the source code of this file.
Namespaces | |
| namespace | num |
Enumerations | |
| enum class | num::Backend { num::seq , num::blocked , num::simd , num::blas , num::omp , num::gpu } |
| Selects which backend handles a linalg operation. More... | |
Variables | |
| constexpr Backend | num::seq = Backend::seq |
| constexpr Backend | num::blocked = Backend::blocked |
| constexpr Backend | num::simd = Backend::simd |
| constexpr Backend | num::blas = Backend::blas |
| constexpr Backend | num::omp = Backend::omp |
| constexpr Backend | num::gpu = Backend::gpu |
| constexpr bool | num::has_blas |
| True when a BLAS/cblas library was found at configure time. | |
| constexpr bool | num::has_omp |
| True when OpenMP was found at configure time. | |
| constexpr Backend | num::default_backend |
| constexpr Backend | num::best_backend |
| Best backend for memory-bound vector ops: blas > omp > blocked. | |
Backend enum for linear algebra operations.
Each module defines its own backend enum for the choices relevant to it. This enum covers linalg (vector, matrix, solvers, factorization, eigen, svd). Other modules define their own – e.g. spectral/ uses FFTBackend.
num::seq – naive serial C++ (always available) num::blocked – cache-blocked, no intrinsics (compiler auto-vectorizes) num::simd – hand-written SIMD (AVX2 on x86, NEON on AArch64) num::blas – cblas / LAPACKE (optional, NUMERICS_HAS_BLAS) num::omp – OpenMP parallel (optional, NUMERICS_HAS_OMP) num::gpu – CUDA (optional, NUMERICS_HAS_CUDA)
Definition in file policy.hpp.