atomic_fetch_xor

atomic_fetch_xor#

stdgpu: stdgpu::atomic_fetch_xor
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ atomic_fetch_xor()

template<typename T , typename Allocator >
STDGPU_DEVICE_ONLY T stdgpu::atomic_fetch_xor ( atomic< T, Allocator > *  obj,
const typename atomic< T, Allocator >::difference_type  arg 
)
noexcept

Atomically computes and stores the bitwise XOR of the stored value and the given argument.

Parameters
[in]objThe atomic object
[in]argThe other argument of bitwise XOR
Returns
The old value