pub struct DefaultSparseOps { /* private fields */ }Expand description
Default sparse operations implementation
Implementations§
Source§impl DefaultSparseOps
impl DefaultSparseOps
Sourcepub fn with_hints(self, hints: SparseOptimizationHints) -> Self
pub fn with_hints(self, hints: SparseOptimizationHints) -> Self
Set optimization hints
Trait Implementations§
Source§impl Debug for DefaultSparseOps
impl Debug for DefaultSparseOps
Source§impl SparseOps<f32> for DefaultSparseOps
impl SparseOps<f32> for DefaultSparseOps
Source§fn spmv(
&self,
matrix: &SparseMatrix<f32>,
x: &[f32],
y: &mut [f32],
) -> BackendResult<()>
fn spmv( &self, matrix: &SparseMatrix<f32>, x: &[f32], y: &mut [f32], ) -> BackendResult<()>
Sparse matrix-vector multiplication: y = A * x
Source§fn spmm(
&self,
a: &SparseMatrix<f32>,
b: &SparseMatrix<f32>,
) -> BackendResult<SparseMatrix<f32>>
fn spmm( &self, a: &SparseMatrix<f32>, b: &SparseMatrix<f32>, ) -> BackendResult<SparseMatrix<f32>>
Sparse matrix-matrix multiplication: C = A * B
Source§fn sparse_add(
&self,
a: &SparseMatrix<f32>,
b: &SparseMatrix<f32>,
) -> BackendResult<SparseMatrix<f32>>
fn sparse_add( &self, a: &SparseMatrix<f32>, b: &SparseMatrix<f32>, ) -> BackendResult<SparseMatrix<f32>>
Sparse matrix addition: C = A + B
Source§fn to_dense(&self, matrix: &SparseMatrix<f32>) -> BackendResult<Vec<f32>>
fn to_dense(&self, matrix: &SparseMatrix<f32>) -> BackendResult<Vec<f32>>
Convert sparse matrix to dense format
Source§fn from_dense(
&self,
dense: &[f32],
rows: usize,
cols: usize,
threshold: f32,
) -> BackendResult<SparseMatrix<f32>>
fn from_dense( &self, dense: &[f32], rows: usize, cols: usize, threshold: f32, ) -> BackendResult<SparseMatrix<f32>>
Create sparse matrix from dense format
Source§fn transpose(
&self,
matrix: &SparseMatrix<f32>,
) -> BackendResult<SparseMatrix<f32>>
fn transpose( &self, matrix: &SparseMatrix<f32>, ) -> BackendResult<SparseMatrix<f32>>
Transpose sparse matrix
Auto Trait Implementations§
impl Freeze for DefaultSparseOps
impl RefUnwindSafe for DefaultSparseOps
impl Send for DefaultSparseOps
impl Sync for DefaultSparseOps
impl Unpin for DefaultSparseOps
impl UnsafeUnpin for DefaultSparseOps
impl UnwindSafe for DefaultSparseOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more