tmp/tmpr0a585__/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###### Observers <a id="mdspan.layout.right.obs">[[mdspan.layout.right.obs]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
index_type required_span_size() const noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Returns:* `extents().`*`fwd-prod-of-extents`*`(extents_type::rank())`.
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
template<class... Indices>
|
| 11 |
+
constexpr index_type operator()(Indices... i) const noexcept;
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
*Constraints:*
|
| 15 |
+
|
| 16 |
+
- `sizeof...(Indices) == extents_type::rank()` is `true`,
|
| 17 |
+
- `(is_convertible_v<Indices, index_type> && ...)` is `true`, and
|
| 18 |
+
- `(is_nothrow_constructible_v<index_type, Indices> && ...)` is `true`.
|
| 19 |
+
|
| 20 |
+
*Preconditions:* `extents_type::`*`index-cast`*`(i)` is a
|
| 21 |
+
multidimensional index in *extents\_*[[mdspan.overview]].
|
| 22 |
+
|
| 23 |
+
*Effects:* Let `P` be a parameter pack such that
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
is_same_v<index_sequence_for<Indices...>, index_sequence<P...>>
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
is `true`. Equivalent to:
|
| 30 |
+
|
| 31 |
+
``` cpp
|
| 32 |
+
return ((static_cast<index_type>(i) * stride(P)) + ... + 0);
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
``` cpp
|
| 36 |
+
constexpr index_type stride(rank_type i) const noexcept;
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
*Constraints:* `extents_type::rank() > 0` is `true`.
|
| 40 |
+
|
| 41 |
+
*Preconditions:* `i < extents_type::rank()` is `true`.
|
| 42 |
+
|
| 43 |
+
*Returns:* `extents().`*`rev-prod-of-extents`*`(i)`.
|
| 44 |
+
|
| 45 |
+
``` cpp
|
| 46 |
+
template<class OtherExtents>
|
| 47 |
+
friend constexpr bool operator==(const mapping& x, const mapping<OtherExtents>& y) noexcept;
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
*Constraints:* `extents_type::rank() == OtherExtents::rank()` is `true`.
|
| 51 |
+
|
| 52 |
+
*Effects:* Equivalent to: `return x.extents() == y.extents();`
|
| 53 |
+
|