-
Notifications
You must be signed in to change notification settings - Fork 784
pdn: Give pins stable order #8904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -616,6 +616,11 @@ void PadDirectConnectionStraps::initialize(ConnectionType type) | |
| break; | ||
| } | ||
|
|
||
| std::sort(pins_.begin(), pins_.end(), [](odb::dbBox* l, odb::dbBox* r) { | ||
| return std::make_tuple(l->xMin(), l->xMax(), l->yMin(), l->yMax()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "std::make_tuple" is directly included [misc-include-cleaner] src/pdn/src/straps.cpp:14: - #include <utility>
+ #include <tuple>
+ #include <utility> |
||
| < std::make_tuple(r->xMin(), r->xMax(), r->yMin(), r->yMax()); | ||
| }); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While sorting here does close the discrepancy between my local runs and the CI, @gadfort points out
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern here is that this is only masking the issue, as far as I can tell the order of these boxes matches the order they are in the database. Have you checked that the ordering of these boxes in the database differs?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, why not just use the compare provided by the database for sorting
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I take that as sorting
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I took a look, the order of
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually think a much more likely culprit might be the rtree storing the shapes. This would cause the order in which we write the shapes to the database to differ because the order in the tree is different. |
||
|
|
||
| debugPrint(getLogger(), | ||
| utl::PDN, | ||
| "Pad", | ||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use a ranges version of this algorithm [modernize-use-ranges]