Skip to content

Commit

Permalink
fix evaluation order dependet expression
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Jan 27, 2022
1 parent 7a04de5 commit e0b31a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/factorization/elimination_forest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ void compute_elim_forest_children_impl(const IndexType* parent, IndexType size,
// we count the same again, this time shifted by 1 => exclusive prefix sum
for (IndexType i = 0; i < size; i++) {
const auto p = parent[i];
child[child_ptr[p + 1]++] = i;
child[child_ptr[p + 1]] = i;
child_ptr[p + 1]++;
}
}

Expand Down Expand Up @@ -98,7 +99,9 @@ void compute_elim_forest_postorder_lvl_impl(
postorder_idx++;
} else {
// otherwise go to the next child node
cur_node = child[first_child + current_child[cur_node]++];
const auto old_node = cur_node;
cur_node = child[first_child + current_child[old_node]];
current_child[old_node]++;
level_idx++;
}
}
Expand Down

0 comments on commit e0b31a5

Please sign in to comment.