Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
BitUtils.hxx File Reference
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <type_traits>

Namespaces

namespace  ROOT
namespace  ROOT::Internal

Functions

template<typename T>
constexpr T ROOT::Internal::AlignUp (T value, T align) noexcept
 Round value up to the next multiple of align.
constexpr bool ROOT::Internal::IsValidAlignment (std::size_t align) noexcept
 Return true if align is a valid C++ alignment value: strictly positive and a power of two.
template<typename T>
std::size_t ROOT::Internal::LeadingZeroes (T x)
 Given an integer x, returns the number of leading 0-bits starting at the most significant bit position.
template<typename T>
std::size_t ROOT::Internal::TrailingZeroes (T x)
 Given an integer x, returns the number of trailing 0-bits starting at the least significant bit position.