tmp/tmpu3ix_60f/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##### Overview <a id="mdspan.sub.overview">[[mdspan.sub.overview]]</a>
|
| 2 |
+
|
| 3 |
+
The `submdspan` facilities create a new `mdspan` viewing a subset of
|
| 4 |
+
elements of an existing input `mdspan`. The subset viewed by the created
|
| 5 |
+
`mdspan` is determined by the `SliceSpecifier` arguments.
|
| 6 |
+
|
| 7 |
+
For each function defined in [[mdspan.sub]] that takes a parameter pack
|
| 8 |
+
named `slices` as an argument:
|
| 9 |
+
|
| 10 |
+
- let `index_type` be
|
| 11 |
+
- `M::index_type` if the function is a member of a class `M`,
|
| 12 |
+
- otherwise, `remove_reference_t<decltype(src)>::index_type` if the
|
| 13 |
+
function has a parameter named `src`,
|
| 14 |
+
- otherwise, the same type as the function’s template argument
|
| 15 |
+
`IndexType`;
|
| 16 |
+
- let `rank` be the number of elements in `slices`;
|
| 17 |
+
- let sₖ be the kᵗʰ element of `slices`;
|
| 18 |
+
- let Sₖ be the type of sₖ; and
|
| 19 |
+
- let `map-rank` be an `array<size_t, rank>` such that for each k in the
|
| 20 |
+
range \[`0`, `rank`), `map-rank[k]` equals:
|
| 21 |
+
- `dynamic_extent` if Sₖ models `convertible_to<index_type>`,
|
| 22 |
+
- otherwise, the number of types Sⱼ with j < k that do not model
|
| 23 |
+
`convertible_to<index_type>`.
|
| 24 |
+
|