fetch_xor

fetch_xor#

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

◆ fetch_xor()

template<typename T , typename Allocator = safe_device_allocator<T>>
template<STDGPU_DETAIL_OVERLOAD_IF(std::is_integral_v< T >) >
STDGPU_DEVICE_ONLY T stdgpu::atomic< T, Allocator >::fetch_xor ( const T  arg,
const memory_order  order = memory_order_seq_cst 
)
noexcept

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

Parameters
[in]argThe other argument of bitwise XOR
[in]orderThe memory order
Returns
The old value