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

Refactor Communication Classes #338

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

Refactor Communication Classes #338

wants to merge 16 commits into from

Conversation

FG-TUM
Copy link
Member

@FG-TUM FG-TUM commented Sep 5, 2024

Description

Some cleanups around communication helper classes.

Meant as preparation work for #321.

Related Pull Requests

Resolved Issues

How Has This Been Tested?

@FG-TUM FG-TUM added the clean-up related to the clean-up of the code and tech dept label Sep 5, 2024
@FG-TUM FG-TUM self-assigned this Sep 5, 2024
src/parallel/NeighborAcquirer.cpp Dismissed Show dismissed Hide dismissed
@FG-TUM FG-TUM marked this pull request as ready for review September 11, 2024 13:45
Comment on lines 108 to 110
// Before every set of push_backs make sure there is enough space for this set + all remaining.
// Work with the assumption that the others are of the same size as the current ones.
// This is potentially an overestimate but avoids a large number of resizes.
Copy link
Contributor

@SamNewcome SamNewcome Sep 12, 2024

Choose a reason for hiding this comment

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

Is this assumption because the sizes of the regions decrease, so you can guarantee this is an overestimate? Or is this simply a guess? In which case, what is the reasoning behind the guess? Ultimately, I don't really mind if the reasoning is something as simple as "better than doing nothing but otherwise arbitrary," but the reasoning behind the choice should be somewhat more documented.

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea was to call reserve for every region and reserve the vector as if all following regions are of this region's size. Thus it would always be an overestimate since in the end the vector is reserved according to the biggest region. Calls to reserve with smaller sizes don't do anything.

Looking at the code now I realize that it is not doing what I intended... Let me create a fix...

Copy link
Member Author

Choose a reason for hiding this comment

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

have a look at the updated doc -> c317648

@HomesGH HomesGH changed the title Refactor Communcation Classes Refactor Communication Classes Sep 22, 2024
@FG-TUM FG-TUM requested a review from SamNewcome October 7, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean-up related to the clean-up of the code and tech dept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants