From Jason Turner

[simd.loadstore]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp4islkjpz/{from.md → to.md} +210 -0
tmp/tmp4islkjpz/{from.md → to.md} RENAMED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Load and store functions <a id="simd.loadstore">[[simd.loadstore]]</a>
2
+
3
+ ``` cpp
4
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
5
+ requires ranges::sized_range<R>
6
+ constexpr V unchecked_load(R&& r, flags<Flags...> f = {});
7
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
8
+ requires ranges::sized_range<R>
9
+ constexpr V unchecked_load(R&& r, const typename V::mask_type& mask, flags<Flags...> f = {});
10
+ template<class V = see below, contiguous_iterator I, class... Flags>
11
+ constexpr V unchecked_load(I first, iter_difference_t<I> n, flags<Flags...> f = {});
12
+ template<class V = see below, contiguous_iterator I, class... Flags>
13
+ constexpr V unchecked_load(I first, iter_difference_t<I> n, const typename V::mask_type& mask,
14
+ flags<Flags...> f = {});
15
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
16
+ constexpr V unchecked_load(I first, S last, flags<Flags...> f = {});
17
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
18
+ constexpr V unchecked_load(I first, S last, const typename V::mask_type& mask,
19
+ flags<Flags...> f = {});
20
+ ```
21
+
22
+ Let
23
+
24
+ - `mask` be `V::mask_type(true)` for the overloads with no `mask`
25
+ parameter;
26
+ - `R` be `span<const iter_value_t<I>>` for the overloads with no
27
+ template parameter `R`;
28
+ - `r` be `R(first, n)` for the overloads with an `n` parameter and
29
+ `R(first, last)` for the overloads with a `last` parameter.
30
+
31
+ *Mandates:* If `ranges::size(r)` is a constant expression then
32
+ `ranges::size(r)` ≥ `V::size()`.
33
+
34
+ *Preconditions:*
35
+
36
+ - \[`first`, `first + n`) is a valid range for the overloads with an `n`
37
+ parameter.
38
+ - \[`first`, `last`) is a valid range for the overloads with a `last`
39
+ parameter.
40
+ - `ranges::size(r)` ≥ `V::size()`
41
+
42
+ *Effects:* Equivalent to: `return partial_load<V>(r, mask, f);`
43
+
44
+ *Remarks:* The default argument for template parameter `V` is
45
+ `basic_vec<ranges::range_value_t<R>>`.
46
+
47
+ ``` cpp
48
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
49
+ requires ranges::sized_range<R>
50
+ constexpr V partial_load(R&& r, flags<Flags...> f = {});
51
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
52
+ requires ranges::sized_range<R>
53
+ constexpr V partial_load(R&& r, const typename V::mask_type& mask, flags<Flags...> f = {});
54
+ template<class V = see below, contiguous_iterator I, class... Flags>
55
+ constexpr V partial_load(I first, iter_difference_t<I> n, flags<Flags...> f = {});
56
+ template<class V = see below, contiguous_iterator I, class... Flags>
57
+ constexpr V partial_load(I first, iter_difference_t<I> n, const typename V::mask_type& mask,
58
+ flags<Flags...> f = {});
59
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
60
+ constexpr V partial_load(I first, S last, flags<Flags...> f = {});
61
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
62
+ constexpr V partial_load(I first, S last, const typename V::mask_type& mask,
63
+ flags<Flags...> f = {});
64
+ ```
65
+
66
+ Let
67
+
68
+ - `mask` be `V::mask_type(true)` for the overloads with no `mask`
69
+ parameter;
70
+ - `R` be `span<const iter_value_t<I>>` for the overloads with no
71
+ template parameter `R`;
72
+ - `r` be `R(first, n)` for the overloads with an `n` parameter and
73
+ `R(first, last)` for the overloads with a `last` parameter.
74
+
75
+ *Mandates:*
76
+
77
+ - `ranges::range_value_t<R>` is a vectorizable type,
78
+ - `same_as<remove_cvref_t<V>, V>` is `true`,
79
+ - `V` is an enabled specialization of `basic_vec`, and
80
+ - if the template parameter pack `Flags` does not contain
81
+ *`convert-flag`*, then the conversion from `ranges::range_value_t<R>`
82
+ to `V::value_type` is value-preserving.
83
+
84
+ *Preconditions:*
85
+
86
+ - \[`first`, `first + n`) is a valid range for the overloads with an `n`
87
+ parameter.
88
+ - \[`first`, `last`) is a valid range for the overloads with a `last`
89
+ parameter.
90
+ - If the template parameter pack `Flags` contains *`aligned-flag`*,
91
+ `ranges::data(r)` points to storage aligned by
92
+ `alignment_v<V, ranges::range_value_t<R>>`.
93
+ - If the template parameter pack `Flags` contains
94
+ *`overaligned-flag`*`<N>`, `ranges::data(r)` points to storage aligned
95
+ by `N`.
96
+
97
+ *Effects:* Initializes the iᵗʰ element with
98
+ `mask[`i`] && `i` < ranges::size(r) ? static_cast<T>(ranges::data(r)[`i`]) : T()`
99
+ for all i in the range of \[`0`, `V::size()`).
100
+
101
+ *Remarks:* The default argument for template parameter `V` is
102
+ `basic_vec<ranges::range_value_t<R>>`.
103
+
104
+ ``` cpp
105
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
106
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
107
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, R&& r, flags<Flags...> f = {});
108
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
109
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
110
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, R&& r,
111
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
112
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
113
+ requires indirectly_writable<I, T>
114
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n,
115
+ flags<Flags...> f = {});
116
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
117
+ requires indirectly_writable<I, T>
118
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n,
119
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
120
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
121
+ requires indirectly_writable<I, T>
122
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, S last,
123
+ flags<Flags...> f = {});
124
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
125
+ requires indirectly_writable<I, T>
126
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, S last,
127
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
128
+ ```
129
+
130
+ Let
131
+
132
+ - `mask` be `basic_vec<T, Abi>::mask_type(true)` for the overloads with
133
+ no `mask` parameter;
134
+ - `R` be `span<iter_value_t<I>>` for the overloads with no template
135
+ parameter `R`;
136
+ - `r` be `R(first, n)` for the overloads with an `n` parameter and
137
+ `R(first, last)` for the overloads with a `last` parameter.
138
+
139
+ *Mandates:* If `ranges::size(r)` is a constant expression then
140
+ `ranges::size(r)` ≥ *`simd-size-v`*`<T, Abi>`.
141
+
142
+ *Preconditions:*
143
+
144
+ - \[`first`, `first + n`) is a valid range for the overloads with an `n`
145
+ parameter.
146
+ - \[`first`, `last`) is a valid range for the overloads with a `last`
147
+ parameter.
148
+ - `ranges::size(r)` ≥ *`simd-size-v`*`<T, Abi>`
149
+
150
+ *Effects:* Equivalent to: `partial_store(v, r, mask, f)`.
151
+
152
+ ``` cpp
153
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
154
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
155
+ constexpr void partial_store(const basic_vec<T, Abi>& v, R&& r, flags<Flags...> f = {});
156
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
157
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
158
+ constexpr void partial_store(const basic_vec<T, Abi>& v, R&& r,
159
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
160
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
161
+ requires indirectly_writable<I, T>
162
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n,
163
+ flags<Flags...> f = {});
164
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
165
+ requires indirectly_writable<I, T>
166
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n,
167
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
168
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
169
+ requires indirectly_writable<I, T>
170
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, S last,
171
+ flags<Flags...> f = {});
172
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
173
+ requires indirectly_writable<I, T>
174
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, S last,
175
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
176
+ ```
177
+
178
+ Let
179
+
180
+ - `mask` be `basic_vec<T, Abi>::mask_type(true)` for the overloads with
181
+ no `mask` parameter;
182
+ - `R` be `span<iter_value_t<I>>` for the overloads with no template
183
+ parameter `R`;
184
+ - `r` be `R(first, n)` for the overloads with an `n` parameter and
185
+ `R(first, last)` for the overloads with a `last` parameter.
186
+
187
+ *Mandates:*
188
+
189
+ - `ranges::range_value_t<R>` is a vectorizable type, and
190
+ - if the template parameter pack `Flags` does not contain
191
+ *`convert-flag`*, then the conversion from `T` to
192
+ `ranges::range_value_t<R>` is value-preserving.
193
+
194
+ *Preconditions:*
195
+
196
+ - \[`first`, `first + n`) is a valid range for the overloads with an `n`
197
+ parameter.
198
+ - \[`first`, `last`) is a valid range for the overloads with a `last`
199
+ parameter.
200
+ - If the template parameter pack `Flags` contains *`aligned-flag`*,
201
+ `ranges::data(r)` points to storage aligned by
202
+ `alignment_v<basic_vec<T, Abi>, ranges::range_value_t<R>>`.
203
+ - If the template parameter pack `Flags` contains
204
+ *`overaligned-flag`*`<N>`, `ranges::data(r)` points to storage aligned
205
+ by `N`.
206
+
207
+ *Effects:* For all i in the range of \[`0`,
208
+ `basic_vec<T, Abi>::size()`), if `mask[`i`] && `i` < ranges::size(r)` is
209
+ `true`, evaluates `ranges::data(r)[`i`] = v[`i`]`.
210
+