namespace std { class gslice { public: gslice(); gslice(size_t s, const valarray<size_t>& l, const valarray<size_t>& d); size_t start() const; valarray<size_t> size() const; valarray<size_t> stride() const; }; }
start = 3 length = {2, 4, 3} stride = {19, 4, 1}
(i0,i1,i2,k)= (0,0,0, 3), (0,0,1, 4), (0,0,2, 5), (0,1,0, 7), (0,1,1, 8), (0,1,2, 9), (0,2,0,11), (0,2,1,12), (0,2,2,13), (0,3,0,15), (0,3,1,16), (0,3,2,17), (1,0,0,22), (1,0,1,23), … (1,3,2,36)
(0,0,0, 3), (0,0,1, 4), (0,0,2, 5), (0,1,0, 4), (0,1,1, 5), (0,1,2, 6), …