From Jason Turner

[mdspan.sub.map.rightpad]

Diff to HTML by rtfpessoa

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