summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-03-12 23:28:10 +0100
committerClifford Wolf <clifford@clifford.at>2014-03-12 23:28:10 +0100
commita4d72de91dc017b299d6c11d67786274f1326133 (patch)
tree790fed4c767daee0c9808282f69790440fc0b67e
parent8127d5e8c35da6610dc9fd43cca66ff9ca41f078 (diff)
Some fixes in libs/minisat (thanks to Siesh1oo)
-rw-r--r--libs/minisat/Solver.cc10
-rw-r--r--libs/minisat/System.cc6
-rw-r--r--libs/minisat/UPDATE.sh3
3 files changed, 10 insertions, 9 deletions
diff --git a/libs/minisat/Solver.cc b/libs/minisat/Solver.cc
index ebca294a..14aa3935 100644
--- a/libs/minisat/Solver.cc
+++ b/libs/minisat/Solver.cc
@@ -994,11 +994,11 @@ void Solver::printStats() const
{
double cpu_time = cpuTime();
double mem_used = memUsedPeak();
- printf("restarts : %"PRIu64"\n", starts);
- printf("conflicts : %-12"PRIu64" (%.0f /sec)\n", conflicts , conflicts /cpu_time);
- printf("decisions : %-12"PRIu64" (%4.2f %% random) (%.0f /sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions /cpu_time);
- printf("propagations : %-12"PRIu64" (%.0f /sec)\n", propagations, propagations/cpu_time);
- printf("conflict literals : %-12"PRIu64" (%4.2f %% deleted)\n", tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
+ printf("restarts : %" PRIu64 "\n", starts);
+ printf("conflicts : %-12" PRIu64 " (%.0f /sec)\n", conflicts , conflicts /cpu_time);
+ printf("decisions : %-12" PRIu64 " (%4.2f %% random) (%.0f /sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions /cpu_time);
+ printf("propagations : %-12" PRIu64 " (%.0f /sec)\n", propagations, propagations/cpu_time);
+ printf("conflict literals : %-12" PRIu64 " (%4.2f %% deleted)\n", tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
if (mem_used != 0) printf("Memory used : %.2f MB\n", mem_used);
printf("CPU time : %g s\n", cpu_time);
}
diff --git a/libs/minisat/System.cc b/libs/minisat/System.cc
index 01d0dfe1..df4155af 100644
--- a/libs/minisat/System.cc
+++ b/libs/minisat/System.cc
@@ -79,7 +79,7 @@ double Minisat::memUsed() {
struct rusage ru;
getrusage(RUSAGE_SELF, &ru);
return (double)ru.ru_maxrss / 1024; }
-double Minisat::memUsedPeak() { return memUsed(); }
+double Minisat::memUsedPeak(bool) { return memUsed(); }
#elif defined(__APPLE__)
@@ -89,11 +89,11 @@ double Minisat::memUsed() {
malloc_statistics_t t;
malloc_zone_statistics(NULL, &t);
return (double)t.max_size_in_use / (1024*1024); }
-double Minisat::memUsedPeak() { return memUsed(); }
+double Minisat::memUsedPeak(bool) { return memUsed(); }
#else
double Minisat::memUsed() { return 0; }
-double Minisat::memUsedPeak() { return 0; }
+double Minisat::memUsedPeak(bool) { return 0; }
#endif
diff --git a/libs/minisat/UPDATE.sh b/libs/minisat/UPDATE.sh
index 88fcf759..539ee23f 100644
--- a/libs/minisat/UPDATE.sh
+++ b/libs/minisat/UPDATE.sh
@@ -7,6 +7,7 @@ mv minisat_upstream/LICENSE minisat_upstream/minisat/*/*.{h,cc} .
rm -rf minisat_upstream
sed -i -e 's,^#include *"minisat/[^/]\+,#include "libs/minisat,' *.cc *.h
-sed -i -e 's/PRIi64/ & /' Options.h
+sed -i -e 's/Minisat::memUsedPeak()/Minisat::memUsedPeak(bool)/' System.cc
+sed -i -e 's/PRI[iu]64/ & /' Options.h Solver.cc
sed -i -e '1 i #define __STDC_LIMIT_MACROS' *.cc
sed -i -e '1 i #define __STDC_FORMAT_MACROS' *.cc