tmp/tmpbslezjud/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###### `layout_left_padded` specialization of `submdspan_mapping` <a id="mdspan.sub.map.leftpad">[[mdspan.sub.map.leftpad]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class Extents>
|
| 5 |
+
template<class... SliceSpecifiers>
|
| 6 |
+
constexpr auto layout_left_padded::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_left::mapping(sub_ext), offset}`, if
|
| 16 |
+
*`rank_`*` == 1` is `true` or `SubExtents::rank() == 0` is `true`;
|
| 17 |
+
- otherwise,
|
| 18 |
+
`submdspan_mapping_result{layout_left::mapping(sub_ext), offset}`, if
|
| 19 |
+
- `SubExtents::rank() == 1` is `true` and
|
| 20 |
+
- S₀ is a unit-stride slice for `mapping`;
|
| 21 |
+
- otherwise,
|
| 22 |
+
``` cpp
|
| 23 |
+
submdspan_mapping_result{layout_left_padded<S_static>::mapping(sub_ext, stride(u + 1)),
|
| 24 |
+
offset}
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
if for a value u for which u` + 1` is the smallest value p larger than
|
| 28 |
+
zero for which Sₚ is a unit-stride slice for `mapping`, the following
|
| 29 |
+
conditions are met:
|
| 30 |
+
- S₀ is a unit-stride slice for `mapping`; and
|
| 31 |
+
- for each k in the range \[u` + 1`, u` + SubExtents::rank() - 1`),
|
| 32 |
+
`is_convertible_v<`Sₖ`, full_extent_t>` is `true`; and
|
| 33 |
+
- for k equal to u` + SubExtents::rank() - 1`, Sₖ is a unit-stride
|
| 34 |
+
slice for `mapping`;
|
| 35 |
+
|
| 36 |
+
where `S_static` is:
|
| 37 |
+
- `dynamic_extent`, if *static-padding-stride* is `dynamic_extent` or
|
| 38 |
+
`static_extent(`k`)` is `dynamic_extent` for any k in the range
|
| 39 |
+
\[`1`, u` + 1`),
|
| 40 |
+
- otherwise, the product of *static-padding-stride* and all values
|
| 41 |
+
`static_extent(`k`)` for k in the range \[`1`, u` + 1`);
|
| 42 |
+
- otherwise,
|
| 43 |
+
``` cpp
|
| 44 |
+
submdspan_mapping_result{layout_stride::mapping(sub_ext, sub_strides), offset}
|
| 45 |
+
```
|
| 46 |
+
|