Home
last modified time | relevance | path

Searched refs:UIntType (Results 1 – 25 of 55) sorted by relevance

123

/llvm-project-15.0.7/libc/src/__support/FPUtil/x86_64/
H A DLongDoubleBits.h36 using UIntType = UInt128;
40 static constexpr UIntType MIN_SUBNORMAL = UIntType(1);
42 static constexpr UIntType MAX_SUBNORMAL =
44 static constexpr UIntType MIN_NORMAL =
46 static constexpr UIntType MAX_NORMAL =
47 ((UIntType(MAX_EXPONENT) - 1)
53 UIntType bits;
55 void set_mantissa(UIntType mantVal) {
92 UIntType sign1 = UIntType(signVal) << (FloatProp::BIT_WIDTH - 1);
116 UIntType uintval() {
[all …]
H A DNextAfterLongDouble.h45 using UIntType = FPBits::UIntType; in nextafter() local
46 constexpr UIntType SIGN_VAL = (UIntType(1) << 79); in nextafter()
47 constexpr UIntType MANTISSA_MASK = in nextafter()
48 (UIntType(1) << MantissaWidth<long double>::VALUE) - 1; in nextafter()
49 UIntType int_val = from_bits.uintval(); in nextafter()
/llvm-project-15.0.7/libc/src/__support/FPUtil/
H A DFPBits.h52 UIntType bits;
54 void set_mantissa(UIntType mantVal) { in set_mantissa()
62 void set_unbiased_exponent(UIntType expVal) { in set_unbiased_exponent()
75 constexpr UIntType get_explicit_mantissa() { in get_explicit_mantissa()
90 static_assert(sizeof(T) == sizeof(UIntType),
96 static constexpr UIntType MIN_SUBNORMAL = UIntType(1);
97 static constexpr UIntType MAX_SUBNORMAL =
99 static constexpr UIntType MIN_NORMAL =
101 static constexpr UIntType MAX_NORMAL =
123 UIntType uintval() const { return bits; } in uintval()
[all …]
H A DNormalFloat.h33 using UIntType = typename FPBits<T>::UIntType; member
34 static constexpr UIntType ONE = (UIntType(1) << MantissaWidth<T>::VALUE);
39 UIntType mantissa;
47 NormalFloat(int32_t e, UIntType m, bool s) in NormalFloat()
110 const UIntType shift_out_mask = (UIntType(1) << shift) - 1; in T()
112 const UIntType halfway_value = UIntType(1) << (shift - 1); in T()
115 UIntType new_mantissa = result.get_mantissa(); in T()
163 unsigned evaluate_normalization_shift(UIntType m) { in evaluate_normalization_shift()
226 const UIntType shift_out_mask = (UIntType(1) << shift) - 1;
228 const UIntType halfway_value = UIntType(1) << (shift - 1);
[all …]
H A DHypot.h104 using UIntType = typename FPBits<T>::UIntType;
105 using DUIntType = typename DoubleLength<UIntType>::Type;
128 UIntType a_mant, b_mant;
147 constexpr UIntType ONE = UIntType(1) << (MantissaWidth<T>::VALUE + 1);
152 UIntType leading_one;
203 UIntType y_new = leading_one;
204 UIntType r = static_cast<UIntType>(sum >> y_mant_width) - leading_one;
205 UIntType tail_bits = static_cast<UIntType>(sum) & (leading_one - 1);
207 for (UIntType current_bit = leading_one >> 1; current_bit;
217 bool round_bit = y_new & UIntType(1);
[all …]
H A Dexcept_value_utils.h20 using UIntType = typename FPBits<T>::UIntType; member
23 UIntType inputs[SIZE];
29 UIntType outputs[SIZE][4];
33 using UIntType = typename FPBits<T>::UIntType; member
38 UIntType x_abs, bool sign, T &result) { in check_odd_func()
41 UIntType out_bits = ExceptVals.outputs[i][0]; // FE_TOWARDZERO in check_odd_func()
H A DNearestIntegerOperations.h108 using UIntType = typename FPBits<T>::UIntType; in round() local
140 bool half_bit_set = bits.get_mantissa() & (UIntType(1) << (trim_size - 1)); in round()
160 using UIntType = typename FPBits<T>::UIntType; in round_using_current_rounding_mode() local
203 UIntType trim_value = bits.get_mantissa() & ((UIntType(1) << trim_size) - 1); in round_using_current_rounding_mode()
204 UIntType half_value = (UIntType(1) << (trim_size - 1)); in round_using_current_rounding_mode()
208 UIntType trunc_is_odd = new_bits.get_mantissa() & (UIntType(1) << trim_size); in round_using_current_rounding_mode()
/llvm-project-15.0.7/libc/test/src/math/
H A Dmod_k_pi_test.cpp18 using UIntType = FPBits::UIntType; typedef
21 constexpr UIntType count = 1000000000; in TEST()
22 constexpr UIntType step = UIntType(-1) / count; in TEST()
23 for (UIntType i = 0, v = 0; i <= count; ++i, v += step) { in TEST()
33 constexpr UIntType count = 1000000000; in TEST()
34 constexpr UIntType step = UIntType(-1) / count; in TEST()
35 for (UIntType i = 0, v = 0; i <= count; ++i, v += step) { in TEST()
46 constexpr UIntType count = 1000000000; in TEST()
47 constexpr UIntType step = UIntType(-1) / count; in TEST()
48 for (UIntType i = 0, v = 0; i <= count; ++i, v += step) { in TEST()
H A DNextAfterTest.h24 using UIntType = typename FPBits::UIntType; variable
34 const UIntType min_subnormal = FPBits::MIN_SUBNORMAL;
35 const UIntType max_subnormal = FPBits::MAX_SUBNORMAL;
36 const UIntType min_normal = FPBits::MIN_NORMAL;
37 const UIntType max_normal = FPBits::MAX_NORMAL;
54 UIntType expected_bits = 1; in testBoundaries()
59 expected_bits = (UIntType(1) << (BIT_WIDTH_OF_TYPE - 1)) + 1; in testBoundaries()
70 expected_bits = (UIntType(1) << (BIT_WIDTH_OF_TYPE - 1)) + 1; in testBoundaries()
94 (UIntType(1) << (BIT_WIDTH_OF_TYPE - 1)) + max_subnormal - 1; in testBoundaries()
168 (UIntType(1) << MantissaWidth::VALUE) - 1); in testBoundaries()
[all …]
H A DFmaTest.h25 using UIntType = typename FPBits::UIntType; variable
32 UIntType get_random_bit_pattern() { in get_random_bit_pattern()
33 UIntType bits{0}; in get_random_bit_pattern()
34 for (UIntType i = 0; i < sizeof(UIntType) / 2; ++i) { in get_random_bit_pattern()
55 T(FPBits(UIntType(2)))); in test_special_numbers()
57 T v = T(FPBits(FPBits::MIN_NORMAL + UIntType(1))); in test_special_numbers()
70 constexpr UIntType COUNT = 1000001; in test_subnormal_range()
71 constexpr UIntType STEP = in test_subnormal_range()
73 for (UIntType v = FPBits::MIN_SUBNORMAL, w = FPBits::MAX_SUBNORMAL; in test_subnormal_range()
85 constexpr UIntType COUNT = 1000001; in test_normal_range()
[all …]
H A DSqrtTest.h22 static constexpr UIntType HIDDEN_BIT =
23 UIntType(1) << __llvm_libc::fputil::MantissaWidth<T>::VALUE;
41 for (UIntType mant = 1; mant < HIDDEN_BIT; mant <<= 1) { in test_denormal_values()
48 constexpr UIntType COUNT = 1'000'001; in test_denormal_values()
49 constexpr UIntType STEP = HIDDEN_BIT / COUNT; in test_denormal_values()
50 for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { in test_denormal_values()
57 constexpr UIntType COUNT = 10'000'001; in test_normal_range()
58 constexpr UIntType STEP = UIntType(-1) / COUNT; in test_normal_range()
59 for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { in test_normal_range()
H A DILogbTest.h77 using UIntType = typename FPBits::UIntType; in test_subnormal_range() local
78 constexpr UIntType COUNT = 1000001; in test_subnormal_range()
79 constexpr UIntType STEP = in test_subnormal_range()
81 for (UIntType v = FPBits::MIN_SUBNORMAL; v <= FPBits::MAX_SUBNORMAL; in test_subnormal_range()
96 using UIntType = typename FPBits::UIntType; in test_normal_range() local
97 constexpr UIntType COUNT = 1000001; in test_normal_range()
98 constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; in test_normal_range()
99 for (UIntType v = FPBits::MIN_NORMAL; v <= FPBits::MAX_NORMAL; v += STEP) { in test_normal_range()
H A DHypotTest.h26 using UIntType = typename FPBits::UIntType; variable
48 constexpr UIntType COUNT = 1000001; in test_subnormal_range()
50 UIntType max_value = FPBits::MAX_SUBNORMAL << scale; in test_subnormal_range()
51 UIntType step = (max_value - FPBits::MIN_SUBNORMAL) / COUNT; in test_subnormal_range()
53 for (UIntType v = FPBits::MIN_SUBNORMAL, w = max_value; in test_subnormal_range()
73 constexpr UIntType COUNT = 1000001; in test_normal_range()
74 constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; in test_normal_range()
76 for (UIntType v = FPBits::MIN_NORMAL, w = FPBits::MAX_NORMAL; in test_normal_range()
H A DLogbTest.h22 static constexpr UIntType HIDDEN_BIT =
23 UIntType(1) << __llvm_libc::fputil::MantissaWidth<T>::VALUE;
74 using UIntType = typename FPBits::UIntType; in testRange() local
75 constexpr UIntType COUNT = 10000000; in testRange()
76 constexpr UIntType STEP = UIntType(-1) / COUNT; in testRange()
77 for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { in testRange()
H A DFrexpTest.h22 static constexpr UIntType HIDDEN_BIT =
23 UIntType(1) << __llvm_libc::fputil::MantissaWidth<T>::VALUE;
95 using UIntType = typename FPBits::UIntType; in testRange() local
96 constexpr UIntType COUNT = 10000000; in testRange()
97 constexpr UIntType STEP = UIntType(-1) / COUNT; in testRange()
98 for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { in testRange()
H A DFDimTest.h20 using UIntType = typename FPBits::UIntType; variable
56 constexpr UIntType COUNT = 10000001; in test_in_range()
57 constexpr UIntType STEP = UIntType(-1) / COUNT; in test_in_range()
58 for (UIntType i = 0, v = 0, w = UIntType(-1); i <= COUNT; in test_in_range()
H A Dcos_test.cpp22 constexpr UIntType COUNT = 10000000; in TEST()
23 constexpr UIntType STEP = UIntType(-1) / COUNT; in TEST()
24 for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { in TEST()
/llvm-project-15.0.7/libc/test/src/math/differential_testing/
H A DBinaryOpSingleOutputDiff.h18 using UIntType = typename FPBits::UIntType; variable
19 static constexpr UIntType MSBIT = UIntType(1) << (8 * sizeof(UIntType) - 1);
20 static constexpr UIntType UINTMAX = (MSBIT - 1) + MSBIT;
26 UIntType startingBit, UIntType endingBit, in run_diff_in_range()
27 UIntType N, in run_diff_in_range()
34 UIntType step = (endingBit - startingBit) / N; in run_diff_in_range()
35 for (UIntType bitsX = startingBit, bitsY = endingBit;; in run_diff_in_range()
60 UIntType startingBit, UIntType endingBit, in run_perf_in_range()
68 UIntType step = (endingBit - startingBit) / N; in run_perf_in_range()
69 for (UIntType bitsX = startingBit, bitsY = endingBit;; in run_perf_in_range()
[all …]
H A DSingleInputSingleOutputDiff.h18 using UIntType = typename FPBits::UIntType; variable
19 static constexpr UIntType MSBit = UIntType(1) << (8 * sizeof(UIntType) - 1);
20 static constexpr UIntType UIntMax = (MSBit - 1) + MSBit;
26 UIntType diffCount = 0; in runDiff()
30 for (UIntType bits = 0;; ++bits) { in runDiff()
34 UIntType myBits = FPBits(myResult).uintval(); in runDiff()
35 UIntType otherBits = FPBits(otherResult).uintval(); in runDiff()
50 UIntType endingBit, in runPerfInRange()
54 for (UIntType bits = startingBit;; ++bits) { in runPerfInRange()
67 UIntType numberOfRuns = endingBit - startingBit + 1; in runPerfInRange()
[all …]
/llvm-project-15.0.7/libc/src/__support/FPUtil/generic/
H A Dsqrt_80_bit_long_double.h38 using UIntType = typename FPBits<long double>::UIntType; in sqrt() local
39 constexpr UIntType ONE = UIntType(1) in sqrt()
62 UIntType x_mant = bits.get_mantissa(); in sqrt()
89 UIntType y = ONE; in sqrt()
90 UIntType r = x_mant - ONE; in sqrt()
92 for (UIntType current_bit = ONE >> 1; current_bit; current_bit >>= 1) { in sqrt()
94 UIntType tmp = (y << 1) + current_bit; // 2*y(n - 1) + 2^(-n-1) in sqrt()
105 UIntType tmp = (y << 2) + 1; in sqrt()
113 y |= (static_cast<UIntType>(x_exp) in sqrt()
H A Dsqrt.h38 typename FPBits<T>::UIntType &mantissa) {
75 using UIntType = typename FPBits<T>::UIntType;
76 constexpr UIntType ONE = UIntType(1) << MantissaWidth<T>::VALUE;
98 UIntType x_mant = bits.get_mantissa();
126 UIntType y = ONE;
127 UIntType r = x_mant - ONE;
129 for (UIntType current_bit = ONE >> 1; current_bit; current_bit >>= 1) {
131 UIntType tmp = (y << 1) + current_bit; // 2*y(n - 1) + 2^(-n-1)
142 UIntType tmp = (y << 2) + 1;
151 y = (y - ONE) | (static_cast<UIntType>(x_exp) << MantissaWidth<T>::VALUE);
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/cert/
H A Dmsc51-cpp.cpp8 template <class UIntType, UIntType a, UIntType c, UIntType m>
16 template <class UIntType, size_t w, size_t n, size_t m, size_t r,
17 UIntType a, size_t u, UIntType d, size_t s,
18 UIntType b, size_t t,
19 UIntType c, size_t l, UIntType f>
26 template <class UIntType, size_t w, size_t s, size_t r>
42 template <class Engine, size_t w, class UIntType>
/llvm-project-15.0.7/libcxx/include/
H A Drandom26 template <class UIntType, UIntType a, UIntType c, UIntType m>
54 template <class UIntType, UIntType a, UIntType c, UIntType m>
59 template <class UIntType, UIntType a, UIntType c, UIntType m>
65 class UIntType, UIntType a, UIntType c, UIntType m>
71 class UIntType, UIntType a, UIntType c, UIntType m>
77 UIntType a, size_t u, UIntType d, size_t s,
78 UIntType b, size_t t, UIntType c, size_t l, UIntType f>
118 UIntType b, size_t t, UIntType c, size_t l, UIntType f>
126 UIntType b, size_t t, UIntType c, size_t l, UIntType f>
135 UIntType b, size_t t, UIntType c, size_t l, UIntType f>
[all …]
/llvm-project-15.0.7/libc/test/src/__support/
H A Dstr_to_float_test.cpp19 const typename __llvm_libc::fputil::FPBits<T>::UIntType inputMantissa, in clinger_fast_path_test()
21 const typename __llvm_libc::fputil::FPBits<T>::UIntType in clinger_fast_path_test()
24 typename __llvm_libc::fputil::FPBits<T>::UIntType actual_output_mantissa = in clinger_fast_path_test()
37 const typename __llvm_libc::fputil::FPBits<T>::UIntType inputMantissa, in clinger_fast_path_fails_test()
39 typename __llvm_libc::fputil::FPBits<T>::UIntType actual_output_mantissa = in clinger_fast_path_fails_test()
50 const typename __llvm_libc::fputil::FPBits<T>::UIntType inputMantissa, in eisel_lemire_test()
52 const typename __llvm_libc::fputil::FPBits<T>::UIntType in eisel_lemire_test()
55 typename __llvm_libc::fputil::FPBits<T>::UIntType actual_output_mantissa = in eisel_lemire_test()
69 const typename __llvm_libc::fputil::FPBits<T>::UIntType in simple_decimal_conversion_test()
72 typename __llvm_libc::fputil::FPBits<T>::UIntType actual_output_mantissa = in simple_decimal_conversion_test()
/llvm-project-15.0.7/libc/src/__support/
H A Dstr_to_float.h92 typename fputil::FPBits<T>::UIntType *outputMantissa, in eisel_lemire()
95 using BitsType = typename fputil::FPBits<T>::UIntType; in eisel_lemire()
189 typename fputil::FPBits<long double>::UIntType *outputMantissa,
191 using BitsType = typename fputil::FPBits<long double>::UIntType;
387 typename fputil::FPBits<T>::UIntType final_mantissa = in simple_decimal_conversion()
410 if (final_mantissa == typename fputil::FPBits<T>::UIntType(2) in simple_decimal_conversion()
619 using BitsType = typename fputil::FPBits<T>::UIntType; in binary_exp_to_float()
725 using BitsType = typename fputil::FPBits<T>::UIntType; in decimal_string_to_float()
814 typename fputil::FPBits<T>::UIntType *outputMantissa, in hexadecimal_string_to_float()
816 using BitsType = typename fputil::FPBits<T>::UIntType; in hexadecimal_string_to_float()
[all …]

123