pub struct MatrixDescriptor { /* private fields */ }Implementations§
Source§impl MatrixDescriptor
impl MatrixDescriptor
Sourcepub fn create() -> Result<Self>
pub fn create() -> Result<Self>
Initializes a matrix descriptor.
It sets MatrixType and IndexBase to MatrixType::General and
IndexBase::Zero, respectively, while leaving other fields uninitialized.
§Errors
Returns an error if cuSPARSE cannot create the descriptor or if it returns a null handle.
Sourcepub fn matrix_type(&self) -> MatrixType
pub fn matrix_type(&self) -> MatrixType
Returns the MatrixType field of this matrix descriptor.
Sourcepub fn set_matrix_type(&mut self, matrix_type: MatrixType) -> Result<()>
pub fn set_matrix_type(&mut self, matrix_type: MatrixType) -> Result<()>
Sets the MatrixType field of this matrix descriptor.
§Errors
Returns an error if cuSPARSE rejects matrix_type.
Sourcepub fn set_fill_mode(&mut self, fill_mode: FillMode) -> Result<()>
pub fn set_fill_mode(&mut self, fill_mode: FillMode) -> Result<()>
Sourcepub fn diagonal_type(&self) -> DiagonalType
pub fn diagonal_type(&self) -> DiagonalType
Returns the DiagonalType field of this matrix descriptor.
Sourcepub fn set_diagonal_type(&mut self, diagonal_type: DiagonalType) -> Result<()>
pub fn set_diagonal_type(&mut self, diagonal_type: DiagonalType) -> Result<()>
Sets the DiagonalType field of this matrix descriptor.
§Errors
Returns an error if cuSPARSE rejects diagonal_type.
Sourcepub fn index_base(&self) -> IndexBase
pub fn index_base(&self) -> IndexBase
Returns the IndexBase field of this matrix descriptor.
Sourcepub fn set_index_base(&mut self, index_base: IndexBase) -> Result<()>
pub fn set_index_base(&mut self, index_base: IndexBase) -> Result<()>
pub fn as_raw(&self) -> cusparseMatDescr_t
Trait Implementations§
Source§impl Debug for MatrixDescriptor
impl Debug for MatrixDescriptor
Source§impl Drop for MatrixDescriptor
impl Drop for MatrixDescriptor
impl Send for MatrixDescriptor
impl Sync for MatrixDescriptor
Auto Trait Implementations§
impl Freeze for MatrixDescriptor
impl RefUnwindSafe for MatrixDescriptor
impl Unpin for MatrixDescriptor
impl UnsafeUnpin for MatrixDescriptor
impl UnwindSafe for MatrixDescriptor
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