MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / transpose_matrix

Function transpose_matrix

tests/validation/Helpers.cpp:198–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197template <typename T>
198void transpose_matrix(const SimpleTensor<T> &in, SimpleTensor<T> &out)
199{
200 ARM_COMPUTE_ERROR_ON((in.shape()[0] != out.shape()[1]) || (in.shape()[1] != out.shape()[0]));
201
202 const int width = in.shape()[0];
203 const int height = in.shape()[1];
204
205#if defined(_OPENMP)
206#pragma omp parallel for collapse(2)
207#endif /* _OPENMP */
208 for (int y = 0; y < height; ++y)
209 {
210 for (int x = 0; x < width; ++x)
211 {
212 const T val = in[x + y * width];
213
214 out[x * height + y] = val;
215 }
216 }
217}
218
219template <typename T>
220void get_tile(const SimpleTensor<T> &in, SimpleTensor<T> &tile, const Coordinates &coord)

Callers

nothing calls this directly

Calls 1

shapeMethod · 0.45

Tested by

no test coverage detected