30 return (
v & (
v - 1)) == 0;
47 return (
value + align - 1) & ~(align - 1);
52template <std::
size_t AlignT>
66 constexpr std::size_t
maxBits =
sizeof(T) * 8;
67 static_assert(std::is_integral_v<T> && (
maxBits == 32 ||
maxBits == 64));
73 unsigned long idx = 0;
83 std::uint32_t low = (
x & 0xFFFF'FFFF);
84 std::uint32_t high = (
x >> 32) & 0xFFFF'FFFF;
93 return static_cast<std::size_t
>(idx);
102 return static_cast<std::size_t
>(
maxBits - 1 - idx);
121 constexpr std::size_t
maxBits =
sizeof(T) * 8;
122 static_assert(std::is_integral_v<T> && (
maxBits == 32 ||
maxBits == 64));
128 unsigned long idx = 0;
138 std::uint32_t low = (
x & 0xFFFF'FFFF);
139 std::uint32_t high = (
x >> 32) & 0xFFFF'FFFF;
154 return static_cast<std::size_t
>(idx);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
std::size_t LeadingZeroes(T x)
Given an integer x, returns the number of leading 0-bits starting at the most significant bit positio...
bool IsPowerOfTwo(std::uint64_t v)
constexpr T AlignUp(T value, T align) noexcept
Round value up to the next multiple of align.
std::size_t TrailingZeroes(T x)
Given an integer x, returns the number of trailing 0-bits starting at the least significant bit posit...
constexpr bool IsValidAlignment(std::size_t align) noexcept
Return true if align is a valid C++ alignment value: strictly positive and a power of two.
Storage type whose alignment matches AlignT bytes.