From b0fc62509a89f906da9bc2731afa806f3cc293c5 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 16 Oct 2018 22:20:48 -0700 Subject: [PATCH] Add more code to dump results --- src/Tuner/multituner.cc | 17 +++++++++++++++++ src/Tuner/multituner.h | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Tuner/multituner.cc b/src/Tuner/multituner.cc index 25dcc5d..f28e781 100644 --- a/src/Tuner/multituner.cc +++ b/src/Tuner/multituner.cc @@ -53,6 +53,22 @@ void MultiTuner::addProblem(const char *filename) { problems.push(new Problem(filename)); } +void MultiTuner::printData() { + model_print("*********** DATA DUMP ***********\n"); + for (uint i = 0; i < allTuners.getSize(); i++) { + TunerRecord *tuner = allTuners.get(i); + SearchTuner *stun = tuner->getTuner(); + model_print("Tuner %u\n", i); + stun->print(); + model_print("----------------------------------\n\n\n"); + for (uint j = 0; j < tuner->problems.getSize(); j++) { + Problem *problem = tuner->problems.get(j); + model_print("Problem %s\n", problem->getProblem()); + model_print("Time = %lld\n", tuner->getTime(problem)); + } + } +} + void MultiTuner::addTuner(SearchTuner *tuner) { TunerRecord *t = new TunerRecord(tuner); tuners.push(t); @@ -181,6 +197,7 @@ void MultiTuner::tuneComp() { } } } + printData(); } void MultiTuner::mapProblemsToTuners(Vector *tunerV) { diff --git a/src/Tuner/multituner.h b/src/Tuner/multituner.h index 69430cc..8ee0170 100644 --- a/src/Tuner/multituner.h +++ b/src/Tuner/multituner.h @@ -41,6 +41,7 @@ public: void addTuner(SearchTuner *tuner); void tuneK(); void tuneComp(); + void printData(); CMEMALLOC; protected: long long evaluate(Problem *problem, TunerRecord *tuner); @@ -50,7 +51,6 @@ protected: void improveTuners(Vector *tunerV); TunerRecord *tune(TunerRecord *tuner); - Vector allTuners; Vector problems; Vector tuners; -- 2.34.1