We need to have an atomicCAS() equivalent available, some way or another for all types up to the hardware capability for atomic ops (8 bytes, i.e. unsigned long long int). Right now there's only apply_atomically() exposed, which is nice, but not enough.
So let's:
Properly expose atomic::compare_and_swap() the way it is now (i.e. only for the types CUDA supports directly).
Implement atomic::compare_and_swap() for smaller types using the larger type.
We need to have an
atomicCAS()
equivalent available, some way or another for all types up to the hardware capability for atomic ops (8 bytes, i.e.unsigned long long int
). Right now there's onlyapply_atomically()
exposed, which is nice, but not enough.So let's:
atomic::compare_and_swap()
the way it is now (i.e. only for the types CUDA supports directly).atomic::compare_and_swap()
for smaller types using the larger type.