pub struct DenseMatrixDescriptor<'a> { /* private fields */ }Implementations§
Source§impl<'a> DenseMatrixDescriptor<'a>
impl<'a> DenseMatrixDescriptor<'a>
Sourcepub fn create<T: DataTypeLike>(
rows: usize,
cols: usize,
leading_dimension: usize,
values: &'a mut DeviceMemory<T>,
order: Order,
) -> Result<Self>
pub fn create<T: DataTypeLike>( rows: usize, cols: usize, leading_dimension: usize, values: &'a mut DeviceMemory<T>, order: Order, ) -> Result<Self>
Initializes a dense matrix descriptor.
The descriptor borrows the device value buffer by pointer; the buffer must remain valid while the descriptor uses it.
Sourcepub fn values(&self) -> Result<DevicePtr>
pub fn values(&self) -> Result<DevicePtr>
Returns the values pointer of this dense matrix descriptor.
§Errors
Returns an error if cuSPARSE cannot report the values pointer.
Sourcepub fn set_values<T: DataTypeLike>(
&mut self,
values: &'a mut DeviceMemory<T>,
) -> Result<()>
pub fn set_values<T: DataTypeLike>( &mut self, values: &'a mut DeviceMemory<T>, ) -> Result<()>
Sets the values pointer of this dense matrix descriptor.
The pointed-to device buffer must remain valid while the descriptor uses it.
§Errors
Returns an error if cuSPARSE rejects the values pointer.
Sourcepub fn info(&self) -> Result<DenseMatrixInfo>
pub fn info(&self) -> Result<DenseMatrixInfo>
Returns the fields of this dense matrix descriptor.
§Errors
Returns an error if cuSPARSE cannot report the descriptor fields or if
reported dimensions cannot be represented as usize.
Sourcepub fn set_strided_batch(
&mut self,
batch_count: usize,
batch_stride: usize,
) -> Result<()>
pub fn set_strided_batch( &mut self, batch_count: usize, batch_stride: usize, ) -> Result<()>
Sets the number of batches and the batch stride of this dense matrix descriptor.
§Errors
Returns an error if either argument cannot be represented by cuSPARSE or if cuSPARSE rejects the strided batch settings.
Sourcepub fn strided_batch(&self) -> Result<(i32, usize)>
pub fn strided_batch(&self) -> Result<(i32, usize)>
Returns the number of batches and the batch stride of this dense matrix descriptor.
§Errors
Returns an error if cuSPARSE cannot report the strided batch settings or
if the reported stride cannot be represented as usize.