Skip to main content

sor_impl

Function sor_impl 

Source
pub fn sor_impl<R, C>(
    client: &C,
    a: &CsrData<R>,
    b: &Tensor<R>,
    x0: Option<&Tensor<R>>,
    options: SorOptions,
) -> Result<SorResult<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 SOR implementation via sparse triangular solve

Each iteration:

  1. r = b - A*x (SpMV on device)
  2. rhs = omega * r (scalar mul on device)
  3. delta = (D + omega*L)^{-1} * rhs (sparse forward substitution on device)
  4. x = x + delta (vector add on device)