atomic_fetch_and_explicit

atomic_fetch_and_explicit#

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

◆ atomic_fetch_and_explicit()

template<typename T , typename Allocator >
STDGPU_DEVICE_ONLY T stdgpu::atomic_fetch_and_explicit ( atomic< T, Allocator > *  obj,
const typename atomic< T, Allocator >::value_type  arg,
const memory_order  order 
)
noexcept

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

Parameters
[in]objThe atomic object
[in]argThe other argument of bitwise AND
[in]orderThe memory order
Returns
The old value