Skip to main content

Module gpu_sparse_solver

Module gpu_sparse_solver 

Source
Expand description

GPU sparse linear system solver (CPU mock implementation).

Provides CSR sparse matrix storage, SpMV, dot product, AXPY, conjugate gradient (CG), and preconditioned CG solvers that mirror GPU dispatch semantics while executing on the CPU.

Structs§

GpuSparseSolverStats
Performance statistics for a GPU sparse solve.
SparseMatrixGpu
Compressed Sparse Row (CSR) matrix stored in GPU-friendly layout.

Functions§

gpu_axpy
In-place AXPY: y ← a·x + y.
gpu_cg_solver
Conjugate gradient solver for symmetric positive-definite systems A·x = b.
gpu_dot
Dense dot product: ∑ aᵢ bᵢ.
gpu_jacobi_preconditioner
Build the Jacobi (diagonal) preconditioner for matrix mat.
gpu_pcg_solver
Preconditioned conjugate gradient solver.
gpu_spmv
Sparse matrix–vector product: y = A · x.
sparse_diagonal_matrix
Build a diagonal matrix from a dense vector.
sparse_identity
Build an n×n identity matrix in CSR format.