QUDA
1.0.0
|
Compute Cholesky decomposition of A. By default, we use a modified Cholesky which avoids the division and sqrt, and instead only needs rsqrt. In which case we must use a modified forward and backward difference substitution. More...
Public Member Functions | |
__device__ __host__ | Cholesky (const Mat< T, N > &A) |
Constructor that computes the Cholesky decomposition. More... | |
__device__ __host__ const T | D (int i) const |
Return the diagonal element of the Cholesky decomposition L(i,i) More... | |
template<class Vector > | |
__device__ __host__ Vector | forward (const Vector &b) |
Forward substition to solve Lx = b. More... | |
template<class Vector > | |
__device__ __host__ Vector | backward (const Vector &b) |
Backward substition to solve L^dagger x = b. More... | |
__device__ __host__ Mat< T, N > | invert () |
Compute the inverse of A (the matrix used to construct the Cholesky decomposition). More... | |
Private Attributes | |
Mat< T, N > | L_ |
The Cholesky factorization. More... | |
Compute Cholesky decomposition of A. By default, we use a modified Cholesky which avoids the division and sqrt, and instead only needs rsqrt. In which case we must use a modified forward and backward difference substitution.
Mat | The Matrix container class type. This can either be a general Matrix (quda::Matrix) or a Hermitian matrix (quda::HMatrix). |
T | The underlying type. For Hermitian matrices this should be real type and for general matrices this should be the complex type. |
N | The size of the linear system we are solving |
fast | Whether to use the optimized Cholesky algorithm that stores the reciprocal sqrt on the diagonal of L, instead of the sqrt. This flag must be consistent with the equivalent flag used with the forward and backward substitutions. |
Definition at line 38 of file linalg.cuh.
|
inline |
Constructor that computes the Cholesky decomposition.
[in] | A | Input matrix we are decomposing |
Definition at line 48 of file linalg.cuh.
References quda::linalg::Cholesky< Mat, T, N, fast >::L_, quda::s, and quda::sqrt().
|
inline |
Backward substition to solve L^dagger x = b.
Vector | The Vector container class, e.g., quda::colorspinor |
[in] | b | Source vector |
Definition at line 123 of file linalg.cuh.
References quda::linalg::Cholesky< Mat, T, N, fast >::L_.
Referenced by quda::computeAV(), and quda::computeTMCAV().
|
inline |
Return the diagonal element of the Cholesky decomposition L(i,i)
[in] | i | Index |
Definition at line 84 of file linalg.cuh.
References quda::linalg::Cholesky< Mat, T, N, fast >::L_.
Referenced by quda::cloverInvertCompute().
|
inline |
Forward substition to solve Lx = b.
Vector | The Vector container class, e.g., quda::colorspinor |
[in] | b | Source vector |
Definition at line 97 of file linalg.cuh.
References quda::linalg::Cholesky< Mat, T, N, fast >::L_.
Referenced by quda::computeAV(), and quda::computeTMCAV().
|
inline |
Compute the inverse of A (the matrix used to construct the Cholesky decomposition).
Definition at line 146 of file linalg.cuh.
References quda::linalg::Cholesky< Mat, T, N, fast >::L_.
Referenced by quda::cloverInvertCompute(), and quda::ComputeTMAVGPU().
|
private |
The Cholesky factorization.
Definition at line 41 of file linalg.cuh.
Referenced by quda::linalg::Cholesky< Mat, T, N, fast >::backward(), quda::linalg::Cholesky< Mat, T, N, fast >::Cholesky(), quda::linalg::Cholesky< Mat, T, N, fast >::D(), quda::linalg::Cholesky< Mat, T, N, fast >::forward(), and quda::linalg::Cholesky< Mat, T, N, fast >::invert().