pub trait BixverseSimd:
Copy
+ Default
+ AddAssign
+ Mul<Output = Self> {
// Required methods
fn bxv_dot_simd(a: &[Self], b: &[Self]) -> Self;
fn bxv_sum(x: &[Self]) -> Self;
fn bxv_sum_squared_deviation(x: &[Self], mean: Self) -> Self;
fn bxv_exp_shift_sum(src: &[Self], shift: Self, dst: &mut [Self]) -> Self;
// Provided method
fn bxv_axpy_simd(y: &mut [Self], a: Self, x: &[Self]) { ... }
}Expand description
Trait for SIMD-accelerated dot product, replacing the ann-search-rs SimdDistance dependency.
Required Methods§
Sourcefn bxv_dot_simd(a: &[Self], b: &[Self]) -> Self
fn bxv_dot_simd(a: &[Self], b: &[Self]) -> Self
Sourcefn bxv_sum_squared_deviation(x: &[Self], mean: Self) -> Self
fn bxv_sum_squared_deviation(x: &[Self], mean: Self) -> Self
Sourcefn bxv_exp_shift_sum(src: &[Self], shift: Self, dst: &mut [Self]) -> Self
fn bxv_exp_shift_sum(src: &[Self], shift: Self, dst: &mut [Self]) -> Self
Provided Methods§
Sourcefn bxv_axpy_simd(y: &mut [Self], a: Self, x: &[Self])
fn bxv_axpy_simd(y: &mut [Self], a: Self, x: &[Self])
Scaled vector addition, y += a * x, in place.
The inner step of any sparse-operator-times-dense-block kernel, where
y is one contiguous output row and x one contiguous input row.
Defaulted to a scalar loop so that adding it did not break the trait for out-of-crate implementors. Both in-crate impls override it.
§Params
y- Accumulator, updated in place.a- Scalar multiplier.x- Slice added intoy(must be the same length asy).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".