mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
remove memory alloc from statistics_report
This commit is contained in:
parent
eb8c53c164
commit
a2f5a5b50b
|
@ -867,8 +867,7 @@ class elim_uncnstr_tactic : public tactic {
|
||||||
void run(goal_ref const & g, goal_ref_buffer & result) {
|
void run(goal_ref const & g, goal_ref_buffer & result) {
|
||||||
bool produce_proofs = g->proofs_enabled();
|
bool produce_proofs = g->proofs_enabled();
|
||||||
TRACE("goal", g->display(tout););
|
TRACE("goal", g->display(tout););
|
||||||
std::function<void(statistics&)> coll = [&](statistics& st) { collect_statistics(st); };
|
statistics_report sreport([&](statistics& st) { collect_statistics(st); });
|
||||||
statistics_report sreport(coll);
|
|
||||||
tactic_report report("elim-uncnstr", *g);
|
tactic_report report("elim-uncnstr", *g);
|
||||||
m_vars.reset();
|
m_vars.reset();
|
||||||
collect_occs p;
|
collect_occs p;
|
||||||
|
|
|
@ -120,7 +120,7 @@ class statistics_report {
|
||||||
std::function<void(statistics& st)> m_collector;
|
std::function<void(statistics& st)> m_collector;
|
||||||
public:
|
public:
|
||||||
statistics_report(tactic& t):m_tactic(&t) {}
|
statistics_report(tactic& t):m_tactic(&t) {}
|
||||||
statistics_report(std::function<void(statistics&)>& coll): m_collector(coll) {}
|
statistics_report(std::function<void(statistics&)>&& coll): m_collector(std::move(coll)) {}
|
||||||
~statistics_report();
|
~statistics_report();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue