Skip to main content

simd_level

Function simd_level 

Source
pub fn simd_level() -> SimdLevel
Expand description

Detect the best available SIMD level for the current CPU.

On aarch64: always returns SimdLevel::Neon (mandatory on ARMv8+). On x86_64: returns SimdLevel::Avx2 if CPU supports AVX2+FMA, else SimdLevel::Scalar. On wasm32 with +simd128: returns SimdLevel::WasmSimd128 (compile-time feature gate). On other architectures: returns SimdLevel::Scalar.