Skip to content

Commit 7b5d315

Browse files
dpl: fix non-deterministic sort in compareNodesX with cell ID tie-breaker
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
1 parent dc6dc6d commit 7b5d315

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/dpl/src/optimization/detailed_manager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ class DetailedMgr
265265
// Needs cell centers.
266266
bool operator()(Node* p, Node* q) const
267267
{
268-
return p->getCenterX() < q->getCenterX();
268+
if (p->getCenterX() != q->getCenterX())
269+
return p->getCenterX() < q->getCenterX();
270+
return p->getId() < q->getId();
269271
}
270272
bool operator()(Node*& s, DbuX i) const { return s->getCenterX() < i; }
271273
bool operator()(DbuX i, Node*& s) const { return i < s->getCenterX(); }

0 commit comments

Comments
 (0)