tmp/tmpw3mrqth6/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###### Observers <a id="mdspan.layout.rightpad.obs">[[mdspan.layout.rightpad.obs]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
constexpr array<index_type, rank_> strides() const noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Returns:* `array<index_type, `*`rank_`*`>(``stride(P_rank)...``)`.
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
constexpr index_type required_span_size() const noexcept;
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
*Returns:* `0` if the multidimensional index space *extents\_* is empty,
|
| 14 |
+
otherwise
|
| 15 |
+
`(*this)(`*`extents_`*`.extent(P_rank) - index_type(1)...) + 1`.
|
| 16 |
+
|
| 17 |
+
``` cpp
|
| 18 |
+
template<class... Indices>
|
| 19 |
+
constexpr size_t operator()(Indices... idxs) const noexcept;
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
*Constraints:*
|
| 23 |
+
|
| 24 |
+
- `sizeof...(Indices) == `*`rank_`* is `true`.
|
| 25 |
+
- `(is_convertible_v<Indices, index_type> && ...)` is `true`.
|
| 26 |
+
- `(is_nothrow_constructible_v<index_type, Indices> && ...)` is `true`.
|
| 27 |
+
|
| 28 |
+
*Preconditions:* `extents_type::`*`index-cast`*`(idxs)` is a
|
| 29 |
+
multidimensional index in `extents()` [[mdspan.overview]].
|
| 30 |
+
|
| 31 |
+
*Returns:*
|
| 32 |
+
`((static_cast<index_type>(idxs) * stride(P_rank)) + ... + 0)`.
|
| 33 |
+
|
| 34 |
+
``` cpp
|
| 35 |
+
static constexpr bool is_always_exhaustive() noexcept;
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
*Returns:*
|
| 39 |
+
|
| 40 |
+
- If *rank\_* equals zero or one, then `true`;
|
| 41 |
+
- otherwise, if neither *static-padding-stride* nor *last-static-extent*
|
| 42 |
+
equal `dynamic_extent`, then
|
| 43 |
+
*`static-padding-stride`*` == `*`last-static-extent`*;
|
| 44 |
+
- otherwise, `false`.
|
| 45 |
+
|
| 46 |
+
``` cpp
|
| 47 |
+
constexpr bool is_exhaustive() const noexcept;
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
*Returns:* `true` if *rank\_* equals zero or one; otherwise,
|
| 51 |
+
|
| 52 |
+
``` cpp
|
| 53 |
+
extents_.extent(rank_ - 1) == stride(rank_ - 2)
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
``` cpp
|
| 57 |
+
constexpr index_type stride(rank_type r) const noexcept;
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
*Preconditions:* `r` is smaller than *rank\_*.
|
| 61 |
+
|
| 62 |
+
*Returns:*
|
| 63 |
+
|
| 64 |
+
- If `r` equals *`rank_`*` - 1`: `1`;
|
| 65 |
+
- otherwise, if `r` equals *`rank_`*` - 2`: *stride-rm2*;
|
| 66 |
+
- otherwise, the product of *stride-rm2* and all values
|
| 67 |
+
`extents_.extent(`k`)` with k in the range of \[`r + 1`,
|
| 68 |
+
*`rank_`*` - 1`).
|
| 69 |
+
|
| 70 |
+
``` cpp
|
| 71 |
+
template<class LayoutRightPaddedMapping>
|
| 72 |
+
friend constexpr bool operator==(const mapping& x, const LayoutRightPaddedMapping& y) noexcept;
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
*Constraints:*
|
| 76 |
+
|
| 77 |
+
- *`is-layout-right-padded-mapping-of`*`<LayoutRightPaddedMapping>` is
|
| 78 |
+
`true`.
|
| 79 |
+
- `LayoutRightPaddedMapping::extents_type::rank() == `*`rank_`* is
|
| 80 |
+
`true`.
|
| 81 |
+
|
| 82 |
+
*Returns:* `true` if `x.extents() == y.extents()` is `true` and
|
| 83 |
+
*`rank_`*` < 2 || x.stride(`*`rank_`*` - 2) == y.stride(`*`rank_`*` - 2)`
|
| 84 |
+
is `true`. Otherwise, `false`.
|
| 85 |
+
|