Update sources with chrono in input value

This commit is contained in:
Alejandro Gallo 2021-10-05 16:58:37 +02:00
parent 6adf3fb7a1
commit 44977bd186
2 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,8 @@ namespace atrip {
, *Vppph = nullptr , *Vppph = nullptr
; ;
int maxIterations = 0, iterationMod = -1; int maxIterations = 0, iterationMod = -1;
bool barrier = true; bool barrier = false;
bool chrono = false;
Input& with_epsilon_i(CTF::Tensor<double> * t) { ei = t; return *this; } Input& with_epsilon_i(CTF::Tensor<double> * t) { ei = t; return *this; }
Input& with_epsilon_a(CTF::Tensor<double> * t) { ea = t; return *this; } Input& with_epsilon_a(CTF::Tensor<double> * t) { ea = t; return *this; }
Input& with_Tai(CTF::Tensor<double> * t) { Tph = t; return *this; } Input& with_Tai(CTF::Tensor<double> * t) { Tph = t; return *this; }
@ -36,6 +37,7 @@ namespace atrip {
Input& with_maxIterations(int i) { maxIterations = i; return *this; } Input& with_maxIterations(int i) { maxIterations = i; return *this; }
Input& with_iterationMod(int i) { iterationMod = i; return *this; } Input& with_iterationMod(int i) { iterationMod = i; return *this; }
Input& with_barrier(bool i) { barrier = i; return *this; } Input& with_barrier(bool i) { barrier = i; return *this; }
Input& with_chrono(bool i) { chrono = i; return *this; }
}; };
struct Output { struct Output {

View File

@ -287,6 +287,7 @@ Atrip::Output Atrip::run(Atrip::Input const& in) {
<< " ===========================\n"; << " ===========================\n";
// PRINT TIMINGS // PRINT TIMINGS
if (in.chrono)
for (auto const& pair: chrono) for (auto const& pair: chrono)
LOG(1, " ") << pair.first << " :: " LOG(1, " ") << pair.first << " :: "
<< pair.second.count() << pair.second.count()
@ -525,6 +526,7 @@ Atrip::Output Atrip::run(Atrip::Input const& in) {
<< globalEnergy << std::endl; << globalEnergy << std::endl;
// PRINT TIMINGS {{{1 // PRINT TIMINGS {{{1
if (in.chrono)
for (auto const& pair: chrono) for (auto const& pair: chrono)
LOG(0,"atrip:chrono") << pair.first << " " LOG(0,"atrip:chrono") << pair.first << " "
<< pair.second.count() << std::endl; << pair.second.count() << std::endl;