3.0 KiB
[mdspan.layout.general]
23 Containers library [containers]
23.7 Views [views]
23.7.3 Multidimensional access [views.multidim]
23.7.3.4 Layout mapping [mdspan.layout]
23.7.3.4.1 General [mdspan.layout.general]
In [mdspan.layout.reqmts] and [mdspan.layout.policy.reqmts]:
-
M denotes a layout mapping class.
-
m denotes a (possibly const) value of type M.
-
i and j are packs of (possibly const) integers that are multidimensional indices in m.extents() ([mdspan.overview]). [Note 1: The type of each element of the packs can be a different integer type. â end note]
-
r is a (possibly const) rank index of typename M::extents_type.
-
dr is a pack of (possibly const) integers for which sizeof...(dr) == M::extents_type::rank() is true, the rth element is equal to 1, and all other elements are equal to 0.
In [mdspan.layout.reqmts] through [mdspan.layout.stride]:
Let is-mapping-of be the exposition-only variable template defined as follows:template<class Layout, class Mapping>constexpr bool is-mapping-of = // exposition only is_same_v<typename Layout::template mapping, Mapping>;
Let is-layout-left-padded-mapping-of be
the exposition-only variable template defined as follows:templateconstexpr bool is-layout-left-padded-mapping-of = see below; // exposition only where is-layout-left-padded-mapping-of is true if and only if Mapping denotes
a specialization of layout_left_padded::mapping for some value S of type size_t.
Let is-layout-right-padded-mapping-of be
the exposition-only variable template defined as follows:templateconstexpr bool is-layout-right-padded-mapping-of = see below; // exposition only where is-layout-right-padded-mapping-of is true if and only if Mapping denotes
a specialization of layout_right_padded::mapping for some value S of type size_t.
For nonnegative integers x and y, let LEAST-MULTIPLE-AT-LEAST(x,y) denote
y if x is zero,
otherwise, the least multiple of x that is greater than or equal to y.