-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Optimize atomic_thread_fence
#740
Optimize atomic_thread_fence
#740
Conversation
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 suggest minor comment edits and sorting the suppressed warnings; other than that, this looks good to me. Assuming that interlocked operations on separate guard variables provide a sufficient fence, there should be no ODR concerns with mixing-and-matching; older TUs will share a single separate guard variable.
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
After @pcordes comment, I'm now thinking that But I'll need to add intrinsic include ( |
Thanks for this performance improvement - I'm really glad you noticed it! 😸 |
Thanks to @pcordes for great explanations on this subject! |
Fix #739 (without saving stack variable)