mir-algorithm ~master (2021-09-24T13:11:04Z)
Dub
Repo
squeeze.squeeze
mir
ndslice
topology
squeeze
Undocumented in source.
template
squeeze
(sizediff_t axis = 0)
@
optmath
Slice
!(
Iterator
,
N
- 1,
kind
!=
Canonical
?
kind
:
(
(
axis
==
N
- 1 ||
axis
== -1
)
?
Universal
:
(
N
== 2 ?
Contiguous
:
kind
)
)
)
squeeze
(
Iterator
size_t
N
SliceKind
kind
)
(
Slice
!(
Iterator
,
N
,
kind
)
slice
)
if
(
-
sizediff_t
(
N
) <=
axis
&&
axis
<
sizediff_t
(
N
)
&&
N
> 1
)
Meta
Source
See Implementation
mir
ndslice
topology
squeeze
functions
squeeze