Home
last modified time | relevance | path

Searched refs:Array2D (Results 1 – 25 of 78) sorted by relevance

1234

/external/tensorflow/tensorflow/compiler/xla/
Darray2d_test.cc26 Array2D<int> empty; in TEST()
33 Array2D<int> uninit(2, 3); in TEST()
40 Array2D<int> fullof7(2, 3, 7); in TEST()
53 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
67 Array2D<Eigen::half> arr = {{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}}; in TEST()
81 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
91 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
102 Array2D<bool> arr = {{false, true, false}, {true, true, false}}; in TEST()
113 Array2D<int> fullof7(2, 3, 7); in TEST()
129 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
[all …]
Darray2d.h39 class Array2D : public Array<T> {
41 Array2D() : Array<T>(std::vector<int64>{0, 0}) {} in Array2D() function
43 Array2D(const int64 n1, const int64 n2) in Array2D() function
46 Array2D(const int64 n1, const int64 n2, const T value) in Array2D() function
52 Array2D(std::initializer_list<std::initializer_list<T>> values) in Array2D() function
63 Array2D(std::initializer_list<std::initializer_list<T2>> values) in Array2D() function
66 Array2D(const Array2D<T>& other) : Array<T>(other) {} in Array2D() function
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()
Dreference_util.h44 static std::unique_ptr<Array2D<T>> TransposeArray2D( in TransposeArray2D()
45 const Array2D<T>& operand) { in TransposeArray2D()
47 absl::make_unique<Array2D<T>>(operand.width(), operand.height()); in TransposeArray2D()
59 static std::unique_ptr<Array2D<T>> MatmulArray2D(const Array2D<T>& lhs, in MatmulArray2D()
60 const Array2D<T>& rhs) { in MatmulArray2D()
65 static std::unique_ptr<Array2D<double>> Array2DF32ToF64(
66 const Array2D<float>& input);
117 const Array2D<float>& matrix, float init,
124 const Array2D<float>& matrix, float init,
130 static std::vector<T> ReduceR2ToR1(const Array2D<T>& input, in ReduceR2ToR1()
[all …]
Dreference_util_test.cc39 matrix_ = absl::make_unique<Array2D<float>>(rows_, cols_); in ReferenceUtilTest()
51 std::unique_ptr<Array2D<float>> matrix_;
62 Array2D<float> rhs({ in TEST_F()
243 input.FillWithYX(Array2D<float>({ in TEST_F()
252 weights.FillWithYX(Array2D<float>({ in TEST_F()
261 expected.FillWithYX(Array2D<float>({ in TEST_F()
278 input.FillWithYX(Array2D<float>({ in TEST_F()
287 weights.FillWithYX(Array2D<float>({ in TEST_F()
296 expected.FillWithYX(Array2D<float>({ in TEST_F()
419 Array2D<float> a({{1, 2}, {3, 4}}); in TEST_F()
[all …]
Dreference_util.cc35 /* static */ std::unique_ptr<Array2D<double>> ReferenceUtil::Array2DF32ToF64( in Array2DF32ToF64()
36 const Array2D<float>& input) { in Array2DF32ToF64()
38 absl::make_unique<Array2D<double>>(input.height(), input.width()); in Array2DF32ToF64()
507 const Array2D<float>& matrix, float init, in ReduceToColArray2D()
524 const Array2D<float>& matrix, float init, in ReduceToRowArray2D()
614 /* static */ std::unique_ptr<Array2D<float>> ReferenceUtil::Reduce3DTo2D( in Reduce3DTo2D()
620 auto result = absl::make_unique<Array2D<float>>(rows, cols); in Reduce3DTo2D()
635 /* static */ std::unique_ptr<Array2D<float>> ReferenceUtil::MapArray2D( in MapArray2D()
636 const Array2D<float>& matrix, in MapArray2D()
640 auto result = absl::make_unique<Array2D<float>>(rows, cols); in MapArray2D()
[all …]
/external/tensorflow/tensorflow/compiler/xla/tests/
Ddot_operation_test.cc152 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
153 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
156 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(0, 0), {}, in XLA_TYPED_TEST()
163 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
168 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(0, 3), {}, in XLA_TYPED_TEST()
177 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
180 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(3, 0), {}, in XLA_TYPED_TEST()
187 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
188 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
192 &builder, Array2D<T>(2, 2, static_cast<T>(0.0f)), {}, this->error_spec_); in XLA_TYPED_TEST()
[all …]
Dtriangular_solve_test.cc43 Array2D<float> AValsLower() { in AValsLower()
50 Array2D<float> AValsUpper() { in AValsUpper()
57 Array2D<float> AValsLowerUnitDiagonal() { in AValsLowerUnitDiagonal()
64 Array2D<float> AValsUpperUnitDiagonal() { in AValsUpperUnitDiagonal()
71 Array2D<float> BValsRight() { in BValsRight()
75 Array2D<float> BValsLeft() { in BValsLeft()
81 Array2D<complex64> AValsLowerComplex() { in AValsLowerComplex()
88 Array2D<complex64> AValsUpperComplex() { in AValsUpperComplex()
95 Array2D<complex64> BValsRightComplex() { in BValsRightComplex()
99 Array2D<complex64> BValsLeftComplex() { in BValsLeftComplex()
[all …]
Dtranspose_test.cc41 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
44 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}, error_spec_); in XLA_TEST_F()
49 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 42)); in XLA_TEST_F()
52 ComputeAndCompareR2<float>(&builder, Array2D<float>(42, 0), {}, error_spec_); in XLA_TEST_F()
57 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(7, 0)); in XLA_TEST_F()
60 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 7), {}, error_spec_); in XLA_TEST_F()
71 Array2D<float> expected({{1.0f, 3.0f}, {2.0f, 4.0f}}); in TEST_F()
119 Array2D<float> input({{1.0f, 2.0f}, {3.0f, 4.0f}, {5.0f, 6.0f}}); in TEST_F()
120 Array2D<float> transposed({{1.0f, 3.0f, 5.0f}, {2.0f, 4.0f, 6.0f}}); in TEST_F()
128 const Array2D<float>& expected = transposes % 2 == 0 ? input : transposed; in TEST_F()
Dselect_and_scatter_test.cc264 Array2D<int32> expected({{0, 0, 0, 0, 6, 0}, {0, 0, 2, 0, 0, 0}}); in XLA_TEST_F()
278 Array2D<float> expected( in XLA_TEST_F()
293 Array2D<int32> expected({{0, 0, 0, 0, 6, 0}, {0, 0, 2, 0, 0, 0}}); in XLA_TEST_F()
305 Array2D<int32> expected({{0, 0, 0, 0, 0}, {0, 0, 12, 0, 0}}); in XLA_TEST_F()
317 Array2D<int32> expected({{0, 0, 0, 0, 4}, {0, 2, 6, 0, 0}}); in XLA_TEST_F()
331 Array2D<int32> expected({{0, 0, 0, 0, 8}, {0, 5, 23, 0, 19}}); in XLA_TEST_F()
343 Array2D<float> expected( in XLA_TEST_F()
352 Array2D<float> pzo = {{7.0f, 2.0f, 5.0f, 3.0f, 10.0f, 2.0f}, in TEST_F()
356 Array2D<float> pzs = {{2.0f, 6.0f}, {3.0f, 1.0f}}; in TEST_F()
357 Array2D<float> pze = {{0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f}, in TEST_F()
[all …]
Dmatrix_ops_simple_test.cc135 std::unique_ptr<Array2D<T>> alhs = in TestImpl()
137 auto arhs = absl::make_unique<Array2D<T>>(rows, cols, static_cast<T>(1.0f)); in TestImpl()
144 Array2D<T> expected(rows, cols); in TestImpl()
188 Array2D<T> lhs({{1.0f, 2.0f}, {3.0f, 4.0f}}); in TestImpl()
189 Array2D<T> rhs({{10.0f, 11.0f}, {12.0f, 13.0f}}); in TestImpl()
218 Array2D<T> expected; in TestImpl()
222 expected = Array2D<T>({{47.0f, 52.0f}, {71.0f, 78.0f}}); in TestImpl()
224 expected = Array2D<T>({{35.0f, 39.0f}, {81.0f, 89.0f}}); in TestImpl()
229 expected = Array2D<T>({{56.0f, 61.0f}, {80.0f, 87.0f}}); in TestImpl()
231 expected = Array2D<T>({{44.0f, 48.0f}, {90.0f, 98.0f}}); in TestImpl()
Dconcat_test.cc146 auto a = ConstantR2FromArray2D(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
147 auto b = ConstantR2FromArray2D(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
150 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}, in XLA_TEST_F()
163 Array2D<float> expected({ in XLA_TEST_F()
178 Array2D<float> expected({ in XLA_TEST_F()
187 auto a = ConstantR2FromArray2D(&builder, Array2D<float>(2, 0)); in XLA_TEST_F()
202 Array2D<float> expected({ in XLA_TEST_F()
213 auto b = ConstantR2FromArray2D(&builder, Array2D<float>(0, 2)); in XLA_TEST_F()
227 Array2D<float> expected({ in XLA_TEST_F()
344 Array2D<float> lhs(1, 1024); in XLA_TEST_F()
[all …]
Dslice_test.cc82 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
85 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}); in XLA_TEST_F()
90 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 20)); in XLA_TEST_F()
93 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 5), {}); in XLA_TEST_F()
98 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(3, 0)); in XLA_TEST_F()
101 ComputeAndCompareR2<float>(&builder, Array2D<float>(2, 0), {}); in XLA_TEST_F()
105 Array2D<float> values(256, 256); in XLA_TEST_F()
116 Array2D<float> expected(128, 128); in XLA_TEST_F()
127 Array2D<float> values(1, 4096); in TEST_F()
134 Array2D<float> expected(1, 1024); in TEST_F()
[all …]
Dcholesky_test.cc43 Array2D<float> a_vals({ in XLA_TEST_F()
54 Array2D<float> expected({ in XLA_TEST_F()
106 Array2D<float> a_vals({ in XLA_TEST_F()
117 Array2D<float> expected({ in XLA_TEST_F()
132 Array2D<float> a_vals({ in XLA_TEST_F()
143 Array2D<float> expected({ in XLA_TEST_F()
157 Array2D<float> a_vals({ in XLA_TEST_F()
168 Array2D<float> expected({{4, 0, 0, 0}, // in XLA_TEST_F()
Dbroadcast_simple_test.cc73 Array2D<float>* r2_array, float start, in MakeR2Data()
117 Array2D<float> expected(2, 3, 2.25); in XLA_TEST_F()
129 Array2D<float> expected(2, 3, 2.25); in XLA_TEST_F()
137 Array2D<float> expected(2, 0); in XLA_TEST_F()
144 Array2D<float> expected(0, 2); in XLA_TEST_F()
152 Array2D<float> expected(2, 3);
166 Array2D<float> expected(2, 2);
179 Array2D<float> expected(2, 2);
228 Array2D<float> expected(3, 2);
243 Array2D<bool> x_vals(2, 1); in XLA_TEST_F()
[all …]
Dconstants_test.cc99 ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 2)); in TEST_F()
101 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 2), {}, error_spec_); in TEST_F()
105 std::unique_ptr<Array2D<float>> constant = in TEST_F()
139 Array2D<float> pz({ in TEST_F()
Dreshape_test.cc56 Array2D<float> input_array(1, 1); in XLA_TEST_P()
101 Array2D<float> input_array(1, 1); in XLA_TEST_P()
135 Array2D<float> input_array(0, 3); in XLA_TEST_P()
151 LiteralUtil::CreateR2FromArray2D<float>(Array2D<float>(0, 3)); in XLA_TEST_P()
164 Array2D<float> input_array(3, 0); in XLA_TEST_P()
239 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 2)); in XLA_TEST_P()
290 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 4)); in XLA_TEST_P()
322 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(6, 0)); in XLA_TEST_P()
344 auto expected_literal = LiteralUtil::CreateFromArray(Array2D<float>(24, 0)); in XLA_TEST_P()
370 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 6)); in XLA_TEST_P()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_evaluator.h161 static std::unique_ptr<Array2D<Eigen::half>> MatmulArray2D(
162 const Array2D<Eigen::half>& lhs, const Array2D<Eigen::half>& rhs);
163 static std::unique_ptr<Array2D<float>> MatmulArray2D(
164 const Array2D<float>& lhs, const Array2D<float>& rhs);
165 static std::unique_ptr<Array2D<double>> MatmulArray2D(
166 const Array2D<double>& lhs, const Array2D<double>& rhs);
167 static std::unique_ptr<Array2D<std::complex<float>>> MatmulArray2D(
168 const Array2D<std::complex<float>>& lhs,
169 const Array2D<std::complex<float>>& rhs);
170 static std::unique_ptr<Array2D<std::complex<double>>> MatmulArray2D(
[all …]
Dhlo_sharding_util_test.cc60 HloSharding output_sharding = HloSharding::Tile(Array2D<int64>({{0}, {1}})); in TEST()
70 HloSharding input_sharding = HloSharding::Tile(Array2D<int64>({{0}, {1}})); in TEST()
82 Array2D<int64> tile(16, 1); in TEST()
135 HloSharding input_sharding = HloSharding::Tile(Array2D<int64>({{0}, {1}})); in TEST()
162 HloSharding sharding = HloSharding::Tile(Array2D<int64>({{0, 1}, {2, 3}})); in TEST()
165 EXPECT_EQ(result.tile_assignment(), Array2D<int64>({{0}, {1}, {2}, {3}})); in TEST()
169 HloSharding sharding = HloSharding::Tile(Array2D<int64>({{0, 1}, {2, 3}})); in TEST()
172 EXPECT_EQ(result.tile_assignment(), Array2D<int64>({{0, 2, 1, 3}})); in TEST()
Dtriangular_solve_expander_test.cc64 Array2D<float> a(256, 256); in TEST_P()
72 Array2D<float> b(256, 192); in TEST_P()
89 Array2D<float> x(x_shape.dimensions(0), x_shape.dimensions(1)); in TEST_P()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_runtime_test.cc41 std::unique_ptr<Array2D<float>> MaybeTransposeArray2D(const Array2D<T>& array, in MaybeTransposeArray2D()
48 auto output = absl::make_unique<Array2D<float>>(output_height, output_width); in MaybeTransposeArray2D()
63 void CheckMatrixMultiply(const Array2D<float>& a, const Array2D<float>& b, in CheckMatrixMultiply()
64 const Array2D<float>& c) { in CheckMatrixMultiply()
76 std::unique_ptr<Array2D<float>> EigenMatrixMultiply(const Array2D<float>& a, in EigenMatrixMultiply()
77 const Array2D<float>& b, in EigenMatrixMultiply()
95 auto c_transpose = absl::make_unique<Array2D<float>>(n, m); in EigenMatrixMultiply()
187 std::unique_ptr<Array2D<float>> MKLMatrixMultiply(const Array2D<float>& a, in MKLMatrixMultiply()
188 const Array2D<float>& b, in MKLMatrixMultiply()
206 auto c_transpose = absl::make_unique<Array2D<float>>(n, m); in MKLMatrixMultiply()
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dquantize_test.cc45 Array2D<NativeT> GenerateLargeSizeInput(int num_columns, int num_rows) { in GenerateLargeSizeInput()
46 Array2D<NativeT> input(num_columns, num_rows); in GenerateLargeSizeInput()
54 Array2D<uint32> PackLargeInput(Array2D<NativeT> &input) { in PackLargeInput()
60 Array2D<uint32> pack_input(input.height(), padded_output_width); in PackLargeInput()
79 Array2D<bfloat16> GenerateLargeSizeMinCombinedOutput( in GenerateLargeSizeMinCombinedOutput()
80 Array2D<NativeT> &input, const QuantizedRange &range, in GenerateLargeSizeMinCombinedOutput()
98 Array2D<bfloat16> output(output_height, output_width, bfloat16(0.0)); in GenerateLargeSizeMinCombinedOutput()
216 const Array2D<bfloat16> expected = { in XLA_TEST_F()
239 const Array2D<bfloat16> expected = { in XLA_TEST_F()
265 const Array2D<bfloat16> expected = { in XLA_TEST_F()
[all …]
Dsvd_test.cc110 Array2D<float> GenerateRandomMatrix(int xsize, int ysize) { in GenerateRandomMatrix()
111 Array2D<float> result{xsize, ysize, 0.0}; in GenerateRandomMatrix()
122 Array2D<float> simple_2d_4x4_ = Array2D<float>{ in XLA_TEST_F()
177 auto singular_values = Array2D<float>{ in XLA_TEST_F()
195 Array2D<float> a_val = GenerateRandomMatrix(512, 128); in XLA_TEST_F()
207 Array2D<float> a_val = GenerateRandomMatrix(128, 256); in XLA_TEST_F()
219 Array2D<float> a_val = GenerateRandomMatrix(256, 128); in XLA_TEST_F()
233 Array2D<float> a_val = GenerateRandomMatrix(128, 512); in XLA_TEST_F()
247 Array2D<float> a_val = GenerateRandomMatrix(512, 256); in XLA_TEST_F()
261 Array2D<float> a_val = GenerateRandomMatrix(512, 512); in XLA_TEST_F()
Dself_adjoint_eig_test.cc53 matrix2d_8x8_ = Array2D<float>{ in SetUp()
63 low_rank_4x4_ = Array2D<float>{ in SetUp()
126 Array2D<float> GenerateRandomSymmetricMatrix(int size) { in GenerateRandomSymmetricMatrix()
127 Array2D<float> result{size, size, 0.0}; in GenerateRandomSymmetricMatrix()
140 Array2D<float> matrix2d_8x8_;
141 Array2D<float> low_rank_4x4_;
142 Array2D<int> wrong_type_4x4_;
253 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
266 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
279 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
[all …]
/external/libgav1/libgav1/src/utils/
Darray_2d.h72 class Array2D {
74 Array2D() = default;
77 Array2D(const Array2D& rhs) = default;
78 Array2D& operator=(const Array2D& rhs) = default;
Dreference_info.h84 Array2D<ReferenceFrameType> motion_field_reference_frame;
87 Array2D<MotionVector> motion_field_mv;

1234