pub enum SpMatFormat {
Csr,
Ell,
Hyb,
Csr5,
}Expand description
Sparse matrix format selected by the simple heuristic.
This complements RecommendedFormat (which analyses a live GPU matrix)
by providing a lightweight, testable pure-function selector that takes
pre-computed statistics as inputs.
Variants§
Csr
General Compressed Sparse Row. Best default for very sparse matrices (avg_nnz_per_row ≤ 2).
Ell
ELLPACK. Best for matrices with regular row lengths and moderate fill (2 < avg_nnz_per_row ≤ 32).
Hyb
Hybrid ELL+COO. Best for matrices with irregular sparsity patterns that do not fit CSR5 criteria.
Csr5
CSR5 load-balanced format. Best for large matrices with high average fill (avg_nnz_per_row > 128 and n_rows >= 1024).
Trait Implementations§
Source§impl Clone for SpMatFormat
impl Clone for SpMatFormat
Source§fn clone(&self) -> SpMatFormat
fn clone(&self) -> SpMatFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpMatFormat
Source§impl Debug for SpMatFormat
impl Debug for SpMatFormat
impl Eq for SpMatFormat
Source§impl Hash for SpMatFormat
impl Hash for SpMatFormat
Source§impl PartialEq for SpMatFormat
impl PartialEq for SpMatFormat
Source§fn eq(&self, other: &SpMatFormat) -> bool
fn eq(&self, other: &SpMatFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpMatFormat
Auto Trait Implementations§
impl Freeze for SpMatFormat
impl RefUnwindSafe for SpMatFormat
impl Send for SpMatFormat
impl Sync for SpMatFormat
impl Unpin for SpMatFormat
impl UnsafeUnpin for SpMatFormat
impl UnwindSafe for SpMatFormat
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