From Jason Turner

[mdspan.layout.stride.obs]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp84woc112/{from.md → to.md} +66 -0
tmp/tmp84woc112/{from.md → to.md} RENAMED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ###### Observers <a id="mdspan.layout.stride.obs">[[mdspan.layout.stride.obs]]</a>
2
+
3
+ ``` cpp
4
+ constexpr index_type required_span_size() const noexcept;
5
+ ```
6
+
7
+ *Returns:* *`REQUIRED-SPAN-SIZE`*`(extents(), `*`strides_`*`)`.
8
+
9
+ ``` cpp
10
+ template<class... Indices>
11
+ constexpr index_type operator()(Indices... i) const noexcept;
12
+ ```
13
+
14
+ *Constraints:*
15
+
16
+ - `sizeof...(Indices) == `*`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 bool is_exhaustive() const noexcept;
37
+ ```
38
+
39
+ *Returns:*
40
+
41
+ - `true` if *rank\_* is 0.
42
+ - Otherwise, `true` if there is a permutation P of the integers in the
43
+ range [0, rank_) such that `stride(`p₀`)` equals 1, and `stride(`pᵢ`)`
44
+ equals `stride(`pᵢ₋₁`) * extents().extent(`pᵢ₋₁`)` for i in the range
45
+ [1, rank_), where pᵢ is the iᵗʰ element of P.
46
+ - Otherwise, `false`.
47
+
48
+ ``` cpp
49
+ template<class OtherMapping>
50
+ friend constexpr bool operator==(const mapping& x, const OtherMapping& y) noexcept;
51
+ ```
52
+
53
+ *Constraints:*
54
+
55
+ - `layout-mapping-alike<OtherMapping>` is satisfied.
56
+ - *`rank_`*` == OtherMapping::extents_type::rank()` is `true`.
57
+ - `OtherMapping::is_always_strided()` is `true`.
58
+
59
+ *Preconditions:* `OtherMapping` meets the layout mapping
60
+ requirements [[mdspan.layout.policy.reqmts]].
61
+
62
+ *Returns:* `true` if `x.extents() == y.extents()` is `true`,
63
+ *`OFFSET`*`(y) == 0` is `true`, and each of
64
+ `x.stride(`r`) == y.stride(`r`)` is `true` for r in the range
65
+ [0, `x.extents().rank()`). Otherwise, `false`.
66
+