23
Containers library
[containers]
23.7
Views
[views]
23.7.3
Multidimensional access
[views.multidim]
23.7.3.1
Overview
[mdspan.overview]
1
#
A
multidimensional index space
is a Cartesian product of integer intervals
.
Each interval can be represented by a half-open range
[
L
i
,
U
i
)
, where
L
i
and
U
i
are the lower and upper bounds of the
i
th
dimension
.
The
rank
of a multidimensional index space is the number of intervals it represents
.
The
size of a multidimensional index space
is the product of
U
i
−
L
i
for each dimension
i
if its rank is greater than 0, and 1 otherwise
.
2
#
An integer
r
is a
rank index
of an index space
S
if
r
is in the range
[
0
,
rank of
S
)
.
3
#
A pack of integers
idx
is a
multidimensional index
in a multidimensional index space
S
(or representation thereof) if both of the following are true:
(3.1)
sizeof
.
.
.
(
idx
)
is equal to the rank of
S
, and
(3.2)
for every rank index
i
of
S
, the
i
th
value of
idx
is an integer in the interval
[
L
i
,
U
i
)
of
S
.