kryst 3.2.1

Krylov subspace and preconditioned iterative solvers for dense and sparse linear systems, with shared and distributed memory parallelism.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::algebra::parallel::{par_dot_conj_local, par_sum_abs2_local};
#[allow(unused_imports)]
use crate::algebra::prelude::*;

#[inline]
pub fn dot_conj(x: &[S], y: &[S]) -> S {
    par_dot_conj_local(x, y)
}

#[inline]
pub fn nrm2(x: &[S]) -> R {
    // Cheaper for complex scalars: avoids a complex multiply per element.
    par_sum_abs2_local(x).sqrt()
}