The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
chunks.chunks
mir
ndslice
chunks
chunks
Chunks
!([
Dimensions
],
Iterator
,
N
,
kind
==
Contiguous
&& [
Dimensions
] != [
0
] ?
Canonical
:
kind
)
chunks
(Slice!(Iterator, N, kind) slice, size_t[Dimensions.length] chunkLengths)
template
chunks
(Dimensions...)
static if
(
allSatisfy!(isSize_t, Dimensions)
)
Chunks
!([
Dimensions
],
Iterator
,
N
,
kind
==
Contiguous
&&
[
Dimensions
] != [0]
?
Canonical
:
kind
)
chunks
(
Iterator
size_t
N
SliceKind
kind
)
(
Slice
!(
Iterator
,
N
,
kind
)
slice
,
size_t
[
Dimensions.length
]
chunkLengths
...
)
if
(
Dimensions.length
)
Chunks
!([
0
],
Iterator
,
N
,
kind
)
chunks
(Slice!(Iterator, N, kind) slice, size_t chunkLength)
Parameters
slice
Slice
!(
Iterator
,
N
,
kind
)
Slice to chunk.
chunkLengths
size_t
[
Dimensions
.
length
]
Chunk shape. It must not have a zero length.
Return Value
Type:
Chunks
!([
Dimensions
],
Iterator
,
N
,
kind
==
Contiguous
&&
[
Dimensions
] != [0]
?
Canonical
:
kind
)
Chunks
.
Meta
Source
See Implementation
mir
ndslice
chunks
chunks
functions
chunks