31#ifndef ETL_POW_INCLUDED
32#define ETL_POW_INCLUDED
46 namespace private_power
48#if ETL_NOT_USING_64BIT_TYPES
49 typedef uint32_t type;
51 typedef uint64_t type;
60 template <
size_t Value,
size_t Power>
63 static ETL_CONSTANT private_power::type value = Value *
power<Value, Power - 1>::value;
66 template <
size_t Value,
size_t Power>
67 ETL_CONSTANT private_power::type power<Value, Power>::value;
74 template <
size_t Value>
77 static ETL_CONSTANT private_power::type value = 1;
80 template <
size_t Value>
81 ETL_CONSTANT private_power::type power<Value, 0>::value;
84 template <
size_t Value,
size_t Power>
85 inline constexpr size_t power_v = power<Value, Power>::value;
92 template <
size_t Value>
97 value = 1 << (
etl::log2<Value - 1>::value + 1)
116 template <
size_t Value>
117 inline constexpr size_t power_of_2_round_up_v = power_of_2_round_up<Value>::value;
124 template <
size_t Value>
129 value = 1 << (
etl::log2<Value - 1>::value)
176 template <
size_t Value>
177 inline constexpr size_t power_of_2_round_down_v = power_of_2_round_down<Value>::value;
184 template <
size_t Value>
187 static ETL_CONSTANT
bool value = (Value & (Value - 1)) == 0;
198 static ETL_CONSTANT
bool value =
false;
209 static ETL_CONSTANT
bool value =
false;
212 template <
size_t Value>
213 ETL_CONSTANT
bool is_power_of_2<Value>::value;
216 template <
size_t Value>
217 inline constexpr size_t is_power_of_2_v = is_power_of_2<Value>::value;
bitset_ext
Definition absolute.h:39