Files
cppdraft_translate/cppdraft/mdspan/overview.md
2025-10-25 03:02:53 +03:00

1.9 KiB
Raw Blame History

[mdspan.overview]

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 [Li,Ui), where Li and Ui are the lower and upper bounds of the ith 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 Ui−Li 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:

sizeof...(idx) is equal to the rank of S, and

for every rank index i of S, the ith value of idx is an integer in the interval [Li,Ui) of S.