12#ifndef O2_MCH_RAW_IMPL_HELPERS_NOFBITS_H
13#define O2_MCH_RAW_IMPL_HELPERS_NOFBITS_H
18#include <fmt/format.h>
25 return static_cast<int>(std::floor(log2(1.0 *
val)) + 1);
32 if (
static_cast<uint64_t
>(
value) >= (
static_cast<uint64_t
>(1) <<
n)) {
33 throw std::invalid_argument(fmt::format(
"{} : 0x{:x} has {} bits, which is more than the {} allowed",
msg,
value,
nofBits(
value),
n));
GLsizei const GLfloat * value
void assertNofBits(std::string_view msg, T value, int n)
uint64_t const void const *restrict const msg