atomic operations
int atomic_xchg ( volatile __global int *p, int val)
Swaps the old
value stored at location p
with new value given by val
. Returns old
value.
from: https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/atomic_xchg.html
原文:https://www.cnblogs.com/aspirs/p/15024086.html