-
Notifications
You must be signed in to change notification settings - Fork 370
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
Ensure that thread-shared variable is initialized by single thread #2373
Conversation
@heplesser: I am generally positive towards the changes, but can you please provide a description of the problem this is solving or a link to an issue? |
I have added a short description and merged master so the actual change becomes better visible. |
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.
Thanks!
Pull request automatically marked stale! |
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.
Thanks @heplesser !
Just for the record: This is one of the suspicious lines of code we checked during one of our Hackathons?
And we concluded that:
- not having this in a single environment did not result in erroneous behavior, but it has the potential to cause errors in thread-parallel code, and
- runtime measurements showed that the single environment does have an effect on the runtime?
Yes to all! |
This PR ensures that the thread-global variable
decrease_buffer_size_spike_data_
is initialized by a single thread before entering the region in which it is used.