Universal
import mir.ndslice.slice: Universal; auto slice = iota(2, 3).asKindOf!Universal; assert(slice == [[0, 1, 2], [3, 4, 5]]); assert(slice._lengths == [2, 3]); assert(slice._strides == [3, 1]);
Canonical
import mir.ndslice.slice: Canonical; auto slice = iota(2, 3).asKindOf!Canonical; assert(slice == [[0, 1, 2], [3, 4, 5]]); assert(slice._lengths == [2, 3]); assert(slice._strides == [3]);
Contiguous
import mir.ndslice.slice: Contiguous; auto slice = iota(2, 3).asKindOf!Contiguous; assert(slice == [[0, 1, 2], [3, 4, 5]]); assert(slice._lengths == [2, 3]); assert(slice._strides == []);
Converts a slice to user provided kind.
Contiguous slices can be converted to any kind. Canonical slices can't be converted to contiguous slices. Universal slices can be converted only to the same kind.