atomic: Make all operations follow sequentially consistent ordering by stotko · Pull Request #176 · stotko/stdgpu (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation1 Commits1 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

@stotko

Up to now, atomic and atomic_ref do not specify the memory order that they will enforce. In the C++ standard library, the default memory order for calls to them is sequential consistency, so users will assume that stdgpu also enforces this order. However, we did not explicitly enforced this which might lead to runtime errors or dead locks. Explicitly make all atomic member functions, including load() and store() follow sequentially consistent ordering to ensure consistency with the C++ standard library.

@stotko

@codecov

@stotko stotko deleted the atomic_seq_cst branch

May 25, 2020 10:20

Labels

2 participants

@stotko