static */
| 33 | namespace xla { |
| 34 | |
| 35 | /* static */ std::unique_ptr<Array2D<double>> ReferenceUtil::Array2DF32ToF64( |
| 36 | const Array2D<float>& input) { |
| 37 | auto result = |
| 38 | absl::make_unique<Array2D<double>>(input.height(), input.width()); |
| 39 | for (int64 rowno = 0; rowno < input.height(); ++rowno) { |
| 40 | for (int64 colno = 0; colno < input.height(); ++colno) { |
| 41 | (*result)(rowno, colno) = input(rowno, colno); |
| 42 | } |
| 43 | } |
| 44 | return result; |
| 45 | } |
| 46 | |
| 47 | /* static */ std::unique_ptr<Array3D<float>> ReferenceUtil::ConvArray3D( |
| 48 | const Array3D<float>& lhs, const Array3D<float>& rhs, int64 kernel_stride, |