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: functions changed to have more explicit output #5778

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bnmfw
Copy link
Contributor

@bnmfw bnmfw commented Sep 19, 2024

This PR contain minor changes to some functions in PA. Functions changed take a reference to a container and fill said container. This PR changes it so instead it returns it.

This makes the functions role easier to understand, as its more obvious that its role is to return that structure and that it is an output, not an input.

This should not affect performance as due to move semantics instead of copying the returned structure its ownership is transferred to the caller.

Some functions have name changes:

  • prepPoint_pin_mergePinShapesmergePinShapes (Conform to PR #5770)
  • initMaster2PinLayerRangeinitMasterToPinLayerRange

Also LayerRange was changed to a pair instead of a tuple, as its always a tuple of 2 elements. This does not affect its use in code as it is accessed using auto [a, b] = LayerRange.

Copy link
Contributor

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

src/drt/src/pa/FlexPA_init.cpp Outdated Show resolved Hide resolved
src/drt/src/pa/FlexPA_prep.cpp Outdated Show resolved Hide resolved
@maliberty
Copy link
Member

I'm satisfied but want to leave a chance for @osamahammad21 to comment before merging.

Copy link
Contributor

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

@@ -69,21 +69,21 @@ class UniqueInsts
void setDesign(frDesign* design) { design_ = design; }

private:
using LayerRange = std::tuple<frLayerNum, frLayerNum>;
using LayerRange = std::pair<frLayerNum, frLayerNum>;
using MasterLayerRange = std::map<frMaster*, LayerRange, frBlockObjectComp>;
Copy link
Member

Choose a reason for hiding this comment

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

Use frBlockObjectMap instead, not necessary in this PR.

@bnmfw bnmfw added the drt Detailed Routing label Sep 21, 2024
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.

3 participants