pub struct BlockSparseTensorDescriptor<'h> { /* private fields */ }Expand description
A block-sparse tensor descriptor (cuTENSOR 2.x). Used on the A
operand of a BlockSparseContraction.
Implementations§
Source§impl<'h> BlockSparseTensorDescriptor<'h>
impl<'h> BlockSparseTensorDescriptor<'h>
Sourcepub fn new(
handle: &'h Handle,
extents: &[i64],
block_size: &[i64],
strides: Option<&[i64]>,
block_indices: &[i32],
dtype: DataType,
alignment_bytes: u32,
) -> Result<Self>
pub fn new( handle: &'h Handle, extents: &[i64], block_size: &[i64], strides: Option<&[i64]>, block_indices: &[i32], dtype: DataType, alignment_bytes: u32, ) -> Result<Self>
Build a block-sparse tensor:
extents— full dense shapeblock_size— size per dim of each non-zero block (same length as extents)strides— optional custom strides;None= packedblock_indices— array ofnum_modes × block_countints identifying the non-zero block locations (index per mode per block)
Sourcepub fn as_raw(&self) -> cutensorBlockSparseTensorDescriptor_t
pub fn as_raw(&self) -> cutensorBlockSparseTensorDescriptor_t
Raw cutensorBlockSparseTensorDescriptor_t. Use with care.
Trait Implementations§
Source§impl<'h> Debug for BlockSparseTensorDescriptor<'h>
impl<'h> Debug for BlockSparseTensorDescriptor<'h>
Source§impl Drop for BlockSparseTensorDescriptor<'_>
impl Drop for BlockSparseTensorDescriptor<'_>
Auto Trait Implementations§
impl<'h> !Send for BlockSparseTensorDescriptor<'h>
impl<'h> !Sync for BlockSparseTensorDescriptor<'h>
impl<'h> Freeze for BlockSparseTensorDescriptor<'h>
impl<'h> RefUnwindSafe for BlockSparseTensorDescriptor<'h>
impl<'h> Unpin for BlockSparseTensorDescriptor<'h>
impl<'h> UnsafeUnpin for BlockSparseTensorDescriptor<'h>
impl<'h> UnwindSafe for BlockSparseTensorDescriptor<'h>
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