pub struct SparseView<'a, T: 'a, Format, Arch>where
Format: SparseFormat,
Arch: SimdArch,{ /* private fields */ }Expand description
Format-parameterized sparse matrix view.
Implementations§
Source§impl<'a, T: 'a, Format, Arch> SparseView<'a, T, Format, Arch>where
Format: SparseFormat,
Arch: SimdArch,
impl<'a, T: 'a, Format, Arch> SparseView<'a, T, Format, Arch>where
Format: SparseFormat,
Arch: SimdArch,
Source§impl<'a, T: 'a, Arch> SparseView<'a, T, Csr, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, Arch> SparseView<'a, T, Csr, Arch>where
Arch: SimdArch,
Source§impl<'a, T: 'a, Arch> SparseView<'a, T, Validated<Csr>, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, Arch> SparseView<'a, T, Validated<Csr>, Arch>where
Arch: SimdArch,
Sourcepub fn try_from_csr(data: CsrData<'a, T>) -> Result<Self, SimdError>
pub fn try_from_csr(data: CsrData<'a, T>) -> Result<Self, SimdError>
Validate CSR storage and create a SpMV-ready view.
Sourcepub fn from_validated_csr(data: ValidatedData<CsrData<'a, T>>) -> Self
pub fn from_validated_csr(data: ValidatedData<CsrData<'a, T>>) -> Self
Create a SpMV-ready view from already-validated CSR storage.
§Panics
If Arch cannot execute on this host.
Source§impl<'a, T: 'a, const C: usize, Arch> SparseView<'a, T, SellP<C>, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, const C: usize, Arch> SparseView<'a, T, SellP<C>, Arch>where
Arch: SimdArch,
Sourcepub fn from_sellp(data: SellPData<'a, T, C>) -> Self
pub fn from_sellp(data: SellPData<'a, T, C>) -> Self
Source§impl<'a, T: 'a, const C: usize, Arch> SparseView<'a, T, Validated<SellP<C>>, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, const C: usize, Arch> SparseView<'a, T, Validated<SellP<C>>, Arch>where
Arch: SimdArch,
Sourcepub fn try_from_sellp(data: SellPData<'a, T, C>) -> Result<Self, SimdError>
pub fn try_from_sellp(data: SellPData<'a, T, C>) -> Result<Self, SimdError>
Validate SELL-p storage and create a SpMV-ready view.
Sourcepub fn from_validated_sellp(data: ValidatedData<SellPData<'a, T, C>>) -> Self
pub fn from_validated_sellp(data: ValidatedData<SellPData<'a, T, C>>) -> Self
Create a SpMV-ready view from already-validated SELL-p storage.
§Panics
If Arch cannot execute on this host.
Source§impl<'a, T: 'a, const BM: usize, const BN: usize, Arch> SparseView<'a, T, BlockedCoo<BM, BN>, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, const BM: usize, const BN: usize, Arch> SparseView<'a, T, BlockedCoo<BM, BN>, Arch>where
Arch: SimdArch,
Sourcepub fn from_blocked_coo(data: BlockedCooData<'a, T, BM, BN>) -> Self
pub fn from_blocked_coo(data: BlockedCooData<'a, T, BM, BN>) -> Self
Create a SparseView over Blocked-COO data (generic BM, BN).
§Panics
If Arch cannot execute on this host.
Source§impl<'a, T: 'a, const BM: usize, const BN: usize, Arch> SparseView<'a, T, Validated<BlockedCoo<BM, BN>>, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, const BM: usize, const BN: usize, Arch> SparseView<'a, T, Validated<BlockedCoo<BM, BN>>, Arch>where
Arch: SimdArch,
Sourcepub fn try_from_blocked_coo(
data: BlockedCooData<'a, T, BM, BN>,
) -> Result<Self, SimdError>
pub fn try_from_blocked_coo( data: BlockedCooData<'a, T, BM, BN>, ) -> Result<Self, SimdError>
Validate Blocked-COO storage and create a SpMV-ready view.
Sourcepub fn from_validated_blocked_coo(
data: ValidatedData<BlockedCooData<'a, T, BM, BN>>,
) -> Self
pub fn from_validated_blocked_coo( data: ValidatedData<BlockedCooData<'a, T, BM, BN>>, ) -> Self
Create a SpMV-ready view from already-validated Blocked-COO storage.
§Panics
If Arch cannot execute on this host.
Source§impl<'a, T: 'a, Arch> SparseView<'a, T, DenseWithMask, Arch>where
Arch: SimdArch,
impl<'a, T: 'a, Arch> SparseView<'a, T, DenseWithMask, Arch>where
Arch: SimdArch,
Sourcepub fn from_dense_with_mask(data: DenseWithMaskData<'a, T>) -> Self
pub fn from_dense_with_mask(data: DenseWithMaskData<'a, T>) -> Self
Trait Implementations§
Source§impl<'a, T, Format, Arch> ComputeView for SparseView<'a, T, Format, Arch>where
Format: SparseFormat,
Arch: SimdArch,
impl<'a, T, Format, Arch> ComputeView for SparseView<'a, T, Format, Arch>where
Format: SparseFormat,
Arch: SimdArch,
Source§impl<'a, T, Arch> SparseOps<T> for SparseView<'a, T, Csr, Arch>
impl<'a, T, Arch> SparseOps<T> for SparseView<'a, T, Csr, Arch>
Source§fn sum_values(&self) -> T
fn sum_values(&self) -> T
Compute the sum of all elements stored in the sparse matrix.
Source§fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
Elementwise multiply the sparse matrix values by corresponding entries
in a dense matrix, writing the results to
out_values.Source§impl<'a, T, const C: usize, Arch> SparseOps<T> for SparseView<'a, T, SellP<C>, Arch>
impl<'a, T, const C: usize, Arch> SparseOps<T> for SparseView<'a, T, SellP<C>, Arch>
Source§fn sum_values(&self) -> T
fn sum_values(&self) -> T
Compute the sum of all elements stored in the sparse matrix.
Source§fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
Elementwise multiply the sparse matrix values by corresponding entries
in a dense matrix, writing the results to
out_values.Source§impl<'a, T, const BM: usize, const BN: usize, Arch> SparseOps<T> for SparseView<'a, T, BlockedCoo<BM, BN>, Arch>
impl<'a, T, const BM: usize, const BN: usize, Arch> SparseOps<T> for SparseView<'a, T, BlockedCoo<BM, BN>, Arch>
Source§fn sum_values(&self) -> T
fn sum_values(&self) -> T
Compute the sum of all elements stored in the sparse matrix.
Source§fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
Elementwise multiply the sparse matrix values by corresponding entries
in a dense matrix, writing the results to
out_values.Source§impl<'a, T, Arch> SparseOps<T> for SparseView<'a, T, DenseWithMask, Arch>
impl<'a, T, Arch> SparseOps<T> for SparseView<'a, T, DenseWithMask, Arch>
Source§fn sum_values(&self) -> T
fn sum_values(&self) -> T
Compute the sum of all elements stored in the sparse matrix.
Source§fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
fn elementwise_mul_dense(&self, dense: &[T], out_values: &mut [T])
Elementwise multiply the sparse matrix values by corresponding entries
in a dense matrix, writing the results to
out_values.Source§impl<'a, T, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<Csr>, Arch>
impl<'a, T, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<Csr>, Arch>
Source§impl<'a, T, Arch> SparseSpMv<T> for SparseView<'a, T, DenseWithMask, Arch>
impl<'a, T, Arch> SparseSpMv<T> for SparseView<'a, T, DenseWithMask, Arch>
Source§impl<'a, T, const BM: usize, const BN: usize, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<BlockedCoo<BM, BN>>, Arch>
impl<'a, T, const BM: usize, const BN: usize, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<BlockedCoo<BM, BN>>, Arch>
Source§impl<'a, T, const C: usize, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<SellP<C>>, Arch>
impl<'a, T, const C: usize, Arch> SparseSpMv<T> for SparseView<'a, T, Validated<SellP<C>>, Arch>
Source§impl<'a, T: 'a, Format, Arch> SparseValidate for SparseView<'a, T, Format, Arch>
impl<'a, T: 'a, Format, Arch> SparseValidate for SparseView<'a, T, Format, Arch>
Source§impl<'a, T: 'a, Format, Arch> SparseViewShape for SparseView<'a, T, Format, Arch>
impl<'a, T: 'a, Format, Arch> SparseViewShape for SparseView<'a, T, Format, Arch>
Auto Trait Implementations§
impl<'a, T, Format, Arch> Freeze for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> RefUnwindSafe for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> Send for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> Sync for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> Unpin for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> UnsafeUnpin for SparseView<'a, T, Format, Arch>
impl<'a, T, Format, Arch> UnwindSafe for SparseView<'a, T, Format, Arch>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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