pub struct ComplexSparseMatrix<T: ComplexScalar> { /* private fields */ }Expand description
RAII wrapper for a complex aoclsparse_matrix in CSR format.
Implementations§
Source§impl<T: ComplexScalar> ComplexSparseMatrix<T>
impl<T: ComplexScalar> ComplexSparseMatrix<T>
Sourcepub fn from_csr(
base: IndexBase,
m: usize,
n: usize,
row_ptr: &[aoclsparse_int],
col_ind: &[aoclsparse_int],
val: &[T],
) -> Result<Self>
pub fn from_csr( base: IndexBase, m: usize, n: usize, row_ptr: &[aoclsparse_int], col_ind: &[aoclsparse_int], val: &[T], ) -> Result<Self>
Build from CSR arrays. Values are copied into the wrapper.
Sourcepub unsafe fn from_library_owned(raw: aoclsparse_matrix) -> Result<Self>
pub unsafe fn from_library_owned(raw: aoclsparse_matrix) -> Result<Self>
Sourcepub fn as_raw(&self) -> aoclsparse_matrix
pub fn as_raw(&self) -> aoclsparse_matrix
Borrow the raw aoclsparse_matrix handle. Do not call
aoclsparse_destroy on it; the wrapper does.
Sourcepub fn export_csr(
&self,
) -> Result<(IndexBase, Vec<aoclsparse_int>, Vec<aoclsparse_int>, Vec<T>)>
pub fn export_csr( &self, ) -> Result<(IndexBase, Vec<aoclsparse_int>, Vec<aoclsparse_int>, Vec<T>)>
Read out the CSR contents as freshly allocated Vecs.
Trait Implementations§
Source§impl<T: ComplexScalar> Debug for ComplexSparseMatrix<T>
impl<T: ComplexScalar> Debug for ComplexSparseMatrix<T>
Source§impl<T: ComplexScalar> Drop for ComplexSparseMatrix<T>
impl<T: ComplexScalar> Drop for ComplexSparseMatrix<T>
Auto Trait Implementations§
impl<T> Freeze for ComplexSparseMatrix<T>
impl<T> RefUnwindSafe for ComplexSparseMatrix<T>where
T: RefUnwindSafe,
impl<T> !Send for ComplexSparseMatrix<T>
impl<T> !Sync for ComplexSparseMatrix<T>
impl<T> Unpin for ComplexSparseMatrix<T>where
T: Unpin,
impl<T> UnsafeUnpin for ComplexSparseMatrix<T>
impl<T> UnwindSafe for ComplexSparseMatrix<T>where
T: UnwindSafe,
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