tmp/tmp4j8x2ui4/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###### `layout_right` specialization of `submdspan_mapping` <a id="mdspan.sub.map.right">[[mdspan.sub.map.right]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class Extents>
|
| 5 |
+
template<class... SliceSpecifiers>
|
| 6 |
+
constexpr auto layout_right::mapping<Extents>::submdspan-mapping-impl(
|
| 7 |
+
SliceSpecifiers... slices) const -> see below;
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
*Returns:*
|
| 11 |
+
|
| 12 |
+
- `submdspan_mapping_result{*this, 0}`, if `Extents::rank() == 0` is
|
| 13 |
+
`true`;
|
| 14 |
+
- otherwise,
|
| 15 |
+
`submdspan_mapping_result{layout_right::mapping(sub_ext), offset}`, if
|
| 16 |
+
`SubExtents::rank() == 0` is `true`;
|
| 17 |
+
- otherwise,
|
| 18 |
+
`submdspan_mapping_result{layout_right::mapping(sub_ext), offset}`, if
|
| 19 |
+
- for each k in the range \[*`rank_`*` - SubExtents::rank() + 1`,
|
| 20 |
+
*`rank_`*), `is_convertible_v<`Sₖ`, full_extent_t>` is `true`; and
|
| 21 |
+
- for k equal to *rank\_* - `SubExtents::rank()`, Sₖ is a unit-stride
|
| 22 |
+
slice for `mapping`;
|
| 23 |
+
|
| 24 |
+
\[*Note 3*: If the above conditions are true, all Sₖ with
|
| 25 |
+
$k < \texttt{\textit{rank_} - SubExtents::rank()}$ are convertible to
|
| 26 |
+
`index_type`. — *end note*]
|
| 27 |
+
- otherwise,
|
| 28 |
+
``` cpp
|
| 29 |
+
submdspan_mapping_result{layout_right_padded<S_static>::mapping(sub_ext,
|
| 30 |
+
stride(rank_ - u - 2)), offset}
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
if for a value u for which rank_ - u - 2 is the largest value p
|
| 34 |
+
smaller than *`rank_`*` - 1` for which Sₚ is a unit-stride slice for
|
| 35 |
+
`mapping`, the following conditions are met:
|
| 36 |
+
- for k equal to *`rank_`*` - 1`, Sₖ is a unit-stride slice for
|
| 37 |
+
`mapping`; and
|
| 38 |
+
- for each k in the range
|
| 39 |
+
\[*`rank_`*` - SubExtents::rank() - `u` + 1`,
|
| 40 |
+
*`rank_`*` - `u` - 1`), `is_convertible_v<`Sₖ`, full_extent_t>` is
|
| 41 |
+
`true`; and
|
| 42 |
+
- for k equal to *`rank_`*` - SubExtents::rank() - `u, Sₖ is a
|
| 43 |
+
unit-stride slice for `mapping`;
|
| 44 |
+
|
| 45 |
+
and where `S_static` is:
|
| 46 |
+
- `dynamic_extent`, if `static_extent(`k`)` is `dynamic_extent` for
|
| 47 |
+
any k in the range \[*`rank_`*` - `u` - 1`, *`rank_`*),
|
| 48 |
+
- otherwise, the product of all values `static_extent(`k`)` for k in
|
| 49 |
+
the range \[*`rank_`*` - `u` - 1`, *`rank_`*);
|
| 50 |
+
- otherwise,
|
| 51 |
+
``` cpp
|
| 52 |
+
submdspan_mapping_result{layout_stride::mapping(sub_ext, sub_strides), offset}
|
| 53 |
+
```
|
| 54 |
+
|