30 template<std::
integral T>
33#if defined(__cpp_lib_byteswap) && __cpp_lib_byteswap >= 202110L
34 return std::byteswap(
value);
36 static_assert(std::has_unique_object_representations_v<T>,
"T may not have padding bits");
43 template <
class T>
requires (std::unsigned_integral<T>)
48 return std::numeric_limits<T>::digits - std::countl_zero(n) - 1;
51 template<std::
integral T>
54 return (n + T(3)) &
~T(3);
57 template<std::
integral T>
Definition AcousticMaterial.h:36
constexpr int MSBIndex(T n) noexcept
Definition Bits.h:44
constexpr T Byteswap(T value) noexcept
Definition Bits.h:31
constexpr T RoundUpBy4(T n) noexcept
Definition Bits.h:52
JPL_INLINE simd min(const simd &a, const simd &b) noexcept
Element-wise min.
Definition SIMD.h:1813
constexpr std::size_t BitWidthOf() noexcept
Definition Bits.h:58