pub trait SimdBackend {
type U8x32;
type I8x32;
type F32x8;
type U64x4;
// Required methods
fn l1_distance_u8(a: Self::U8x32, b: Self::U8x32) -> Self::U8x32;
fn dot_i8(a: Self::I8x32, b: Self::I8x32) -> i32;
fn dot_f32(a: Self::F32x8, b: Self::F32x8) -> f32;
}Expand description
Trait for SIMD backend abstraction.
This allows the algorithm code to be generic over the backend,
enabling A/B testing and gradual migration to core::simd.
Required Associated Types§
Required Methods§
Sourcefn l1_distance_u8(a: Self::U8x32, b: Self::U8x32) -> Self::U8x32
fn l1_distance_u8(a: Self::U8x32, b: Self::U8x32) -> Self::U8x32
Compute L1 distance between two u8 vectors
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".