From Jason Turner

[mdspan.layout.left.obs]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwvdsfa6o/{from.md → to.md} +53 -0
tmp/tmpwvdsfa6o/{from.md → to.md} RENAMED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ###### Observers <a id="mdspan.layout.left.obs">[[mdspan.layout.left.obs]]</a>
2
+
3
+ ``` cpp
4
+ constexpr 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;
37
+ ```
38
+
39
+ *Constraints:* `extents_type::rank() > 0` is `true`.
40
+
41
+ *Preconditions:* `i < extents_type::rank()` is `true`.
42
+
43
+ *Returns:* `extents().`*`fwd-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
+