/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | literal_test_util.h | 61 template <typename NativeT> 62 static void ExpectR0Equal(NativeT expected, const LiteralSlice& actual); 64 template <typename NativeT> 65 static void ExpectR1Equal(absl::Span<const NativeT> expected, 67 template <typename NativeT> 69 std::initializer_list<std::initializer_list<NativeT>> expected, 72 template <typename NativeT> 75 std::initializer_list<std::initializer_list<NativeT>>> 80 template <typename NativeT> 81 static void ExpectR2EqualArray2D(const Array2D<NativeT>& expected, [all …]
|
D | client_library_test_base.h | 128 template <typename NativeT> 129 void ComputeAndCompareR0(XlaBuilder* builder, NativeT expected, 131 template <typename NativeT> 132 void ComputeAndCompareR0(XlaBuilder* builder, NativeT expected, 136 template <typename NativeT> 138 absl::Span<const NativeT> expected, 140 template <typename NativeT> 142 absl::Span<const NativeT> expected, 152 template <typename NativeT> 154 const Array2D<NativeT>& expected, [all …]
|
D | exhaustive_op_test_utils.cc | 271 typename NativeT, typename IntegralType, 272 typename std::enable_if<!is_complex_t<NativeT>::value>::type* = nullptr> 273 std::string StringifyNum(NativeT x) { in StringifyNum() 274 return absl::StrFormat(ComponentStringifyFormat<NativeT>::value, in StringifyNum() 279 typename NativeT, typename IntegralType, 280 typename std::enable_if<is_complex_t<NativeT>::value>::type* = nullptr> 281 std::string StringifyNum(NativeT x) { in StringifyNum() 283 "(", StringifyNum<typename NativeT::value_type, IntegralType>(x.real()), in StringifyNum() 284 ", ", StringifyNum<typename NativeT::value_type, IntegralType>(x.imag()), in StringifyNum() 288 template <typename NativeT, typename IntegralType, size_t N> [all …]
|
D | test_utils.h | 37 template <typename NativeT> 40 explicit PseudorandomGenerator(NativeT min_value, NativeT max_value, in PseudorandomGenerator() 45 NativeT get() { in get() 47 return static_cast<NativeT>(min_ + in get() 52 NativeT min_; 53 NativeT max_;
|
D | exhaustive_unary_test_f32_or_smaller.cc | 179 using typename ExhaustiveUnaryTest<T>::NativeT; 204 absl::Span<NativeT> input_arr = (*input_literal)[0].data<NativeT>(); in FillInput() 256 error_spec_gen = +[](NativeT x) { return ErrorSpec{0.001, 0.001}; }; in __anon1843a2950202() 264 error_spec_gen = +[](NativeT x) { return ErrorSpec{0.001, 0.001}; }; in __anon1843a2950302() 276 ErrorSpecGen error_spec_gen = +[](NativeT x) { in __anon1843a2950402() 277 if (x < static_cast<NativeT>(-105)) { in __anon1843a2950402() 303 error_spec_gen = +[](NativeT x) { return ErrorSpec{0, 0.00015}; }; in __anon1843a2950602() 348 error_spec_gen = +[](NativeT x) { in __anon1843a2950c02() 360 ErrorSpecGen error_spec_gen = +[](NativeT x) { in __anon1843a2950d02() 455 error_spec_gen = +[](NativeT x) { in __anon1843a2951202() [all …]
|
D | exhaustive_binary_16_bit_test.cc | 56 absl::Span<NativeT> input_arr_0 = (*input_literals)[0].data<NativeT>(); in FillInput() 57 absl::Span<NativeT> input_arr_1 = (*input_literals)[1].data<NativeT>(); in FillInput() 69 using typename ExhaustiveBinaryTest<T>::NativeT;
|
D | exhaustive_unary_test_f64.cc | 99 error_spec_gen = +[](NativeT x) { in __anone73e0e2b0402() 100 return x <= static_cast<NativeT>(-20.0) || x >= static_cast<NativeT>(20.0) in __anone73e0e2b0402() 117 Run(Erf, std::erf, [](NativeT x) { return ErrorSpec{1e-20, 1e-20}; }); in __anone73e0e2b0502() 121 Run(Erfc, std::erfc, [](NativeT x) { return ErrorSpec{1e-20, 1e-20}; }); in __anone73e0e2b0602()
|
D | reduce_test.cc | 258 template <typename NativeT> 260 typename std::enable_if<std::is_floating_point<NativeT>::value, in ComputeAndCompareGeneric() 262 absl::Span<const NativeT> expected, in ComputeAndCompareGeneric() 264 ComputeAndCompareR1<NativeT>(builder, expected, arguments, in ComputeAndCompareGeneric() 268 template <typename NativeT> 270 typename std::enable_if<std::is_integral<NativeT>::value, in ComputeAndCompareGeneric() 272 absl::Span<const NativeT> expected, in ComputeAndCompareGeneric() 274 ComputeAndCompareR1<NativeT>(builder, expected, arguments); in ComputeAndCompareGeneric() 277 template <typename NativeT> 281 const std::function<NativeT(NativeT, NativeT)>& in RunVectorizedReduceTestForType() argument [all …]
|
D | exhaustive_binary_test_f32_f64.cc | 36 using typename ExhaustiveBinaryTest<T>::NativeT; 58 absl::Span<NativeT> input_arr_0 = (*input_literals)[0].data<NativeT>(); in FillInput() 59 absl::Span<NativeT> input_arr_1 = (*input_literals)[1].data<NativeT>(); in FillInput()
|
D | exhaustive_unary_test_complex.cc | 38 using typename ExhaustiveUnaryTest<T>::NativeT; 69 absl::Span<NativeT> input_arr = (*input_literal)[0].data<NativeT>(); in FillInput() 75 NativeT(this->ConvertAndReplaceKnownIncorrectValueWith(real, 1), in FillInput()
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | literal_util.h | 70 template <typename NativeT> 71 static Literal CreateR0(NativeT value); 72 template <typename NativeT> 73 static Literal CreateR1(absl::Span<const NativeT> values); 75 template <typename NativeT> 77 std::initializer_list<std::initializer_list<NativeT>> values); 78 template <typename NativeT> 80 std::initializer_list<std::initializer_list<NativeT>> values, 82 template <typename NativeT> 84 std::initializer_list<std::initializer_list<NativeT>>> [all …]
|
D | literal.h | 77 template <typename NativeT> 78 absl::Span<const NativeT> data(const ShapeIndex& shape_index = {}) const; 115 template <typename NativeT> 116 NativeT Get(absl::Span<const int64> multi_index, 120 template <typename NativeT> 121 NativeT Get(absl::Span<const int64> multi_index) const; 129 template <typename NativeT> 130 NativeT GetFirstElement() const; 193 template <typename NativeT> 195 std::function<void(absl::Span<const int64> indices, NativeT value)> [all …]
|
D | array2d.h | 100 template <typename NativeT = float> 101 std::unique_ptr<Array2D<NativeT>> MakeLinspaceArray2D(double from, double to, in MakeLinspaceArray2D() 103 auto array = absl::make_unique<Array2D<NativeT>>(n1, n2); in MakeLinspaceArray2D() 105 NativeT step = in MakeLinspaceArray2D() 106 static_cast<NativeT>((count > 1) ? (to - from) / (count - 1) : 0); in MakeLinspaceArray2D() 107 auto set = [&array, n2](int64 index, NativeT value) { in MakeLinspaceArray2D() 111 set(i, (static_cast<NativeT>(from) + in MakeLinspaceArray2D() 112 static_cast<NativeT>(i) * static_cast<NativeT>(step))); in MakeLinspaceArray2D() 114 set(count - 1, static_cast<NativeT>(to)); in MakeLinspaceArray2D()
|
D | literal_comparison.cc | 60 template <typename NativeT> 61 bool CompareEqual(NativeT lhs, NativeT rhs, in CompareEqual() 101 template <typename NativeT, typename UnsignedT> 102 Status MakeBitwiseErrorStatus(NativeT lhs, NativeT rhs, in MakeBitwiseErrorStatus() 116 template <typename NativeT> 117 Status MakeErrorStatus(NativeT lhs, NativeT rhs, in MakeErrorStatus() 170 template <typename NativeT> 175 NativeT expected_value = expected.Get<NativeT>(multi_index); in Equal() 176 NativeT actual_value = actual.Get<NativeT>(multi_index); in Equal() 178 CompareEqual<NativeT>(expected_value, actual_value, multi_index); in Equal() [all …]
|
D | reference_util.h | 501 template <typename NativeT> 502 static std::unique_ptr<Array2D<NativeT>> PadArray2D( in PadArray2D() 503 const Array2D<NativeT>& operand, const PaddingConfig& padding, in PadArray2D() 504 const NativeT pad) { in PadArray2D() 519 auto result = absl::make_unique<Array2D<NativeT>>(out0, out1); in PadArray2D() 536 template <typename NativeT> 537 static Array3D<NativeT> PadArray3D(const Array3D<NativeT>& operand, in PadArray3D() 539 const NativeT pad) { in PadArray3D() 560 Array3D<NativeT> result(output_bounds[0], output_bounds[1], in PadArray3D() 566 NativeT* value = &result(indices[0], indices[1], indices[2]); in PadArray3D() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/client/lib/ |
D | arithmetic_test.cc | 34 template <typename NativeT> 35 void TestArgMin(std::initializer_list<std::initializer_list<NativeT>> input, in TestArgMin() 36 absl::Span<NativeT const> expected_output, int axis, in TestArgMin() 41 template <typename NativeT> 42 void TestArgMax(std::initializer_list<std::initializer_list<NativeT>> input, in TestArgMax() 43 absl::Span<NativeT const> expected_output, int axis, in TestArgMax() 50 template <typename NativeT> 52 std::initializer_list<std::initializer_list<NativeT>> input, in TestArgMinMax() 53 absl::Span<NativeT const> expected_output, int axis, bool is_min, in TestArgMinMax() 76 template <typename NativeT> [all …]
|
D | quantize_test.cc | 32 template <typename NativeT> 33 std::vector<NativeT> GenerateInput() { in GenerateInput() 34 std::vector<NativeT> input; in GenerateInput() 36 for (int64 i = std::numeric_limits<NativeT>::min(); in GenerateInput() 37 i < std::numeric_limits<NativeT>::max(); ++i) { in GenerateInput() 38 input.push_back(static_cast<NativeT>(i)); in GenerateInput() 44 template <typename NativeT> 45 Array2D<NativeT> GenerateLargeSizeInput(int num_columns, int num_rows) { in GenerateLargeSizeInput() 46 Array2D<NativeT> input(num_columns, num_rows); in GenerateLargeSizeInput() 53 template <typename NativeT> [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | hlo_evaluator_typed_visitor.h | 131 typename NativeT, 132 typename std::enable_if<!is_complex_t<NativeT>::value>::type* = nullptr> 135 return static_cast<double>(literal.Get<NativeT>(input_index)); 143 typename NativeT, 144 typename std::enable_if<is_complex_t<NativeT>::value>::type* = nullptr> 185 template <typename NativeT, 186 typename std::enable_if<std::is_unsigned<NativeT>::value>::type* = 190 ElementWiseUnaryOp(abs, [](NativeT elem_operand) { 197 typename NativeT, 198 typename std::enable_if<std::is_signed<NativeT>::value>::type* = nullptr> [all …]
|
D | hlo_creation_utils.h | 186 template <typename NativeT> 189 absl::Span<const NativeT> values) { in MakeR1ConstantHlo() 190 Literal literal = LiteralUtil::CreateR1<NativeT>(values); in MakeR1ConstantHlo() 200 template <class NativeT> 201 HloInstruction* MakeR0ConstantHlo(HloComputation* computation, NativeT value) { in MakeR0ConstantHlo() 203 HloInstruction::CreateConstant(LiteralUtil::CreateR0<NativeT>(value))); in MakeR0ConstantHlo() 208 template <class NativeT> 209 HloInstruction* MakeScalarLike(HloInstruction* base, NativeT value) { in MakeScalarLike() 211 HloInstruction::CreateConstant(LiteralUtil::CreateR0<NativeT>(value) in MakeScalarLike()
|
D | dynamic_window_utils.cc | 75 template <typename NativeT> 76 HloOp ConstantR0(HloComputation* comp, NativeT value, in ConstantR0() 79 HloInstruction::CreateConstant(LiteralUtil::CreateR0<NativeT>(value)), in ConstantR0() 83 template <typename NativeT> 85 return ConstantR0<NativeT>(comp, 1, "one"); in One() 88 template <typename NativeT> 90 return ConstantR0<NativeT>(comp, 0, "zero"); in Zero()
|
/external/angle/src/libANGLE/ |
D | queryconversions.cpp | 27 template <typename QueryT, typename NativeT> 28 QueryT CastFromStateValueToInt(GLenum pname, NativeT value) in CastFromStateValueToInt() 30 GLenum nativeType = GLTypeToGLenum<NativeT>::value; in CastFromStateValueToInt() 57 template <typename NativeT, typename QueryT> 58 NativeT CastQueryValueToInt(GLenum pname, QueryT value) in CastQueryValueToInt() 73 return static_cast<NativeT>(static_cast<GLint64>(std::round(value))); in CastQueryValueToInt() 76 return static_cast<NativeT>(value); in CastQueryValueToInt() 103 template <typename QueryT, typename NativeT> 104 QueryT CastFromStateValue(GLenum pname, NativeT value) in CastFromStateValue() 114 return CastFromStateValueToInt<QueryT, NativeT>(pname, value); in CastFromStateValue() [all …]
|
D | queryconversions.h | 66 template <typename QueryT, typename NativeT> 67 QueryT CastFromStateValue(GLenum pname, NativeT value); 69 template <typename NativeT, typename QueryT> 70 NativeT CastQueryValueTo(GLenum pname, QueryT value);
|
/external/tensorflow/tensorflow/lite/toco/tflite/ |
D | types.cc | 52 using NativeT = ::toco::DataType<T>; in CopyBuffer() typedef 55 auto size = src_data.size() * sizeof(NativeT); in CopyBuffer() 73 using NativeT = ::toco::DataType<T>; in CopyBuffer() typedef 75 const NativeT* src_data = in CopyBuffer() 76 reinterpret_cast<const NativeT*>(src_buffer->data()); in CopyBuffer() 77 int num_items = src_buffer->size() / sizeof(NativeT); in CopyBuffer() 79 std::vector<NativeT>* dst_data = &array->GetMutableBuffer<T>().data; in CopyBuffer()
|
/external/tensorflow/tensorflow/compiler/xla/client/ |
D | xla_builder.h | 1582 template <typename NativeT> 1583 XlaOp ConstantR0(XlaBuilder* builder, NativeT value); 1584 template <typename NativeT> 1585 XlaOp ConstantR1(XlaBuilder* builder, absl::Span<const NativeT> values); 1587 template <typename NativeT> 1589 std::initializer_list<std::initializer_list<NativeT>> values); 1590 template <typename NativeT> 1592 const Array<NativeT>& values, 1594 template <typename NativeT> 1595 XlaOp ConstantFromArray(XlaBuilder* builder, const Array<NativeT>& values); [all …]
|
/external/tensorflow/tensorflow/core/kernels/mlir_generated/ |
D | base_unary_ops_test.h | 140 test::DefaultInput<NativeT>(), baseline_callback, config) 151 using NativeT = EnumToDataType<InT>::Type; \ 155 Test<NativeT, NativeBaselineT, NativeOutT, NativeBaselineOutT>( \ 160 using NativeT = EnumToDataType<InT>::Type; \ 162 TestEmptyShape<NativeT, NativeOutT>(#op_name, config); \
|