pub struct SparseTensorCoreMatrix<T: Float + Debug + Send + Sync + 'static> { /* private fields */ }Expand description
Sparse tensor core matrix with 2:4 structured sparsity
Implementations§
Source§impl<T: Float + Debug + Send + Sync + 'static> SparseTensorCoreMatrix<T>
impl<T: Float + Debug + Send + Sync + 'static> SparseTensorCoreMatrix<T>
Sourcepub fn from_dense(dense: &Array2<T>) -> Self
pub fn from_dense(dense: &Array2<T>) -> Self
Create sparse matrix from dense matrix using 2:4 structured sparsity
Sourcepub fn denseshape(&self) -> (usize, usize)
pub fn denseshape(&self) -> (usize, usize)
Get dense shape
Sourcepub fn values_ptr(&self) -> *const T
pub fn values_ptr(&self) -> *const T
Get pointer to values for GPU kernels
Sourcepub fn metadata_ptr(&self) -> *const u8
pub fn metadata_ptr(&self) -> *const u8
Get pointer to metadata for GPU kernels
Sourcepub fn sparsity_ratio(&self) -> f32
pub fn sparsity_ratio(&self) -> f32
Get sparsity ratio
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SparseTensorCoreMatrix<T>
impl<T> RefUnwindSafe for SparseTensorCoreMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for SparseTensorCoreMatrix<T>
impl<T> Sync for SparseTensorCoreMatrix<T>
impl<T> Unpin for SparseTensorCoreMatrix<T>where
T: Unpin,
impl<T> UnsafeUnpin for SparseTensorCoreMatrix<T>
impl<T> UnwindSafe for SparseTensorCoreMatrix<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more