The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
DimensionCount
mir
primitives
@
optmath
template
DimensionCount (
T
) {
alias
Slice
=
mir_slice
via
import
mir
.
ndslice
.
slice
:
Slice
,
SliceKind
;
;
alias
SliceKind
=
mir_slice_kind
via
import
mir
.
ndslice
.
slice
:
Slice
,
SliceKind
;
;
@
optmath
static if
(
is(T : Slice!(Iterator, N, kind), Iterator, size_t N, SliceKind kind)
)
enum
size_t
DimensionCount
;
@
optmath
static if
(!(
is(T : Slice!(Iterator, N, kind), Iterator, size_t N, SliceKind kind)
))
static if
(
hasShape!T
)
enum
size_t
DimensionCount
;
@
optmath
static if
(!(
is(T : Slice!(Iterator, N, kind), Iterator, size_t N, SliceKind kind)
))
static if
(!(
hasShape!T
))
enum
size_t
DimensionCount
;
}
Members
Variables
DimensionCount
enum
size_t
DimensionCount
;
Extracts dimension count from a
Slice
. Alias for
isSlice
.
Meta
Source
See Implementation
mir
primitives
functions
anyEmpty
back
elementCount
empty
front
length
popBack
popBackExactly
popBackN
popFront
popFrontExactly
popFrontN
save
shape
walkLength
templates
DeepElementType
DimensionCount
ElementType
isInfinite
variables
hasLength
hasShape
isInputRange
isOutputRange