byteStrides

Return the number of bytes to step in each dimension when traversing a slice.

pure
size_t[]
byteStrides
(
S
)
(
S s
)

Parameters

s S

n-dimensional slice

Return Value

Type: size_t[]

array of byte strides

Examples

import mir.ndslice.topology : iota, as;

auto e = iota(2, 3, 1, 3);
assert(e.as!int.byteStrides == [36, 12, 12, 4]);
assert(e.as!double.byteStrides == [72, 24, 24, 8]);

Meta