|
template<class T > |
constexpr T | std::bit_ceil (T x) noexcept |
| Calculates the smallest integral power of two that is not smaller than x. More...
|
|
template<class T > |
constexpr T | std::bit_width (T x) noexcept |
| If x is not zero, calculates the number of bits needed to store the value x, that is, 1 + floor(log2(x)). If x is zero, returns zero. More...
|
|
template<class T > |
constexpr int | std::countl_zero (T x) noexcept |
| Returns the number of consecutive 0 bits in the value of x, starting from the most significant bit ("left"). More...
|
|
template<class T > |
constexpr int | std::countr_zero (T x) noexcept |
| Returns the number of consecutive 0 bits in the value of x, starting from the least significant bit ("right"). More...
|
|
template<class T > |
constexpr bool | std::has_single_bit (T x) noexcept |
| Checks if x is an integral power of two. More...
|
|
template<class T > |
constexpr int | std::popcount (T x) noexcept |
| Returns the number of 1 bits in the value of x. More...
|
|
Provides the C++20 <bit> header if it is not already available.
- Author
- Enrico Seiler <enrico.seiler AT fu-berlin.de>
-
Marcel Ehrhardt <marcel.ehrhardt AT fu-berlin.de>