81 T mp; moveToFastMemoryHint(
mp);
82 T mmp; moveToFastMemoryHint(mmp);
83 T p; moveToFastMemoryHint(
p);
84 moveToFastMemoryHint(
psi,
true);
85 T r; moveToFastMemoryHint(
r);
86 T chi_internal; moveToFastMemoryHint(chi_internal);
88 chi_internal[
s] =
chi;
90 QDPIO::cout <<
"InvCG2: starting" << std::endl;
91 FlopCounter flopcount;
98 Real chi_sq = Real(norm2(chi_internal,
s));
99 flopcount.addSiteFlops(4*Nc*Ns,
s);
109 flopcount.addFlops(2*M.
nFlops());
111 r[
s] = chi_internal - mmp;
112 flopcount.addSiteFlops(2*Nc*Ns,
s);
119 flopcount.addSiteFlops(4*Nc*Ns,
s);
139 d = norm2(
mp,
s); flopcount.addSiteFlops(4*Nc*Ns,
s);
144 psi[
s] +=
a *
p; flopcount.addSiteFlops(4*Nc*Ns,
s);
150 flopcount.addFlops(M.
nFlops());
153 flopcount.addSiteFlops(4*Nc*Ns,
s);
158 cp = norm2(
r,
s); flopcount.addSiteFlops(4*Nc*Ns,
s);
164 p[
s] =
r +
b*
p; flopcount.addSiteFlops(4*Nc*Ns,
s);
169 flopcount.report(
"invcg2_timings", swatch.getTimeInSeconds());
170 revertFromFastMemoryHint(
psi,
true);
173 QDPIO::cout <<
"InvCG2 Timings: Iteration Count = " <<
k << std::endl;
183 SystemSolverResults_t
185 const LatticeFermion&
chi,
Primary include file for CHROMA library code.
virtual const Subset & subset() const =0
Return the subset on which the operator acts.
virtual unsigned long nFlops() const
SystemSolverResults_t InvCG2_timings(const LinearOperator< LatticeFermion > &M, const LatticeFermion &chi, LatticeFermion &psi, int MaxCG)
Conjugate-Gradient (CGNE) algorithm for a generic Linear Operator.
SystemSolverResults_t InvCG2_timings_a(const LinearOperator< T > &M, const T &chi, T &psi, int MaxCG)
Conjugate-Gradient (CGNE) algorithm for a generic Linear Operator.
Conjugate-Gradient algorithm for a generic Linear Operator.
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::T T
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > enum InvType invType const multi1d< Real > int MaxCG
multi1d< LatticeFermion > chi(Ncb)
multi1d< LatticeFermion > mp(Ncb)
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Holds return info from SystemSolver call.