Skip to content

Commit

Permalink
Merge pull request #2268 from langston-barrett/lb/eqrel-insertall
Browse files Browse the repository at this point in the history
eqrel: Simplify insertAll
  • Loading branch information
Bernhard Scholz authored May 1, 2022
2 parents db45ef0 + 0ebb75f commit 7be1e61
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/include/souffle/datastructure/EquivalenceRelation.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,10 @@ class EquivalenceRelation {
other.genAllDisjointSetLists();

// iterate over partitions at a time
for (typename StatesMap::chunk it : other.equivalencePartition.getChunks(MAX_THREADS)) {
for (auto& p : it) {
value_type rep = p.first;
StatesList& pl = *p.second;
const std::size_t ksize = pl.size();
for (std::size_t i = 0; i < ksize; ++i) {
this->sds.unionNodes(rep, pl.get(i));
}
for (auto&& [rep, pl] : other.equivalencePartition) {
const std::size_t ksize = pl->size();
for (std::size_t i = 0; i < ksize; ++i) {
this->sds.unionNodes(rep, pl->get(i));
}
}
// invalidate iterators unconditionally
Expand Down

0 comments on commit 7be1e61

Please sign in to comment.