The OpenD Programming Language

isChunks

Checks if T is Chunks type.

template isChunks (
T
) {
static if(is(T : Chunks!(dimensions, Iterator, N, kind), size_t[] dimensions, Iterator, size_t N, SliceKind kind))
enum isChunks;
static if(!(is(T : Chunks!(dimensions, Iterator, N, kind), size_t[] dimensions, Iterator, size_t N, SliceKind kind)))
enum isChunks;
}

Return Value

array of dimension indices.

Examples

import mir.ndslice.chunks: chunks, isChunks;
import mir.ndslice.topology: iota;

static assert(isChunks!int == null);
static assert(isChunks!(typeof(iota(20, 30).chunks!(1, 0)(3, 7))) == [1, 0]);

Meta