MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TransposeArray2D

Method TransposeArray2D

tensorflow/compiler/xla/reference_util.h:44–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 // Returns the result of a transpose operation on the input matrix.
43 template <typename T>
44 static std::unique_ptr<Array2D<T>> TransposeArray2D(
45 const Array2D<T>& operand) {
46 auto result =
47 absl::make_unique<Array2D<T>>(operand.width(), operand.height());
48 for (int64 w = 0; w < operand.width(); ++w) {
49 for (int64 h = 0; h < operand.height(); ++h) {
50 (*result)(w, h) = operand(h, w);
51 }
52 }
53
54 return result;
55 }
56
57 // Returns the result of a matrix multiply `lhs x rhs`.
58 template <typename T>

Callers

nothing calls this directly

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected