Expand description
§OxiCUDA Sparse – GPU-Accelerated Sparse Matrix Operations
This crate provides GPU-accelerated sparse matrix operations, serving as a pure Rust equivalent to NVIDIA’s cuSPARSE library.
§Sparse formats
Multiple storage formats are supported via the format module:
CsrMatrix– Compressed Sparse Row (primary format)CscMatrix– Compressed Sparse ColumnCooMatrix– Coordinate (triplet)BsrMatrix– Block Sparse RowEllMatrix– ELLPACKHybMatrix– HYB (Hybrid ELL+COO)
§Operations
ops::spmv– Sparse matrix-vector multiply (y = alpha*A*x + beta*y)ops::spmm– Sparse-dense matrix multiply (C = alpha*A*B + beta*C)ops::spgemm– Sparse-sparse matrix multiply (C = A*B)ops::sptrsv– Sparse triangular solve (L*x = borU*x = b)ops::sddmm– Sampled Dense-Dense Matrix Multiply
§Preconditioners
preconditioner::ilu0– Incomplete LU(0) for general systemspreconditioner::ic0– Incomplete Cholesky(0) for SPD systemspreconditioner::ic_k– Incomplete Cholesky with level-of-fill (IC(k))preconditioner::amg– Smoothed-aggregation algebraic multigrid (setup, V-cycle, and a standalone solver)
§Eigensolvers
eig::lobpcg– LOBPCG for the smallest eigenpairs of a sparse SPD matrix, with an optional diagonal (Jacobi) preconditionereig::shift_invert– shift-invert power iteration for the eigenvalue closest to a target shift (interior eigenvalues)
§Compatibility shims
compat::cusparse_compat– a cuSPARSE-flavoured drop-in surface (cusparse_spmv/cusparse_spgemm/cusparse_spsv) over the host CSR type, for porting cuSPARSE code with minimal churn
These advanced solvers operate on the host-resident host_csr::HostCsr
representation, which can be lifted from a CsrMatrix via
HostCsr::from_gpu.
§Example
use oxicuda_sparse::prelude::*;Re-exports§
pub use error::SparseError;pub use error::SparseResult;pub use format::BsrMatrix;pub use format::CooMatrix;pub use format::CscMatrix;pub use format::Csr5Matrix;pub use format::CsrMatrix;pub use format::EllMatrix;pub use format::HybMatrix;pub use format::HybPartition;pub use format::HybStatistics;pub use handle::SparseHandle;
Modules§
- compat
- Drop-in compatibility shims mirroring vendor sparse-library APIs.
- eig
- Sparse eigenvalue solvers.
- error
- Error types for OxiCUDA Sparse operations.
- format
- Sparse matrix storage formats.
- handle
- Sparse handle management.
- host_
csr - Host-resident CSR matrix and shared CPU kernels for advanced solvers.
- ops
- Sparse matrix operations.
- preconditioner
- Incomplete factorization preconditioners for iterative solvers.
- prelude
- Prelude for convenient imports.