Skip to main content

detect_simd_level

Function detect_simd_level 

Source
pub fn detect_simd_level() -> SimdLevel
Expand description

Function to detect which SIMD implementation to use

The AVX-2 probe also requires FMA, because every 256-bit arm here is written with _mm256_fmadd_ps and is entered under #[target_feature(enable = "avx2", enable = "fma")]. No shipping x86 part has AVX-2 without FMA, so this costs nothing in practice.

ยงReturns

The widest SIMD level this CPU supports.