Last active
December 29, 2016 13:54
-
-
Save PolarNick239/5e370892989800fe42154145911b141f to your computer and use it in GitHub Desktop.
CUDA atomicCAS for float32
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
__device__ float atomicCAS_f32(float *p, float cmp, float val) { | |
return __int_as_float(atomicCAS((int *) p, __float_as_int(cmp), __float_as_int(val))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment