|
template<typename T > |
constexpr bool | is_power_of_2 (const T value) |
| Determines whether value is a power-of-2 number.
|
|
template<std::size_t BASE, typename T > |
constexpr bool | is_power_of (const T value) |
| Determines whether value is a power-of-BASE number. Checks the equality BASE^n == value , where n is an integer.
|
|
template<std::integral T> |
T | ceil_div (const T numerator, const T denominator) |
| Divide numerator by denominator and round up to integer. Both inputs must be positive integer. Specifically, numerator >= 0 and denominator > 0.
|
|
template<std::integral T> |
T | next_multiple (const T value, const T multiple) |
| Get the next number that is an integer multiple of multiple . Specifically, get the minimum number x = C * multiple >= value where C is an integer >= 0. Currently supports positive integers only.
|
|
template<std::integral T> |
T | next_power_of_2_multiple (const T value, const T multiple) |
| Same as next_multiple(T, T) except that multiple must be a power of 2 number.
|
|