Skip to content
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

drt: nodes structure refactoring and elimination of getFlatIdx #5903

Merged
merged 5 commits into from
Dec 5, 2024

Conversation

bnmfw
Copy link
Contributor

@bnmfw bnmfw commented Oct 9, 2024

Nodes structure change

The nodes vector has been refactored to be a vector of vectors index by the old "nested id". This allowed for the elimination of the getFlatIdx() function, as now the indexing for nodes is always done through both idx.

I benchmarked this changed and it seems to either not impact performance and improve memory consumption in some cases.

This change impacts various parts of the code as the structure is present in most of the functions that work with Access Patterns.

getEdgeCost refactoring

This PR also contains some minor refactoring on getEdgeCost (both implementations).

The refactoring that does not have to do with the nodes restructuring are:

  • Returning the edge cost directly to allow for use of guards
  • On the long getEdgeCost implementation both checks for violation edges were unified.

Copy link
Contributor

github-actions bot commented Oct 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

github-actions bot commented Oct 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

@bnmfw bnmfw changed the title drt: nodes structure refactoring drt: nodes structure refactoring and elimination of getFlatIdx Oct 9, 2024
@bnmfw bnmfw mentioned this pull request Oct 14, 2024
Copy link
Member

@osamahammad21 osamahammad21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is cleaner to go with one of those 2 choices:

  • use vector of unique pointers and reference the objects by their pointers.
  • the current vector of object but reference by index or object reference.

@bnmfw bnmfw force-pushed the drt_nodes_vec_vec branch from 49bcd04 to 6cd5ef0 Compare December 2, 2024 17:40
Copy link
Contributor

github-actions bot commented Dec 2, 2024

clang-tidy review says "All clean, LGTM! 👍"

@bnmfw bnmfw marked this pull request as ready for review December 2, 2024 18:16
@bnmfw bnmfw requested a review from osamahammad21 December 2, 2024 18:53
@bnmfw
Copy link
Contributor Author

bnmfw commented Dec 2, 2024

@osamahammad21 I'm running a ISPD and Secure Ci on this new version, but I strongly suspect they will pass, so this is ready for review

Signed-off-by: bernardo <[email protected]>
@bnmfw bnmfw force-pushed the drt_nodes_vec_vec branch from 6cd5ef0 to 3f22116 Compare December 3, 2024 16:17
Copy link
Contributor

github-actions bot commented Dec 3, 2024

clang-tidy review says "All clean, LGTM! 👍"

@bnmfw bnmfw added drt Detailed Routing and removed In Progress labels Dec 3, 2024
@bnmfw bnmfw requested a review from osamahammad21 December 3, 2024 19:19
@bnmfw bnmfw mentioned this pull request Dec 4, 2024
@osamahammad21 osamahammad21 merged commit 1d61007 into The-OpenROAD-Project:master Dec 5, 2024
11 checks passed
@bnmfw bnmfw deleted the drt_nodes_vec_vec branch December 6, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drt Detailed Routing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants