pub trait MaybeSimdOps: Copy + Sized {
// Provided methods
fn try_simd_sum(_src: &[Self]) -> Option<Self> { ... }
fn try_simd_dot(_a: &[Self], _b: &[Self]) -> Option<Self> { ... }
}Expand description
Trait for types that may have SIMD-accelerated sum/dot operations.
Default implementations return None (no SIMD available).
f32/f64 override these with SIMD kernels when the simd feature is enabled.
Provided Methods§
fn try_simd_sum(_src: &[Self]) -> Option<Self>
fn try_simd_dot(_a: &[Self], _b: &[Self]) -> Option<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.