diff --git a/src/Main.C b/src/Main.C index 93d5a36..f188264 100644 --- a/src/Main.C +++ b/src/Main.C @@ -19,6 +19,9 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "Solver.h" #include +#include +#include +#include #include #include #include @@ -167,13 +170,16 @@ void printStats(SolverStats& stats) { double cpu_time = cpuTime(); int64 mem_used = memUsed(); - reportf("restarts : %"I64_fmt"\n", stats.starts); - reportf("conflicts : %-12"I64_fmt" (%.0f /sec)\n", stats.conflicts , stats.conflicts /cpu_time); - reportf("decisions : %-12"I64_fmt" (%.0f /sec)\n", stats.decisions , stats.decisions /cpu_time); - reportf("propagations : %-12"I64_fmt" (%.0f /sec)\n", stats.propagations, stats.propagations/cpu_time); - reportf("conflict literals : %-12"I64_fmt" (%4.2f %% deleted)\n", stats.tot_literals, (stats.max_literals - stats.tot_literals)*100 / (double)stats.max_literals); - if (mem_used != 0) reportf("Memory used : %.2f MB\n", mem_used / 1048576.0); - reportf("CPU time : %g s\n", cpu_time); + using namespace std; + cout << setprecision(0); + cout << "restarts : " << stats.starts << endl << flush; + cout << "conflicts : " << stats.conflicts << " (" << stats.conflicts / cpu_time << " /sec)" << endl << flush; + cout << "decisions : " << stats.decisions << " (" << stats.decisions / cpu_time << " /sec)" << endl << flush; + cout << "propagations : " << stats.propagations << " (" << stats.propagations / cpu_time << " /sec)" << endl << flush; + cout << std::setprecision(2); + cout << "conflict literals : " << stats.tot_literals << " (" << setw(4) << (stats.max_literals - stats.tot_literals)*100 / (double)stats.max_literals << " %% deleted)" << endl << flush; + if (mem_used != 0) std::cout << "Memory used : " << setprecision(2) << mem_used / 1048576.0 << " MB" << endl << flush; + cout << "CPU time : " << cpu_time << " s" << endl << flush; } Solver* solver;