1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

Added timing to deflation code.

This commit is contained in:
James Richings 2021-11-09 12:33:25 +00:00
parent fd13a3f2be
commit 2ad1811642

View File

@ -75,24 +75,19 @@ public:
virtual void operator()(const Field &src,Field &guess) {
GridStopWatch w1;
GridStopWatch w2;
guess = Zero();
w1.Start();
guess = Zero();
w1.Stop();
LOG(Message) << "Zeroing the 'out' vector took: " << w1.Elapsed() << std::endl;
w2.Start();
for (int i=0;i<N;i++) {
const Field& tmp = evec[i];
axpy(guess,TensorRemove(innerProduct(tmp,src)) / eval[i],tmp,guess);
}
w2.Stop();
w1.Stop();
guess.Checkerboard() = src.Checkerboard();
LOG(Message) << "This projection took: " << w2.Elapsed() << std::endl;
std::cout << GridLogDebug << "This projection took: " << w1.Elapsed() << std::endl;
}
};