Lines Matching refs:value
31 static_assert(std::is_integral<T>::value, "T must be integral"); in CLZ()
42 static_assert(std::is_integral<T>::value, "T must be integral"); in CTZ()
58 static constexpr ssize_t MostSignificantBit(T value) { in MostSignificantBit() argument
59 static_assert(std::is_integral<T>::value, "T must be integral"); in MostSignificantBit()
60 static_assert(std::is_unsigned<T>::value, "T must be unsigned"); in MostSignificantBit()
62 return (value == 0) ? -1 : std::numeric_limits<T>::digits - 1 - CLZ(value); in MostSignificantBit()
67 static constexpr ssize_t LeastSignificantBit(T value) { in LeastSignificantBit() argument
68 static_assert(std::is_integral<T>::value, "T must be integral"); in LeastSignificantBit()
69 static_assert(std::is_unsigned<T>::value, "T must be unsigned"); in LeastSignificantBit()
70 return (value == 0) ? -1 : CTZ(value); in LeastSignificantBit()
75 static constexpr size_t MinimumBitsToStore(T value) { in MinimumBitsToStore() argument
76 return static_cast<size_t>(MostSignificantBit(value) + 1); in MinimumBitsToStore()
81 static_assert(std::is_integral<T>::value, "T must be integral"); in RoundUpToPowerOfTwo()
82 static_assert(std::is_unsigned<T>::value, "T must be unsigned"); in RoundUpToPowerOfTwo()
89 static_assert(std::is_integral<T>::value, "T must be integral"); in IsPowerOfTwo()
96 static_assert(std::is_integral<T>::value, "T must be integral"); in WhichPowerOf2()
155 #define CHECK_ALIGNED(value, alignment) \ argument
156 CHECK(::art::IsAligned<alignment>(value)) << reinterpret_cast<const void*>(value)
158 #define DCHECK_ALIGNED(value, alignment) \ argument
159 DCHECK(::art::IsAligned<alignment>(value)) << reinterpret_cast<const void*>(value)
161 #define DCHECK_ALIGNED_PARAM(value, alignment) \ argument
162 DCHECK(::art::IsAlignedParam(value, alignment)) << reinterpret_cast<const void*>(value)
167 static_assert(std::is_integral<T>::value, "T must be integral"); in BitSizeOf()
180 static inline uint16_t Low16Bits(uint32_t value) { in Low16Bits() argument
181 return static_cast<uint16_t>(value); in Low16Bits()
184 static inline uint16_t High16Bits(uint32_t value) { in High16Bits() argument
185 return static_cast<uint16_t>(value >> 16); in High16Bits()
188 static inline uint32_t Low32Bits(uint64_t value) { in Low32Bits() argument
189 return static_cast<uint32_t>(value); in Low32Bits()
192 static inline uint32_t High32Bits(uint64_t value) { in High32Bits() argument
193 return static_cast<uint32_t>(value >> 32); in High32Bits()
198 static inline bool IsInt(size_t N, T value) { in IsInt() argument
205 return (-limit <= value) && (value < limit); in IsInt()
218 static constexpr bool IsInt(T value) { in IsInt() argument
221 static_assert(std::is_signed<T>::value, "Needs a signed type."); in IsInt()
226 (-GetIntLimit<T>(kBits) <= value) && (value < GetIntLimit<T>(kBits)); in IsInt()
230 static constexpr bool IsUint(T value) { in IsUint() argument
233 static_assert(std::is_integral<T>::value, "Needs an integral type."); in IsUint()
238 return (0 <= value) && in IsUint()
240 (static_cast<typename std::make_unsigned<T>::type>(value) <= in IsUint()
245 static constexpr bool IsAbsoluteUint(T value) { in IsAbsoluteUint() argument
247 static_assert(std::is_integral<T>::value, "Needs an integral type."); in IsAbsoluteUint()
251 : IsUint<kBits>(value < 0 in IsAbsoluteUint()
252 ? static_cast<unsigned_type>(-1 - value) + 1u // Avoid overflow. in IsAbsoluteUint()
253 : static_cast<unsigned_type>(value)); in IsAbsoluteUint()
261 static_assert(std::is_integral<T>::value, "T must be integral");
262 static_assert(std::is_unsigned<T>::value, "T must be unsigned");