-
Notifications
You must be signed in to change notification settings - Fork 939
psm: speedup #10080
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
Merged
Merged
psm: speedup #10080
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
92f956f
psm: simplify compare
gadfort 10323ad
psm: avoid additional call to compare
gadfort 16ed5c9
psm: node hold visited
gadfort 3833a6a
psm: use boost geom point
gadfort 6122d1c
psm: apply suggestions
gadfort 30a92f4
Merge branch 'master' into speedup1
gadfort File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ class Node | |
| { | ||
| bool operator()(const Node* lhs, const Node* rhs) const | ||
| { | ||
| return lhs->compare(rhs); | ||
| return lhs->compare(rhs) < 0; | ||
| } | ||
| }; | ||
|
|
||
|
|
@@ -52,22 +52,22 @@ class Node | |
| Node(const odb::Point& pt, odb::dbTechLayer* layer); | ||
| virtual ~Node() = default; | ||
|
|
||
| bool compare(const Node* other) const; | ||
| bool compare(const std::unique_ptr<Node>& other) const; | ||
| // Returns -1 if this < other, 0 if equal, +1 if this > other | ||
| int compare(const Node* other) const; | ||
| int compare(const std::unique_ptr<Node>& other) const; | ||
|
Comment on lines
+56
to
+57
Member
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. Probably this should be operator<=> but that can wait for another PR |
||
|
|
||
| const odb::Point& getPoint() const { return pt_; }; | ||
| odb::dbTechLayer* getLayer() const { return layer_; }; | ||
|
|
||
| bool isVisited() const { return visited_; } | ||
| void setVisited(bool visited) { visited_ = visited; } | ||
|
|
||
| void print(utl::Logger* logger, const std::string& prefix = "") const; | ||
| virtual std::string describe(const std::string& prefix) const; | ||
|
|
||
| std::string getName() const; | ||
| std::string getTypeName() const; | ||
|
|
||
| using CompareInformation = std::tuple<int, int, int, NodeType, int>; | ||
| CompareInformation compareTuple() const; | ||
| static CompareInformation dummyCompareTuple(); | ||
|
|
||
| protected: | ||
| virtual NodeType getType() const { return NodeType::kNode; } | ||
|
|
||
|
|
@@ -78,6 +78,7 @@ class Node | |
|
|
||
| odb::Point pt_; | ||
| odb::dbTechLayer* layer_; | ||
| bool visited_ = false; | ||
| }; | ||
|
|
||
| class SourceNode : public Node | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.