pub struct SimdConfig {
pub avx512f_enabled: bool,
pub avx2_enabled: bool,
pub fma_enabled: bool,
pub avx512vnni_enabled: bool,
pub neon_enabled: bool,
pub dotprod_enabled: bool,
}Expand description
Unstable: SIMD dispatch internals; fields may be added as new ISAs are supported.
SIMD configuration with runtime feature detection.
Fields§
§avx512f_enabled: boolUnstable: AVX-512F support available (x86_64).
avx2_enabled: boolUnstable: AVX2 support available (x86_64).
fma_enabled: boolUnstable: FMA (Fused Multiply-Add) support available (x86_64).
avx512vnni_enabled: boolUnstable: AVX-512F + AVX-512VNNI support available (x86_64).
neon_enabled: boolUnstable: NEON support available (aarch64/ARM64).
dotprod_enabled: boolUnstable: ARM FEAT_DotProd (SDOT/UDOT instructions) available (aarch64).
Mandatory on Armv8.4+; optional on Armv8.2/v8.3. Always false on non-aarch64.
SDOT kernels must only be dispatched when this is true.
Implementations§
Source§impl SimdConfig
impl SimdConfig
Sourcepub fn simd128_enabled(&self) -> bool
pub fn simd128_enabled(&self) -> bool
Unstable: wasm32 SIMD128 support available.
Unlike the x86_64/aarch64 fields, this is a compile-time, not
runtime, signal: wasm has no runtime CPU feature detection (a given
.wasm binary either was or wasn’t compiled with -C target-feature=+simd128; there is no dispatching between two
codepaths inside one binary). Mirrors cfg!(target_feature = "simd128") and is always false on non-wasm32 targets. A method rather
than a field so existing SimdConfig struct literals keep compiling.
Sourcepub fn simd_available(&self) -> bool
pub fn simd_available(&self) -> bool
Unstable: check if any SIMD is available; logic may expand with new ISAs.
Trait Implementations§
Source§impl Clone for SimdConfig
impl Clone for SimdConfig
Source§fn clone(&self) -> SimdConfig
fn clone(&self) -> SimdConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more