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);