Expand description
cuSPARSE-compatible API shim over the crate’s host sparse kernels.
This module mirrors the shape of the core cuSPARSE generic-API entry points
so that code written against cuSPARSE reads almost unchanged when ported to
OxiCUDA. The naming is cuSPARSE-flavoured (a library handle with a
create/destroy lifecycle and a scalar pointer mode, plus cusparse_spmv /
cusparse_spgemm / cusparse_spsv operations) but the surface is fully
idiomatic Rust: operations take & references, return
SparseResult, validate their arguments, and expose no raw pointers or
unsafe.
All operations act on the crate’s host CSR type HostCsr and delegate to
its existing kernels:
cusparse_spmvcomputesy = alpha * A * x + beta * yby reusingHostCsr::matvec;cusparse_spgemmcomputesC = A * Bby reusingHostCsr::matmul(the crate’s Gustavson sparse-sparse product);cusparse_spsvsolves the triangular systemA * x = alpha * bfor a lower- or upper-triangularAby sparse forward/backward substitution.
The triangular descriptor is expressed with the crate’s existing
FillMode and DiagType enums (re-exported from oxicuda-blas), the
same descriptor types the GPU sptrsv uses.
Structs§
- Cusparse
Compat Handle - A cuSPARSE-compatible library handle, analogous to
cusparseHandle_t.
Enums§
- Cusparse
Pointer Mode - How scalar arguments (
alpha,beta) are interpreted, mirroringcusparsePointerMode_t.
Functions§
- cusparse_
spgemm - Computes the sparse-sparse product
C = A * B, mirroringcusparseSpGEMM. - cusparse_
spmv - Computes the sparse matrix-vector product
y = alpha * A * x + beta * y, mirroringcusparseSpMVfor a CSR operand. - cusparse_
spsv - Solves the triangular system
A * x = alpha * b, mirroringcusparseSpSV.