pub struct GpuSpMV { /* private fields */ }
Expand description
Enhanced GPU-accelerated Sparse Matrix-Vector multiplication implementation
Implementations§
Source§impl GpuSpMV
impl GpuSpMV
Sourcepub fn new() -> SparseResult<Self>
pub fn new() -> SparseResult<Self>
Create a new GPU SpMV instance with automatic backend detection
Sourcepub fn with_backend(backend: GpuBackend) -> SparseResult<Self>
pub fn with_backend(backend: GpuBackend) -> SparseResult<Self>
Create a new GPU SpMV instance with specified backend
Sourcepub fn spmv<T>(
&self,
rows: usize,
cols: usize,
indptr: &[usize],
indices: &[usize],
data: &[T],
x: &[T],
) -> SparseResult<Vec<T>>where
T: Float + Debug + Copy + Default + GpuDataType + Send + Sync + 'static + NumAssign + SimdUnifiedOps + Sum,
pub fn spmv<T>(
&self,
rows: usize,
cols: usize,
indptr: &[usize],
indices: &[usize],
data: &[T],
x: &[T],
) -> SparseResult<Vec<T>>where
T: Float + Debug + Copy + Default + GpuDataType + Send + Sync + 'static + NumAssign + SimdUnifiedOps + Sum,
Execute sparse matrix-vector multiplication: y = A * x
Sourcepub fn backend_info(&self) -> (GpuBackend, String)
pub fn backend_info(&self) -> (GpuBackend, String)
Get information about the current GPU backend
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuSpMV
impl !RefUnwindSafe for GpuSpMV
impl Send for GpuSpMV
impl Sync for GpuSpMV
impl Unpin for GpuSpMV
impl !UnwindSafe for GpuSpMV
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> 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