Skip to main content

Crate oxicuda_sparse

Crate oxicuda_sparse 

Source
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:

§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 = b or U*x = b)
  • ops::sddmm – Sampled Dense-Dense Matrix Multiply

§Preconditioners

§Eigensolvers

  • eig::lobpcg – LOBPCG for the smallest eigenpairs of a sparse SPD matrix, with an optional diagonal (Jacobi) preconditioner
  • eig::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.