This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog Summary
Builds upon previous atomic refactor to create implementations of
cuda::atomic_ref
andcuda::std::atomic_ref
Related Work
#179 - Refactor included back-end pathways for
atomic_ref
types.Details
This implementation conforms to the C++20 specification of
atomic_ref
.Deviations
cuda::std::atomic_ref
is backported to C++11.cuda::atomic_ref
hasfetch_min
/fetch_max
overloadsMotivation
atomic_ref
provides a modern abstraction for visibility and ordering of reads and writes to memory according to the C++ memory model. This interface can be used to replace uses of CUDA specificatomicOperation(_Scope)
functions in device code and provides interoperability with host code.Previously:
With
atomic_ref
:Design
Builds upon existing
atomic
pathways to create theatomic_ref
front end. There were several changes required to properly cast into the correct lower level interface.Tests for
atomic_ref
were replicated out of otheratomic
baseline tests, these provide coverage for both pointer and integral operations.Host only libcxx tests were also added to provide coverage from a host standard library view and to ensure that the implementation is sound.
Testing
Virtuals:
New tests have been added that exercise all interfaces of
atomic_ref