mir-algorithm ~master (2021-09-24T13:11:04Z)
Dub
Repo
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
)
alias
chunks
=
.
chunks
!(
staticMap
!(
toSize_t
,
Dimensions
))
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