pub struct SellMatrix { /* private fields */ }Expand description
Sliced ELLPACK sparse matrix.
Rows are grouped into slices of slice_size rows. Within each slice,
columns and values are stored in column-major order, padded to the
max row length in that slice.
Implementations§
Source§impl SellMatrix
impl SellMatrix
Sourcepub fn from_csr(csr: &CsrMatrix<f32>, slice_size: usize) -> Self
pub fn from_csr(csr: &CsrMatrix<f32>, slice_size: usize) -> Self
Convert a CSR matrix to SELL format with the given slice size.
Typical slice_size: 32 or 64 (matching SIMD width or warp size).
Sourcepub fn spmv(
&self,
alpha: f32,
x: &[f32],
beta: f32,
y: &mut [f32],
) -> Result<(), SparseError>
pub fn spmv( &self, alpha: f32, x: &[f32], beta: f32, y: &mut [f32], ) -> Result<(), SparseError>
Sourcepub fn slice_size(&self) -> usize
pub fn slice_size(&self) -> usize
Slice size (C parameter).
Sourcepub fn storage_size(&self) -> usize
pub fn storage_size(&self) -> usize
Total stored elements (including padding zeros).
Trait Implementations§
Source§impl Clone for SellMatrix
impl Clone for SellMatrix
Source§fn clone(&self) -> SellMatrix
fn clone(&self) -> SellMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SellMatrix
impl RefUnwindSafe for SellMatrix
impl Send for SellMatrix
impl Sync for SellMatrix
impl Unpin for SellMatrix
impl UnsafeUnpin for SellMatrix
impl UnwindSafe for SellMatrix
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