Commit ea4989b
committed
sparse/linalg: fix SpMV handle lifecycle, complex dtypes, tol→rtol, M precond, MINRES SPD guard, GMRES pr_norm callback
- gemv.cpp: split into _sparse_gemv_init / _sparse_gemv_compute / _sparse_gemv_release
so optimize_gemv fires exactly once per operator rather than once per iteration.
- types_matrix.hpp: register complex64/complex128 × int32/int64 pairs for oneMKL
sparse::gemv (std::complex<float/double>).
- gemv.hpp: declare the three new entry points.
- sparse_py.cpp: bind _sparse_gemv_init, _sparse_gemv_compute, _sparse_gemv_release
and remove the old monolithic _sparse_gemv binding.
- _iterative.py: redesign around _CachedSpMV (init once, compute per matvec,
release in __del__); rename tol→rtol with backward-compat alias; enable M
preconditioner for cg/gmres; fix MINRES beta SPD check (check sign before sqrt,
not after abs); add Paige-Saunders multi-criterion stopping (Anorm/ynorm/Acond);
implement GMRES callback_type='pr_norm'; fix GMRES maxiter default semantics;
add order='F' to GMRES Krylov basis V.1 parent c6d109d commit ea4989b
5 files changed
Lines changed: 572 additions & 325 deletions
File tree
- dpnp
- backend/extensions/sparse
- scipy/sparse/linalg
0 commit comments