-
Notifications
You must be signed in to change notification settings - Fork 414
[Place] rename get_initial_move_lim to get_place_inner_loop_num_move #2955
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7697257
[vpr][place] rename get_initial_move_lim to get_place_inner_loop_num_…
amin1377 37c5fe1
fix a typo
amin1377 3f8d8e4
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 e6c296e
[vpr][place] update get_place_inner_loop_num_move comment
amin1377 7e9e587
[vpr][place] prrint number of moves per temp after getting the number
amin1377 292cd56
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 b154328
make format
amin1377 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
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.
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.
Probably renaming it to
comp_place_inner_loop_num_move()
makes it clear that it actually computes the value.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.
I honestly don't see that much difference between these two names :)
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.
I think it can go either way. For me, "get_..." methods are usually O(1) lookups. Whereas "calc_..." is used to calculate some value and is usually more expensive. It implicitly says that this function is not as cheap to call and care should be taken when putting it in a loop.
I used the same practice here: https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/85dfc2983cc74150959aca1ff7666c9b7c292fd7/vpr/src/analytical_place/flat_placement_density_manager.cpp
Although this function is cheap and is O(1), there is some complexity in here that implies that it shouldn't be called many times (For example the log message). Up to you honestly how you want to name this.
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.
That’s a good way to decide whether to name a function calc_* or get_*. Thanks, Alex!
I think we shouldn’t print the log message inside the helper function. I’ve removed it from there and instead added the log in the annealer constructor where the function is called.