pub struct GpuSpMatVec { /* private fields */ }Expand description
Unified GPU sparse matrix operations interface
Implementations§
Source§impl GpuSpMatVec
impl GpuSpMatVec
Sourcepub fn new() -> SparseResult<Self>
pub fn new() -> SparseResult<Self>
Create a new GPU sparse matrix handler with automatic backend detection
Sourcepub fn with_backend(backend: GpuBackend) -> SparseResult<Self>
pub fn with_backend(backend: GpuBackend) -> SparseResult<Self>
Create a new GPU sparse matrix handler with specified backend
Sourcepub fn spmv<T>(
&self,
matrix: &CsrArray<T>,
vector: &ArrayView1<'_, T>,
device: Option<&GpuDevice>,
) -> SparseResult<Array1<T>>
pub fn spmv<T>( &self, matrix: &CsrArray<T>, vector: &ArrayView1<'_, T>, device: Option<&GpuDevice>, ) -> SparseResult<Array1<T>>
Execute sparse matrix-vector multiplication on GPU
Sourcepub fn spmv_optimized<T>(
&self,
matrix: &CsrArray<T>,
vector: &ArrayView1<'_, T>,
device: Option<&GpuDevice>,
optimization_hint: OptimizationHint,
) -> SparseResult<Array1<T>>
pub fn spmv_optimized<T>( &self, matrix: &CsrArray<T>, vector: &ArrayView1<'_, T>, device: Option<&GpuDevice>, optimization_hint: OptimizationHint, ) -> SparseResult<Array1<T>>
Execute optimized sparse matrix-vector multiplication
Sourcepub fn backend(&self) -> GpuBackend
pub fn backend(&self) -> GpuBackend
Get the current backend
Sourcepub fn is_gpu_available(&self) -> bool
pub fn is_gpu_available(&self) -> bool
Check if GPU acceleration is available
Sourcepub fn get_backend_info(&self) -> BackendInfo
pub fn get_backend_info(&self) -> BackendInfo
Get backend-specific information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuSpMatVec
impl !RefUnwindSafe for GpuSpMatVec
impl Send for GpuSpMatVec
impl Sync for GpuSpMatVec
impl Unpin for GpuSpMatVec
impl !UnwindSafe for GpuSpMatVec
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