On Monday, 20 May 2019 at 12:09:02 UTC, Alex wrote:
given some array, is there some way to easily impose structure
on that array at runtime?
void* data;
auto x = cast(byte[A,B,C])data;
X is then an AxBxC matrix.
I'm having to compute the index myself and it just seems
unnecessary. A and B a
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 ef
given some array, is there some way to easily impose structure on
that array at runtime?
void* data;
auto x = cast(byte[A,B,C])data;
X is then an AxBxC matrix.
I'm having to compute the index myself and it just seems
unnecessary. A and B are not known at compile time though.
Obviously it s