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

atomic: Make all operations follow sequentially consistent ordering #176

Merged
merged 1 commit into from
May 25, 2020

Conversation

stotko
Copy link
Owner

@stotko stotko commented May 25, 2020

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 stotko added this to the 1.3.0 milestone May 25, 2020
@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #176 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   97.80%   97.81%           
=======================================
  Files          28       28           
  Lines        1825     1833    +8     
=======================================
+ Hits         1785     1793    +8     
  Misses         40       40           
Impacted Files Coverage Δ
src/stdgpu/impl/atomic_detail.cuh 98.44% <100.00%> (ø)
src/stdgpu/impl/bitset_detail.cuh 100.00% <100.00%> (ø)
src/stdgpu/openmp/impl/atomic_detail.h 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89ec1d2...8db9363. Read the comment docs.

@stotko stotko merged commit 25af2e0 into master May 25, 2020
@stotko stotko deleted the atomic_seq_cst branch May 25, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant