tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
bit_width.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_BIT_BIT_WIDTH_HPP
4#define TETL_BIT_BIT_WIDTH_HPP
5
9
10namespace etl {
11
20template <etl::builtin_unsigned_integer UInt>
21[[nodiscard]] constexpr auto bit_width(UInt x) noexcept -> int
22{
24}
25
26} // namespace etl
27
28#endif // TETL_BIT_BIT_WIDTH_HPP
constexpr auto countl_zero(UInt x) noexcept -> int
Returns the number of consecutive 0 bits in the value of x, starting from the most significant bit ("...
Definition countl_zero.hpp:23
constexpr auto bit_width(UInt x) noexcept -> int
If x is not zero, calculates the number of bits needed to store the value x, that is,...
Definition bit_width.hpp:21
Definition adjacent_find.hpp:8
static constexpr int digits
Definition numeric_limits.hpp:24