bit_ceil

bit_ceil#

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

◆ bit_ceil()

template<typename T , STDGPU_DETAIL_OVERLOAD_IF(std::is_unsigned_v< T >) >
STDGPU_HOST_DEVICE T stdgpu::bit_ceil ( const T  number)
noexcept

Computes the smallest power of two which is larger or equal than the given number.

Parameters
[in]numberA number
Returns
The smallest power of two which is larger than the given number