namespace Eigen { /** \page TopicVectorization Vectorization %Eigen performs \em explicit vectorization: instead of relying on the compiler to auto-vectorize scalar loops, %Eigen's evaluators generate SIMD instructions directly through a portable wrapper layer (the "packet math" layer). This page gives an overview of which instruction sets are supported, how vectorization is enabled, what gets vectorized, and how to control it. \eigenAutoToc \section TopicVectorizationArch Supported instruction sets On CPUs, %Eigen provides vectorized kernels for the following instruction sets:
| Architecture | Instruction sets | Notes |
|---|---|---|
| x86 / x86-64 | SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2+FMA, AVX512 (incl. the DQ, VL, FP16, and BF16 extensions) | Selected from the compiler's target flags (e.g. \c -mavx2 \c -mfma, \c /arch:AVX2) |
| ARM / AArch64 | NEON; SVE and SME as opt-in backends | SVE requires \c EIGEN_ARM64_USE_SVE and a fixed vector length (-msve-vector-bits=N); the SME backend, enabled with \c EIGEN_ARM64_USE_SME, accelerates \c float and \c double matrix products and must be built \em without -msve-vector-bits, since a fixed length would pin the kernels to one runtime streaming vector length. Double precision additionally needs the optional FEAT_SME_F64F64 extension (+sme-f64f64, or a -mcpu that implies it); without it \c double keeps the generic kernel |
| PowerPC | AltiVec, VSX, MMA | |
| IBM Z (s390x) | ZVector | |
| MIPS | MSA | |
| LoongArch | LSX | |
| RISC-V | RVV 1.0 | Requires \c EIGEN_RISCV64_USE_RVV10 and a fixed vector length (-mrvv-vector-bits=zvl) |
| Qualcomm Hexagon | HVX |