pub trait SparseBackend {
// Required methods
fn spmv_kernel(
a: &CsrMatrix<f32>,
alpha: f32,
x: &[f32],
beta: f32,
y: &mut [f32],
);
fn spmm_kernel(
a: &CsrMatrix<f32>,
alpha: f32,
b: &[f32],
b_cols: usize,
beta: f32,
c: &mut [f32],
);
}Expand description
Backend dispatch trait for pluggable SIMD SpMV kernels.
Implementations provide SpMV for a specific hardware target.
The default dispatch in SparseOps::spmv selects the best
available backend at runtime.
Required Methods§
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.
Implementors§
impl SparseBackend for Avx2Backend
Available on x86-64 only.