4#ifndef WPI_MEMORY_DETAIL_ILOG2_HPP_INCLUDED
5#define WPI_MEMORY_DETAIL_ILOG2_HPP_INCLUDED
19 template <
typename UInt>
22 return (x & (x - 1)) == 0;
28 unsigned long long value = x;
29 return sizeof(value) * CHAR_BIT -
static_cast<unsigned>(__builtin_clzll(value));
52 inline std::size_t
ilog2(std::uint64_t x)
detail namespace with internal helper functions
Definition input_adapters.h:32
std::size_t ilog2(std::uint64_t x)
Definition ilog2.hpp:52
std::size_t ilog2_ceil(std::uint64_t x)
Definition ilog2.hpp:59
constexpr bool is_power_of_two(UInt x)
Definition ilog2.hpp:20
std::size_t ilog2_base(std::uint64_t x)
Definition ilog2.hpp:25
Memory namespace.
Definition heap_allocator.hpp:20
Foonathan namespace.
Definition ntcore_cpp.h:26