warp.optim.linear#

Iterative linear solvers for sparse linear systems.

This module provides GPU-accelerated iterative methods for solving linear systems, including conjugate gradient (CG), biconjugate gradient stabilized (BiCGSTAB), conjugate residual (CR), and generalized minimal residual (GMRES) methods.

API#

LinearOperator

Linear operator to be used as left-hand-side of linear iterative solvers.

aslinearoperator

Cast the dense or sparse matrix A as a LinearOperator.

bicgstab

Compute an approximate solution to a linear system using the Biconjugate Gradient Stabilized method (BiCGSTAB).

cg

Compute an approximate solution to a symmetric, positive-definite linear system using the Conjugate Gradient algorithm.

cr

Compute an approximate solution to a symmetric, positive-definite linear system using the Conjugate Residual algorithm.

gmres

Compute an approximate solution to a linear system using the restarted Generalized Minimum Residual method (GMRES[k]).

preconditioner

Construct and return a preconditioner for an input matrix.