Skip to content

Commit

Permalink
mpl2: avoid setting inst property of clusters that have no children d…
Browse files Browse the repository at this point in the history
…uring mixed leaves splitting

Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed Jan 22, 2024
1 parent 5934d87 commit 295e077
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/mpl2/src/hier_rtlmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2248,13 +2248,15 @@ void HierRTLMP::breakMixedLeaves(
const std::vector<std::vector<Cluster*>>& mixed_leaves)
{
for (const std::vector<Cluster*>& sister_mixed_leaves : mixed_leaves) {
Cluster* parent = sister_mixed_leaves[0]->getParent();
if (!sister_mixed_leaves.empty()) {
Cluster* parent = sister_mixed_leaves.front()->getParent();

for (Cluster* mixed_leaf : sister_mixed_leaves) {
breakMixedLeaf(mixed_leaf);
}
for (Cluster* mixed_leaf : sister_mixed_leaves) {
breakMixedLeaf(mixed_leaf);
}

setInstProperty(parent);
setInstProperty(parent);
}
}
}

Expand Down

0 comments on commit 295e077

Please sign in to comment.