set

set#

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

◆ set() [2/3]

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

Sets the bit at the given position.

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