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