Home
last modified time | relevance | path

Searched refs:numeric_limits (Results 1 – 25 of 514) sorted by relevance

12345678910>>...21

/freebsd/contrib/llvm-project/libc/src/__support/CPP/
H A Dlimits.h34 template <class T> struct numeric_limits {}; struct
38 struct numeric_limits<short>
42 struct numeric_limits<unsigned short>
46 struct numeric_limits<int>
50 struct numeric_limits<unsigned int>
54 struct numeric_limits<long>
58 struct numeric_limits<unsigned long>
62 struct numeric_limits<long long>
66 struct numeric_limits<unsigned long long>
70 struct numeric_limits<char>
[all …]
H A Dbit.h68 return value == 0 ? cpp::numeric_limits<TYPE>::digits : BUILTIN(value); \
82 return __builtin_ctzg(value, cpp::numeric_limits<T>::digits); in countr_zero()
89 return cpp::numeric_limits<T>::digits; in countr_zero()
94 unsigned shift = cpp::numeric_limits<T>::digits >> 1; in countr_zero()
95 T mask = cpp::numeric_limits<T>::max() >> shift; in countr_zero()
125 return __builtin_clzg(value, cpp::numeric_limits<T>::digits); in ADD_SPECIALIZATION()
132 return cpp::numeric_limits<T>::digits;
135 for (unsigned shift = cpp::numeric_limits<T>::digits >> 1; shift;
188 return cpp::numeric_limits<T>::digits - cpp::countl_zero(value); in bit_width()
229 constexpr int N = cpp::numeric_limits<T>::digits; in rotl()
[all …]
/freebsd/contrib/llvm-project/libcxx/include/__bit/
H A Dcountl.h30 return __builtin_clzg(__t, numeric_limits<_Tp>::digits); in __countl_zero()
33 return numeric_limits<_Tp>::digits; in __countl_zero()
37 (numeric_limits<unsigned int>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
40 (numeric_limits<unsigned long>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
43 (numeric_limits<unsigned long long>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
47 const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits; in __countl_zero()
68 …return __t != numeric_limits<_Tp>::max() ? std::countl_zero(static_cast<_Tp>(~__t)) : numeric_limi… in countl_one()
H A Dcountr.h40 const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits; in __countr_zero_impl()
44 const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits; in __countr_zero_impl()
58 return __builtin_ctzg(__t, numeric_limits<_Tp>::digits); in __countr_zero()
60 return __t != 0 ? std::__countr_zero_impl(__t) : numeric_limits<_Tp>::digits; in __countr_zero()
73 …return __t != numeric_limits<_Tp>::max() ? std::countr_zero(static_cast<_Tp>(~__t)) : numeric_limi… in countr_one()
H A Dbit_ceil.h30 const unsigned __n = numeric_limits<_Tp>::digits - std::__countl_zero((_Tp)(__t - 1u)); in __bit_ceil()
31 …_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(__n != numeric_limits<_Tp>::digits, "Bad input to bit_ceil"); in __bit_ceil()
36 const unsigned __extra = numeric_limits<unsigned>::digits - numeric_limits<_Tp>::digits; in __bit_ceil()
/freebsd/contrib/llvm-project/libcxx/include/__numeric/
H A Dsaturation_arithmetic.h37 return std::numeric_limits<_Tp>::max(); in __add_sat()
42 return std::numeric_limits<_Tp>::max(); in __add_sat()
45 return std::numeric_limits<_Tp>::min(); in __add_sat()
56 return std::numeric_limits<_Tp>::min(); in __sub_sat()
61 return std::numeric_limits<_Tp>::max(); in __sub_sat()
64 return std::numeric_limits<_Tp>::min(); in __sub_sat()
74 return std::numeric_limits<_Tp>::max(); in __mul_sat()
78 return std::numeric_limits<_Tp>::max(); in __mul_sat()
80 return std::numeric_limits<_Tp>::min(); in __mul_sat()
91 if (__x == std::numeric_limits<_Tp>::min() && __y == _Tp{-1}) in __div_sat()
[all …]
/freebsd/contrib/llvm-project/libcxx/include/__cxx03/__bit/
H A Dcountl.h63 return __builtin_clzg(__t, numeric_limits<_Tp>::digits); in __countl_zero()
66 return numeric_limits<_Tp>::digits; in __countl_zero()
70 (numeric_limits<unsigned int>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
73 (numeric_limits<unsigned long>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
76 (numeric_limits<unsigned long long>::digits - numeric_limits<_Tp>::digits); in __countl_zero()
80 const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits; in __countl_zero()
H A Dcountr.h41 return __builtin_ctzg(__t, numeric_limits<_Tp>::digits); in __countr_zero()
44 return numeric_limits<_Tp>::digits; in __countr_zero()
53 const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits; in __countr_zero()
/freebsd/contrib/llvm-project/libcxx/include/__cxx03/__random/
H A Dclamp_to_integral.h27 bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
28 int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
32 static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix"); in __max_representable_int_for_float()
36 …return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bi… in __max_representable_int_for_float()
45 using _Lim = numeric_limits<_IntT>; in __clamp_to_integral()
H A Duniform_int_distribution.h55 static const size_t _WDt = numeric_limits<_Working_result_type>::digits;
56 static const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
105 const size_t __w_rt = numeric_limits<result_type>::digits; in __eval()
147 …_LIBCPP_HIDE_FROM_ABI explicit param_type(result_type __a = 0, result_type __b = numeric_limits<re…
164 …explicit uniform_int_distribution(result_type __a = 0, result_type __b = numeric_limits<result_typ…
206 const size_t __dt = numeric_limits<_UIntType>::digits; in operator()
211 if ((__rp & (numeric_limits<_UIntType>::max() >> (__dt - __w))) != 0) in operator()
/freebsd/contrib/llvm-project/libcxx/include/__random/
H A Dclamp_to_integral.h27 bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
28 int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
32 static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix"); in __max_representable_int_for_float()
36 …return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bi… in __max_representable_int_for_float()
45 using _Lim = numeric_limits<_IntT>; in __clamp_to_integral()
H A Duniform_int_distribution.h59 static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
60 static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
109 const size_t __w_rt = numeric_limits<result_type>::digits; in __eval()
151 …_LIBCPP_HIDE_FROM_ABI explicit param_type(result_type __a = 0, result_type __b = numeric_limits<re…
171 result_type __a, result_type __b = numeric_limits<result_type>::max())
174 …explicit uniform_int_distribution(result_type __a = 0, result_type __b = numeric_limits<result_typ…
217 const size_t __dt = numeric_limits<_UIntType>::digits; in operator()
222 if ((__rp & (numeric_limits<_UIntType>::max() >> (__dt - __w))) != 0) in operator()
/freebsd/contrib/llvm-project/libcxx/include/__cxx03/
H A Dlimits20 class numeric_limits
78 template<> class numeric_limits<cv bool>;
80 template<> class numeric_limits<cv char>;
81 template<> class numeric_limits<cv signed char>;
82 template<> class numeric_limits<cv unsigned char>;
83 template<> class numeric_limits<cv wchar_t>;
84 template<> class numeric_limits<cv char8_t>; // C++20
85 template<> class numeric_limits<cv char16_t>;
86 template<> class numeric_limits<cv char32_t>;
88 template<> class numeric_limits<cv short>;
[all …]
/freebsd/contrib/llvm-project/libc/src/__support/
H A Dstr_to_integer.h36 size_t src_len = cpp::numeric_limits<size_t>::max()) {
48 size_t src_len = cpp::numeric_limits<size_t>::max()) {
83 const size_t src_len = cpp::numeric_limits<size_t>::max()) {
116 !IS_UNSIGNED ? static_cast<ResultType>(cpp::numeric_limits<T>::max()) + 1
117 : cpp::numeric_limits<T>::max();
119 (is_positive ? cpp::numeric_limits<T>::max() : NEGATIVE_MAX);
157 return {cpp::numeric_limits<T>::max(), str_len, error_val};
159 return {cpp::numeric_limits<T>::min(), str_len, error_val};
H A Dwcs_to_integer.h30 size_t src_len = cpp::numeric_limits<size_t>::max()) {
42 size_t src_len = cpp::numeric_limits<size_t>::max()) {
70 const size_t src_len = cpp::numeric_limits<size_t>::max()) {
103 !IS_UNSIGNED ? static_cast<ResultType>(cpp::numeric_limits<T>::max()) + 1
104 : cpp::numeric_limits<T>::max();
106 (is_positive ? cpp::numeric_limits<T>::max() : NEGATIVE_MAX);
144 return {cpp::numeric_limits<T>::max(), str_len, error_val};
146 return {cpp::numeric_limits<T>::min(), str_len, error_val};
/freebsd/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/
H A DCodeViewRecordIO.cpp289 } else if (Value >= std::numeric_limits<int8_t>::min() && in emitEncodedSignedInteger()
290 Value <= std::numeric_limits<int8_t>::max()) { in emitEncodedSignedInteger()
295 } else if (Value >= std::numeric_limits<int16_t>::min() && in emitEncodedSignedInteger()
296 Value <= std::numeric_limits<int16_t>::max()) { in emitEncodedSignedInteger()
301 } else if (Value >= std::numeric_limits<int32_t>::min() && in emitEncodedSignedInteger()
302 Value <= std::numeric_limits<int32_t>::max()) { in emitEncodedSignedInteger()
321 } else if (Value <= std::numeric_limits<uint16_t>::max()) { in emitEncodedUnsignedInteger()
326 } else if (Value <= std::numeric_limits<uint32_t>::max()) { in emitEncodedUnsignedInteger()
344 } else if (Value >= std::numeric_limits<int8_t>::min() && in writeEncodedSignedInteger()
345 Value <= std::numeric_limits<int8_t>::max()) { in writeEncodedSignedInteger()
[all …]
/freebsd/contrib/llvm-project/lld/MachO/
H A DOutputSegment.cpp87 .Case(segment_names::llvm, std::numeric_limits<int>::max() - 1) in segmentOrder()
90 .Case(segment_names::linkEdit, std::numeric_limits<int>::max()) in segmentOrder()
117 std::numeric_limits<int>::max() - 1) in sectionOrder()
118 .Case(section_names::ehFrame, std::numeric_limits<int>::max()) in sectionOrder()
142 return std::numeric_limits<int>::max() - 3; in sectionOrder()
144 return std::numeric_limits<int>::max() - 2; in sectionOrder()
146 return std::numeric_limits<int>::max() - 1; in sectionOrder()
148 return std::numeric_limits<int>::max(); in sectionOrder()
169 .Case(section_names::codeSignature, std::numeric_limits<int>::max()) in sectionOrder()
177 return std::numeric_limits<int>::max(); in sectionOrder()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DWinEHFuncInfo.h100 int UnwindHelpFrameIdx = std::numeric_limits<int>::max();
101 int PSPSymFrameIdx = std::numeric_limits<int>::max();
110 int EHRegNodeFrameIndex = std::numeric_limits<int>::max();
111 int EHRegNodeEndOffset = std::numeric_limits<int>::max();
112 int EHGuardFrameIndex = std::numeric_limits<int>::max();
113 int SEHSetFrameOffset = std::numeric_limits<int>::max();
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64MachineFunctionInfo.h41 int FrameIndex = std::numeric_limits<int>::max();
117 int StackHazardSlotIndex = std::numeric_limits<int>::max();
118 int StackHazardCSRSlotIndex = std::numeric_limits<int>::max();
208 int SwiftAsyncContextFrameIdx = std::numeric_limits<int>::max();
247 int64_t VGIdx = std::numeric_limits<int>::max();
248 int64_t StreamingVGIdx = std::numeric_limits<int>::max();
363 int64_t MinOffset = std::numeric_limits<int64_t>::max(); in getCalleeSavedStackSize()
364 int64_t MaxOffset = std::numeric_limits<int64_t>::min(); in getCalleeSavedStackSize()
375 if (SwiftAsyncContextFrameIdx != std::numeric_limits<int>::max()) { in getCalleeSavedStackSize()
382 if (StackHazardCSRSlotIndex != std::numeric_limits<int>::max()) { in getCalleeSavedStackSize()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/include/fuzzer/
H A DFuzzedDataProvider.h196 return ConsumeIntegralInRange(std::numeric_limits<T>::min(), in ConsumeIntegral()
197 std::numeric_limits<T>::max()); in ConsumeIntegral()
231 if (range != std::numeric_limits<decltype(range)>::max()) in ConsumeIntegralInRange()
241 return ConsumeFloatingPointInRange<T>(std::numeric_limits<T>::lowest(), in ConsumeFloatingPoint()
242 std::numeric_limits<T>::max()); in ConsumeFloatingPoint()
256 if (max > zero && min < zero && max > min + std::numeric_limits<T>::max()) { in ConsumeFloatingPointInRange()
284 result /= static_cast<T>(std::numeric_limits<IntegralType>::max()); in ConsumeProbability()
380 static_assert(!std::numeric_limits<TU>::is_signed, in ConvertUnsignedToSigned()
384 if (std::numeric_limits<TS>::is_modulo) in ConvertUnsignedToSigned()
389 if (value <= std::numeric_limits<TS>::max()) { in ConvertUnsignedToSigned()
[all …]
/freebsd/contrib/llvm-project/libcxx/include/__compare/
H A Dstrong_order.h56 if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) { in __go()
59 __rx = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx; in __go()
60 __ry = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry; in __go()
62 } else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) { in __go()
65 __rx = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx; in __go()
66 __ry = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry; in __go()
73 if constexpr (numeric_limits<_Dp>::radix == 2) { in __go()
/freebsd/contrib/llvm-project/libcxx/include/
H A Dlimits20 class numeric_limits
78 template<> class numeric_limits<cv bool>;
80 template<> class numeric_limits<cv char>;
81 template<> class numeric_limits<cv signed char>;
82 template<> class numeric_limits<cv unsigned char>;
83 template<> class numeric_limits<cv wchar_t>;
84 template<> class numeric_limits<cv char8_t>; // C++20
85 template<> class numeric_limits<cv char16_t>;
86 template<> class numeric_limits<cv char32_t>;
88 template<> class numeric_limits<cv short>;
[all …]
/freebsd/contrib/llvm-project/clang/lib/Headers/
H A D__clang_cuda_cmath.h220 typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer, \
234 std::numeric_limits<__T1>::is_specialized && \
235 std::numeric_limits<__T2>::is_specialized, \
309 std::numeric_limits<__T1>::is_specialized &&
310 std::numeric_limits<__T2>::is_specialized &&
311 std::numeric_limits<__T3>::is_specialized,
318 __DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
325 __DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
333 std::numeric_limits<__T1>::is_specialized &&
334 std::numeric_limits<__T2>::is_specialized,
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A Dbit.h161 return std::numeric_limits<T>::digits; in countr_zero()
184 T Shift = std::numeric_limits<T>::digits >> 1; in countr_zero()
185 T Mask = std::numeric_limits<T>::max() >> Shift; in countr_zero()
207 return std::numeric_limits<T>::digits; in countl_zero()
230 for (T Shift = std::numeric_limits<T>::digits >> 1; Shift; Shift >>= 1) { in countl_zero()
273 return std::numeric_limits<T>::digits - llvm::countl_zero(Value); in bit_width()
338 unsigned N = std::numeric_limits<T>::digits; in rotl()
351 unsigned N = std::numeric_limits<T>::digits; in rotr()
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DScaledNumber.h55 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in getRounded()
82 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned");
85 if (Width == 64 || Digits <= std::numeric_limits<DigitsT>::max())
116 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in getProduct()
157 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in getQuotient()
165 return std::make_pair(std::numeric_limits<DigitsT>::max(), MaxScale); in getQuotient()
192 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in getLgImpl()
256 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in compare()
292 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in matchScales()
338 static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); in getSum()
[all …]

12345678910>>...21