Home
last modified time | relevance | path

Searched refs:FloatT (Results 1 – 5 of 5) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/tests/
Dtest_utils.cc34 template <typename FloatT, typename GeneratorT>
38 for (FloatT& value : literal->data<FloatT>()) { in PopulateWithRandomFloatingPointData()
39 value = static_cast<FloatT>(generator(*engine)); in PopulateWithRandomFloatingPointData()
46 template <typename FloatT>
62 if (std::is_same<FloatT, bfloat16>()) { in PopulateWithRandomFullRangeFloatingPointData()
66 min_exp = std::numeric_limits<FloatT>::min_exponent; in PopulateWithRandomFullRangeFloatingPointData()
67 max_exp = std::numeric_limits<FloatT>::max_exponent; in PopulateWithRandomFullRangeFloatingPointData()
71 for (FloatT& value : literal->data<FloatT>()) { in PopulateWithRandomFullRangeFloatingPointData()
77 static_cast<FloatT>(kSpecialValues[(*engine)() % kNumSpecialValues]); in PopulateWithRandomFullRangeFloatingPointData()
80 value = static_cast<FloatT>(pow(2, generator(*engine)) * sign); in PopulateWithRandomFullRangeFloatingPointData()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dcommon.h400 template <typename FloatT, typename LutInT, typename LutOutT>
401 inline void gen_lut(FloatT (*func)(FloatT), FloatT input_min, FloatT input_max, in gen_lut() argument
402 FloatT output_min, FloatT output_max, LutOutT* lut) { in gen_lut()
409 static_assert(std::is_floating_point<FloatT>::value, in gen_lut()
413 const FloatT step = (input_max - input_min) / nb_steps; in gen_lut()
414 const FloatT half_step = step / 2; in gen_lut()
415 const FloatT output_scaling_inv = in gen_lut()
416 static_cast<FloatT>(std::numeric_limits<LutOutT>::max() - in gen_lut()
419 const FloatT table_min = in gen_lut()
420 static_cast<FloatT>(std::numeric_limits<LutOutT>::min()); in gen_lut()
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dutil.cc137 template <typename FloatT>
138 static void RoundTripNanPayload(FloatT value, std::string* result) { in RoundTripNanPayload()
139 const int kPayloadBits = NanPayloadBits<FloatT>(); in RoundTripNanPayload()
142 typename UnsignedIntegerTypeForSize<sizeof(FloatT)>::type>(value); in RoundTripNanPayload()
143 auto payload = rep & NanPayloadBitMask<FloatT>(); in RoundTripNanPayload()
144 if (payload != QuietNanWithoutPayload<FloatT>()) { in RoundTripNanPayload()
150 template <typename FloatT>
151 static std::string GenericRoundTripFpToString(FloatT value) { in GenericRoundTripFpToString()
154 int max_decimal_digits = std::numeric_limits<FloatT>::max_digits10; in GenericRoundTripFpToString()
Dliteral_comparison.cc51 template <typename FloatT, typename UnsignedT>
52 bool CompareFloatsBitwiseEqual(FloatT lhs, FloatT rhs, in CompareFloatsBitwiseEqual()
/external/libcxx/include/
Dcmath621 static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");