Skip to main content

gmres_impl

Function gmres_impl 

Source
pub fn gmres_impl<R, C>(
    client: &C,
    a: &CsrData<R>,
    b: &Tensor<R>,
    x0: Option<&Tensor<R>>,
    options: GmresOptions,
) -> Result<GmresResult<R>>
where R: Runtime<DType = DType>, R::Client: SparseOps<R>, C: SparseLinAlgAlgorithms<R> + SparseOps<R> + BinaryOps<R> + UnaryOps<R> + ReduceOps<R> + ScalarOps<R>,
Expand description

Generic GMRES implementation

Implements right-preconditioned GMRES with Arnoldi iteration and Givens rotations. All operations are performed via tensor primitives to ensure no GPU↔CPU transfers.

§Type Parameters

  • R - Runtime (CPU, CUDA, WebGPU)
  • C - Client type implementing required operations