pub struct MatDescr { /* private fields */ }Expand description
RAII wrapper for aoclsparse_mat_descr.
Implementations§
Source§impl MatDescr
impl MatDescr
Sourcepub fn as_raw(&self) -> aoclsparse_mat_descr
pub fn as_raw(&self) -> aoclsparse_mat_descr
Borrow the underlying handle for raw FFI calls.
§Safety
The returned pointer is valid only for the lifetime of self.
Do not call aoclsparse_destroy_mat_descr on it.
Sourcepub fn set_type(&mut self, ty: MatType) -> Result<()>
pub fn set_type(&mut self, ty: MatType) -> Result<()>
Set the matrix-type hint (general / symmetric / hermitian / triangular). Affects which fast paths the library can take.
Sourcepub fn set_index_base(&mut self, base: IndexBase) -> Result<()>
pub fn set_index_base(&mut self, base: IndexBase) -> Result<()>
Set the index base (zero- or one-based) for column / row arrays.
Sourcepub fn set_fill_mode(&mut self, fill: FillMode) -> Result<()>
pub fn set_fill_mode(&mut self, fill: FillMode) -> Result<()>
For triangular / symmetric matrices, declare which triangle is stored (upper or lower).
Sourcepub fn set_diag_type(&mut self, diag: DiagType) -> Result<()>
pub fn set_diag_type(&mut self, diag: DiagType) -> Result<()>
For triangular matrices, declare whether the diagonal is unit (implicit) or non-unit (explicitly stored).
Sourcepub fn index_base(&self) -> IndexBase
pub fn index_base(&self) -> IndexBase
Read back the index base.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatDescr
impl RefUnwindSafe for MatDescr
impl !Send for MatDescr
impl !Sync for MatDescr
impl Unpin for MatDescr
impl UnsafeUnpin for MatDescr
impl UnwindSafe for MatDescr
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