From 9ada378e38333f36039182cce8f795146c0e8302 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Fri, 4 May 2018 10:58:01 +0100 Subject: [PATCH] Add timing --- lib/algorithms/iterative/ConjugateGradientMultiShift.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/algorithms/iterative/ConjugateGradientMultiShift.h b/lib/algorithms/iterative/ConjugateGradientMultiShift.h index 28a80ce6..9d2719fc 100644 --- a/lib/algorithms/iterative/ConjugateGradientMultiShift.h +++ b/lib/algorithms/iterative/ConjugateGradientMultiShift.h @@ -207,7 +207,10 @@ void operator() (LinearOperatorBase &Linop, const Field &src, std::vector cp=c; MatrixTimer.Start(); - Linop.HermOpAndNorm(p,mmp,d,qq); + //Linop.HermOpAndNorm(p,mmp,d,qq); // d is used + Linop.HermOp(p,mmp); + d=real(innerProduct(p,mmp)); + MatrixTimer.Stop(); AXPYTimer.Start(); @@ -253,11 +256,9 @@ void operator() (LinearOperatorBase &Linop, const Field &src, std::vector // Before: 3 x npole + 3 x npole // After : 2 x npole (ps[s]) => 3x speed up of multishift CG. - AXPYTimer.Start(); if( (!converged[s]) ) { axpy(psi[ss],-bs[s]*alpha[s],ps[s],psi[ss]); } - AXPYTimer.Stop(); } // Convergence checks