flip

flip#

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

◆ flip() [1/2]

template<typename Block = bitset_default_type, typename Allocator = safe_device_allocator<Block>>
STDGPU_DEVICE_ONLY bool stdgpu::bitset< Block, Allocator >::flip ( const index_t  n)

Flips the bit at the given position.

Parameters
[in]nThe position that should be flipped
Returns
The old value of the bit
Precondition
0 <= n < size()