pub struct GpuCsrMatrix {
pub row_ptr: Vec<usize>,
pub col_idx: Vec<usize>,
pub values: Vec<f64>,
pub n_rows: usize,
pub n_cols: usize,
}Expand description
Sparse matrix in compressed sparse row (CSR) format.
This is a lightweight, GPU-friendly structure with direct access to the
three CSR arrays. For richer functionality use the existing
crate::csr::CsrMatrix.
Fields§
§row_ptr: Vec<usize>Row pointer array of length n_rows + 1.
col_idx: Vec<usize>Column indices of non-zero entries.
values: Vec<f64>Values of non-zero entries.
n_rows: usizeNumber of rows.
n_cols: usizeNumber of columns.
Implementations§
Source§impl GpuCsrMatrix
impl GpuCsrMatrix
Sourcepub fn transpose(&self) -> GpuCsrMatrix
pub fn transpose(&self) -> GpuCsrMatrix
Compute the transpose A^T.
Trait Implementations§
Source§impl Clone for GpuCsrMatrix
impl Clone for GpuCsrMatrix
Source§fn clone(&self) -> GpuCsrMatrix
fn clone(&self) -> GpuCsrMatrix
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 GpuCsrMatrix
impl RefUnwindSafe for GpuCsrMatrix
impl Send for GpuCsrMatrix
impl Sync for GpuCsrMatrix
impl Unpin for GpuCsrMatrix
impl UnsafeUnpin for GpuCsrMatrix
impl UnwindSafe for GpuCsrMatrix
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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