pub fn gpu_cg_solver(
mat: &SparseMatrixGpu,
b: &[f64],
max_iter: usize,
tol: f64,
) -> (Vec<f64>, usize, f64)Expand description
Conjugate gradient solver for symmetric positive-definite systems A·x = b.
Returns (x, iterations, final_residual_norm).
Terminates when the relative residual ‖r‖/‖b‖ < tol or after max_iter
steps.