CG Solver
-
template<class
MatType, classVecType, typenameNumType>
classCG: public BaseIterativeSolver<MatType, VecType, NumType> Implementation of the Conjugate Gradient (CG) method.
- Template Parameters
MatType: Matrix type (HostMatrix<NumType> and DeviceMatrix<NumTyper> currently supported).VecType: Vector type (HostVector<NumType> and DeviceVector<NumTyper> currently supported).NumType: Number type (double and float currently supported).
Public Functions
-
CG() Default constructor.
-
~CG() Destructor.
-
void
clear() Clear memory.
-
void
solve(const MatType &mat, const VecType &rhs, VecType *soln) Solves for
solninmat*soln=rhs.- Parameters
mat: The matrix in the above equation.rhs: The vector in the above equation.soln: The vector in the above equation.