39 const int stride = t.
shape().x();
40 const int M = t.
shape().y();
41 const int N = t.
shape().x();
42 if((y < M) && (x < N))
44 return t[y * stride + x];
52 const int M = out.
shape().y();
53 const int N = out.
shape().x();
54 for(
int y = 0; y <
M; y++)
56 T *out_ptr = &out[y *
N];
57 for(
int x = 0; x < (N / int_by); x += block)
59 for(
int z = 0; z < int_by; z++)
61 for(
int a = 0; (out_ptr <= &out[y * N + (N - 1)]) && a < block; a++)
64 *out_ptr++ =
safe_read(in, (y * int_by) + z, x + a);
67 const T value =
safe_read(in, x + a, (y * int_by) + z);
T safe_read(const SimpleTensor< T > &t, int y, int x)
TensorShape shape() const override
Shape of the tensor.
SimpleTensor< T > gemm_interleave_blocked(const SimpleTensor< T > &in, SimpleTensor< T > &out, int int_by, int block, bool transposed)
Copyright (c) 2017-2021 Arm Limited.
Simple tensor object that stores elements in a consecutive chunk of memory.