diff options
author | Matthew Sotoudeh <sotoudeh@stanford.edu> | 2022-01-11 08:17:22 -0800 |
---|---|---|
committer | Matthew Sotoudeh <sotoudeh@stanford.edu> | 2022-01-11 08:17:22 -0800 |
commit | 78099270c67208c7647785ebbf98e03132b8b5dc (patch) | |
tree | 189e3cf0b5dd8edb695a408888c4712b46a151a1 | |
parent | 5eeb5b5e3ac34e72259070aea858dc58932b861a (diff) |
This seems to be the best of the past few commitsincremental-current-bestincremental-adj-for-dirty
-rw-r--r-- | src/theory/arith/idl/idl_extension.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/theory/arith/idl/idl_extension.cpp b/src/theory/arith/idl/idl_extension.cpp index ce9d6c020..6c9a2f7e5 100644 --- a/src/theory/arith/idl/idl_extension.cpp +++ b/src/theory/arith/idl/idl_extension.cpp @@ -173,26 +173,26 @@ void IdlExtension::postCheck(Theory::Effort level) if (!Theory::fullEffort(level)) { Assert(conflict_cycle.empty()); if (!d_dirty.get()) return; - //std::vector<bool> node_dirty = d_node_dirty; - //std::vector<bool> next_node_dirty(d_numVars, false); - //std::fill(std::begin(d_node_dirty), std::end(d_node_dirty), false); + std::vector<bool> node_dirty = d_node_dirty; + std::vector<bool> next_node_dirty(d_numVars, false); + std::fill(std::begin(d_node_dirty), std::end(d_node_dirty), false); d_dirty = false; for (size_t i = 0; i < d_numVars; i++) { // TODO: d_diameter - // std::fill(std::begin(next_node_dirty), std::end(next_node_dirty), false); + std::fill(std::begin(next_node_dirty), std::end(next_node_dirty), false); bool any_modified = false; // TODO: The order of these edges does seem to make a difference, but I // haven't yet found a better ordering than this (I guess, insertion // order?). for (const auto &edge : d_matrix) { - // if (!node_dirty[edge.first.first]) continue; + if (!node_dirty[edge.first.first]) continue; size_t edge_src = edge.first.first, edge_dst = edge.first.second; Integer edge_weight = edge.second; Integer alt_distance = d_dist[edge_src]->get() + edge_weight; if (d_dist[edge_dst]->get() <= alt_distance) continue; any_modified = true; - // node_dirty[edge_dst] = true; - // next_node_dirty[edge_dst] = true; + node_dirty[edge_dst] = true; + next_node_dirty[edge_dst] = true; d_dist[edge_dst]->set(alt_distance); d_pred[edge_dst]->set(edge_src); if ((i + 1) == d_numVars) { @@ -211,7 +211,7 @@ void IdlExtension::postCheck(Theory::Effort level) } } if (!any_modified) return; - // std::swap(node_dirty, next_node_dirty); + std::swap(node_dirty, next_node_dirty); } } } |