On Monday, 20 May 2019 at 12:09:02 UTC, Alex wrote:
void* data;

auto x = cast(byte[A,B,C])data;

X is then an AxBxC matrix.

It sounds like you're looking for ndslide from mir
http://code.dlang.org/packages/mir-algorithm

```
ubyte data[];
auto x = x.sliced(A, B, C);
```

It should be pretty efficient, but I'm not certain whether it's as good as your hand-written code.

Reply via email to