From Jason Turner

[simd.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpma5s3ww5/{from.md → to.md} +646 -0
tmp/tmpma5s3ww5/{from.md → to.md} RENAMED
@@ -0,0 +1,646 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Header `<simd>` synopsis <a id="simd.syn">[[simd.syn]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::simd {
5
+ // [simd.traits], type traits
6
+ template<class T, class U = typename T::value_type> struct alignment;
7
+ template<class T, class U = typename T::value_type>
8
+ constexpr size_t alignment_v = alignment<T, U>::value;
9
+
10
+ template<class T, class V> struct rebind { using type = see below; };
11
+ template<class T, class V> using rebind_t = rebind<T, V>::type;
12
+ template<simd-size-type N, class V> struct resize { using type = see below; };
13
+ template<simd-size-type N, class V> using resize_t = resize<N, V>::type;
14
+
15
+ // [simd.flags], load and store flags
16
+ template<class... Flags> struct flags;
17
+ inline constexpr flags<> flag_default{};
18
+ inline constexpr flags<convert-flag> flag_convert{};
19
+ inline constexpr flags<aligned-flag> flag_aligned{};
20
+ template<size_t N> requires (has_single_bit(N))
21
+ constexpr flags<overaligned-flag<N>> flag_overaligned{};
22
+
23
+ // [simd.iterator], class template simd-iterator
24
+ template<class V>
25
+ class simd-iterator; // exposition only
26
+
27
+ // [simd.class], class template basic_vec
28
+ template<class T, class Abi = native-abi<T>> class basic_vec;
29
+ template<class T, simd-size-type N = simd-size-v<T, native-abi<T>>>
30
+ using vec = basic_vec<T, deduce-abi-t<T, N>>;
31
+
32
+ // [simd.reductions], reductions
33
+ template<class T, class Abi, class BinaryOperation = plus<>>
34
+ constexpr T reduce(const basic_vec<T, Abi>&, BinaryOperation = {});
35
+ template<class T, class Abi, class BinaryOperation = plus<>>
36
+ constexpr T reduce(
37
+ const basic_vec<T, Abi>& x, const typename basic_vec<T, Abi>::mask_type& mask,
38
+ BinaryOperation binary_op = {}, type_identity_t<T> identity_element = see below);
39
+
40
+ template<class T, class Abi>
41
+ constexpr T reduce_min(const basic_vec<T, Abi>&) noexcept;
42
+ template<class T, class Abi>
43
+ constexpr T reduce_min(const basic_vec<T, Abi>&,
44
+ const typename basic_vec<T, Abi>::mask_type&) noexcept;
45
+ template<class T, class Abi>
46
+ constexpr T reduce_max(const basic_vec<T, Abi>&) noexcept;
47
+ template<class T, class Abi>
48
+ constexpr T reduce_max(const basic_vec<T, Abi>&,
49
+ const typename basic_vec<T, Abi>::mask_type&) noexcept;
50
+
51
+ // [simd.loadstore], load and store functions
52
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
53
+ requires ranges::sized_range<R>
54
+ constexpr V unchecked_load(R&& r, flags<Flags...> f = {});
55
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
56
+ requires ranges::sized_range<R>
57
+ constexpr V unchecked_load(R&& r, const typename V::mask_type& k,
58
+ flags<Flags...> f = {});
59
+ template<class V = see below, contiguous_iterator I, class... Flags>
60
+ constexpr V unchecked_load(I first, iter_difference_t<I> n,
61
+ flags<Flags...> f = {});
62
+ template<class V = see below, contiguous_iterator I, class... Flags>
63
+ constexpr V unchecked_load(I first, iter_difference_t<I> n,
64
+ const typename V::mask_type& k, flags<Flags...> f = {});
65
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
66
+ constexpr V unchecked_load(I first, S last, flags<Flags...> f = {});
67
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
68
+ constexpr V unchecked_load(I first, S last, const typename V::mask_type& k,
69
+ flags<Flags...> f = {});
70
+
71
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
72
+ requires ranges::sized_range<R>
73
+ constexpr V partial_load(R&& r, flags<Flags...> f = {});
74
+ template<class V = see below, ranges::contiguous_range R, class... Flags>
75
+ requires ranges::sized_range<R>
76
+ constexpr V partial_load(R&& r, const typename V::mask_type& k,
77
+ flags<Flags...> f = {});
78
+ template<class V = see below, contiguous_iterator I, class... Flags>
79
+ constexpr V partial_load(I first, iter_difference_t<I> n, flags<Flags...> f = {});
80
+ template<class V = see below, contiguous_iterator I, class... Flags>
81
+ constexpr V partial_load(I first, iter_difference_t<I> n,
82
+ const typename V::mask_type& k, flags<Flags...> f = {});
83
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
84
+ constexpr V partial_load(I first, S last, flags<Flags...> f = {});
85
+ template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
86
+ constexpr V partial_load(I first, S last, const typename V::mask_type& k,
87
+ flags<Flags...> f = {});
88
+
89
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
90
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
91
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, R&& r,
92
+ flags<Flags...> f = {});
93
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
94
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
95
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, R&& r,
96
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
97
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
98
+ requires indirectly_writable<I, T>
99
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first,
100
+ iter_difference_t<I> n, flags<Flags...> f = {});
101
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
102
+ requires indirectly_writable<I, T>
103
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first,
104
+ iter_difference_t<I> n, const typename basic_vec<T, Abi>::mask_type& mask,
105
+ flags<Flags...> f = {});
106
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
107
+ requires indirectly_writable<I, T>
108
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, S last,
109
+ flags<Flags...> f = {});
110
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
111
+ requires indirectly_writable<I, T>
112
+ constexpr void unchecked_store(const basic_vec<T, Abi>& v, I first, S last,
113
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
114
+
115
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
116
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
117
+ constexpr void partial_store(const basic_vec<T, Abi>& v, R&& r,
118
+ flags<Flags...> f = {});
119
+ template<class T, class Abi, ranges::contiguous_range R, class... Flags>
120
+ requires ranges::sized_range<R> && indirectly_writable<ranges::iterator_t<R>, T>
121
+ constexpr void partial_store(const basic_vec<T, Abi>& v, R&& r,
122
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
123
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
124
+ requires indirectly_writable<I, T>
125
+ constexpr void partial_store(
126
+ const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n, flags<Flags...> f = {});
127
+ template<class T, class Abi, contiguous_iterator I, class... Flags>
128
+ requires indirectly_writable<I, T>
129
+ constexpr void partial_store(
130
+ const basic_vec<T, Abi>& v, I first, iter_difference_t<I> n,
131
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
132
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
133
+ requires indirectly_writable<I, T>
134
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, S last,
135
+ flags<Flags...> f = {});
136
+ template<class T, class Abi, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags>
137
+ requires indirectly_writable<I, T>
138
+ constexpr void partial_store(const basic_vec<T, Abi>& v, I first, S last,
139
+ const typename basic_vec<T, Abi>::mask_type& mask, flags<Flags...> f = {});
140
+
141
+ // [simd.permute.static], static permute
142
+ static constexpr simd-size-type zero_element = implementation-defined // value of simd::zero_element;
143
+ static constexpr simd-size-type uninit_element = implementation-defined // value of simd::uninit_element;
144
+
145
+ template<simd-size-type N = see below, simd-vec-type V, class IdxMap>
146
+ constexpr resize_t<N, V> permute(const V& v, IdxMap&& idxmap);
147
+ template<simd-size-type N = see below, simd-mask-type M, class IdxMap>
148
+ constexpr resize_t<N, M> permute(const M& v, IdxMap&& idxmap);
149
+
150
+ // [simd.permute.dynamic], dynamic permute
151
+ template<simd-vec-type V, simd-integral I>
152
+ constexpr resize_t<I::size(), V> permute(const V& v, const I& indices);
153
+ template<simd-mask-type M, simd-integral I>
154
+ constexpr resize_t<I::size(), M> permute(const M& v, const I& indices);
155
+
156
+ // [simd.permute.mask], mask permute
157
+ template<simd-vec-type V>
158
+ constexpr V compress(const V& v, const typename V::mask_type& selector);
159
+ template<simd-mask-type M>
160
+ constexpr M compress(const M& v, const type_identity_t<M>& selector);
161
+ template<simd-vec-type V>
162
+ constexpr V compress(const V& v, const typename V::mask_type& selector,
163
+ const typename V::value_type& fill_value);
164
+ template<simd-mask-type M>
165
+ constexpr M compress(const M& v, const type_identity_t<M>& selector,
166
+ const typename M::value_type& fill_value);
167
+
168
+ template<simd-vec-type V>
169
+ constexpr V expand(const V& v, const typename V::mask_type& selector,
170
+ const V& original = {});
171
+ template<simd-mask-type M>
172
+ constexpr M expand(const M& v, const type_identity_t<M>& selector,
173
+ const M& original = {});
174
+
175
+ // [simd.permute.memory], memory permute
176
+ template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
177
+ requires ranges::sized_range<R>
178
+ constexpr V unchecked_gather_from(R&& in, const I& indices, flags<Flags...> f = {});
179
+ template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
180
+ requires ranges::sized_range<R>
181
+ constexpr V unchecked_gather_from(R&& in, const typename I::mask_type& mask,
182
+ const I& indices, flags<Flags...> f = {});
183
+
184
+ template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
185
+ requires ranges::sized_range<R>
186
+ constexpr V partial_gather_from(R&& in, const I& indices, flags<Flags...> f = {});
187
+ template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
188
+ requires ranges::sized_range<R>
189
+ constexpr V partial_gather_from(R&& in, const typename I::mask_type& mask,
190
+ const I& indices, flags<Flags...> f = {});
191
+
192
+ template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
193
+ requires ranges::sized_range<R>
194
+ constexpr void unchecked_scatter_to(const V& v, R&& out,
195
+ const I& indices, flags<Flags...> f = {});
196
+ template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
197
+ requires ranges::sized_range<R>
198
+ constexpr void unchecked_scatter_to(const V& v, R&& out, const typename I::mask_type& mask,
199
+ const I& indices, flags<Flags...> f = {});
200
+
201
+ template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
202
+ requires ranges::sized_range<R>
203
+ constexpr void partial_scatter_to(const V& v, R&& out,
204
+ const I& indices, flags<Flags...> f = {});
205
+ template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
206
+ requires ranges::sized_range<R>
207
+ constexpr void partial_scatter_to(const V& v, R&& out, const typename I::mask_type& mask,
208
+ const I& indices, flags<Flags...> f = {});
209
+
210
+ // [simd.creation], creation
211
+ template<class T, class Abi>
212
+ constexpr auto chunk(const basic_vec<typename T::value_type, Abi>& x) noexcept;
213
+ template<class T, class Abi>
214
+ constexpr auto chunk(const basic_mask<mask-element-size<T>, Abi>& x) noexcept;
215
+
216
+ template<simd-size-type N, class T, class Abi>
217
+ constexpr auto chunk(const basic_vec<T, Abi>& x) noexcept;
218
+ template<simd-size-type N, size_t Bytes, class Abi>
219
+ constexpr auto chunk(const basic_mask<Bytes, Abi>& x) noexcept;
220
+
221
+ template<class T, class... Abis>
222
+ constexpr basic_vec<T, deduce-abi-t<T, (basic_vec<T, Abis>::size() + ...)>>
223
+ cat(const basic_vec<T, Abis>&...) noexcept;
224
+ template<size_t Bytes, class... Abis>
225
+ constexpr basic_mask<Bytes, deduce-abi-t<integer-from<Bytes>,
226
+ (basic_mask<Bytes, Abis>::size() + ...)>>
227
+ cat(const basic_mask<Bytes, Abis>&...) noexcept;
228
+
229
+ // [simd.alg], algorithms
230
+ template<class T, class Abi>
231
+ constexpr basic_vec<T, Abi>
232
+ min(const basic_vec<T, Abi>& a, const basic_vec<T, Abi>& b) noexcept;
233
+ template<class T, class Abi>
234
+ constexpr basic_vec<T, Abi>
235
+ max(const basic_vec<T, Abi>& a, const basic_vec<T, Abi>& b) noexcept;
236
+ template<class T, class Abi>
237
+ constexpr pair<basic_vec<T, Abi>, basic_vec<T, Abi>>
238
+ minmax(const basic_vec<T, Abi>& a, const basic_vec<T, Abi>& b) noexcept;
239
+ template<class T, class Abi>
240
+ constexpr basic_vec<T, Abi>
241
+ clamp(const basic_vec<T, Abi>& v, const basic_vec<T, Abi>& lo,
242
+ const basic_vec<T, Abi>& hi);
243
+
244
+ template<class T, class U>
245
+ constexpr auto select(bool c, const T& a, const U& b)
246
+ -> remove_cvref_t<decltype(c ? a : b)>;
247
+ template<size_t Bytes, class Abi, class T, class U>
248
+ constexpr auto select(const basic_mask<Bytes, Abi>& c, const T& a, const U& b)
249
+ noexcept -> decltype(simd-select-impl(c, a, b));
250
+
251
+ // [simd.math], mathematical functions
252
+ template<math-floating-point V> constexpr deduced-vec-t<V> acos(const V& x);
253
+ template<math-floating-point V> constexpr deduced-vec-t<V> asin(const V& x);
254
+ template<math-floating-point V> constexpr deduced-vec-t<V> atan(const V& x);
255
+ template<class V0, class V1>
256
+ constexpr math-common-simd-t<V0, V1> atan2(const V0& y, const V1& x);
257
+ template<math-floating-point V> constexpr deduced-vec-t<V> cos(const V& x);
258
+ template<math-floating-point V> constexpr deduced-vec-t<V> sin(const V& x);
259
+ template<math-floating-point V> constexpr deduced-vec-t<V> tan(const V& x);
260
+ template<math-floating-point V> constexpr deduced-vec-t<V> acosh(const V& x);
261
+ template<math-floating-point V> constexpr deduced-vec-t<V> asinh(const V& x);
262
+ template<math-floating-point V> constexpr deduced-vec-t<V> atanh(const V& x);
263
+ template<math-floating-point V> constexpr deduced-vec-t<V> cosh(const V& x);
264
+ template<math-floating-point V> constexpr deduced-vec-t<V> sinh(const V& x);
265
+ template<math-floating-point V> constexpr deduced-vec-t<V> tanh(const V& x);
266
+ template<math-floating-point V> constexpr deduced-vec-t<V> exp(const V& x);
267
+ template<math-floating-point V> constexpr deduced-vec-t<V> exp2(const V& x);
268
+ template<math-floating-point V> constexpr deduced-vec-t<V> expm1(const V& x);
269
+ template<math-floating-point V>
270
+ constexpr deduced-vec-t<V>
271
+ frexp(const V& value, rebind_t<int, deduced-vec-t<V>>* exp);
272
+ template<math-floating-point V>
273
+ constexpr rebind_t<int, deduced-vec-t<V>> ilogb(const V& x);
274
+ template<math-floating-point V>
275
+ constexpr deduced-vec-t<V> ldexp(const V& x, const rebind_t<int, deduced-vec-t<V>>& exp);
276
+ template<math-floating-point V> constexpr deduced-vec-t<V> log(const V& x);
277
+ template<math-floating-point V> constexpr deduced-vec-t<V> log10(const V& x);
278
+ template<math-floating-point V> constexpr deduced-vec-t<V> log1p(const V& x);
279
+ template<math-floating-point V> constexpr deduced-vec-t<V> log2(const V& x);
280
+ template<math-floating-point V> constexpr deduced-vec-t<V> logb(const V& x);
281
+ template<class T, class Abi>
282
+ constexpr basic_vec<T, Abi>
283
+ modf(const type_identity_t<basic_vec<T, Abi>>& value, basic_vec<T, Abi>* iptr);
284
+ template<math-floating-point V>
285
+ constexpr deduced-vec-t<V> scalbn(const V& x, const rebind_t<int, deduced-vec-t<V>>& n);
286
+ template<math-floating-point V>
287
+ constexpr deduced-vec-t<V> scalbln(
288
+ const V& x, const rebind_t<long int, deduced-vec-t<V>>& n);
289
+ template<math-floating-point V> constexpr deduced-vec-t<V> cbrt(const V& x);
290
+ template<signed_integral T, class Abi>
291
+ constexpr basic_vec<T, Abi> abs(const basic_vec<T, Abi>& j);
292
+ template<math-floating-point V> constexpr deduced-vec-t<V> abs(const V& j);
293
+ template<math-floating-point V> constexpr deduced-vec-t<V> fabs(const V& x);
294
+ template<class V0, class V1>
295
+ constexpr math-common-simd-t<V0, V1> hypot(const V0& x, const V1& y);
296
+ template<class V0, class V1, class V2>
297
+ constexpr math-common-simd-t<V0, V1, V2> hypot(const V0& x, const V1& y, const V2& z);
298
+ template<class V0, class V1>
299
+ constexpr math-common-simd-t<V0, V1> pow(const V0& x, const V1& y);
300
+ template<math-floating-point V> constexpr deduced-vec-t<V> sqrt(const V& x);
301
+ template<math-floating-point V> constexpr deduced-vec-t<V> erf(const V& x);
302
+ template<math-floating-point V> constexpr deduced-vec-t<V> erfc(const V& x);
303
+ template<math-floating-point V> constexpr deduced-vec-t<V> lgamma(const V& x);
304
+ template<math-floating-point V> constexpr deduced-vec-t<V> tgamma(const V& x);
305
+ template<math-floating-point V> constexpr deduced-vec-t<V> ceil(const V& x);
306
+ template<math-floating-point V> constexpr deduced-vec-t<V> floor(const V& x);
307
+ template<math-floating-point V> deduced-vec-t<V> nearbyint(const V& x);
308
+ template<math-floating-point V> deduced-vec-t<V> rint(const V& x);
309
+ template<math-floating-point V>
310
+ rebind_t<long int, deduced-vec-t<V>> lrint(const V& x);
311
+ template<math-floating-point V>
312
+ rebind_t<long long int, V> llrint(const deduced-vec-t<V>& x);
313
+ template<math-floating-point V>
314
+ constexpr deduced-vec-t<V> round(const V& x);
315
+ template<math-floating-point V>
316
+ constexpr rebind_t<long int, deduced-vec-t<V>> lround(const V& x);
317
+ template<math-floating-point V>
318
+ constexpr rebind_t<long long int, deduced-vec-t<V>> llround(const V& x);
319
+ template<math-floating-point V>
320
+ constexpr deduced-vec-t<V> trunc(const V& x);
321
+ template<class V0, class V1>
322
+ constexpr math-common-simd-t<V0, V1> fmod(const V0& x, const V1& y);
323
+ template<class V0, class V1>
324
+ constexpr math-common-simd-t<V0, V1> remainder(const V0& x, const V1& y);
325
+ template<class V0, class V1>
326
+ constexpr math-common-simd-t<V0, V1>
327
+ remquo(const V0& x, const V1& y, rebind_t<int, math-common-simd-t<V0, V1>>* quo);
328
+ template<class V0, class V1>
329
+ constexpr math-common-simd-t<V0, V1> copysign(const V0& x, const V1& y);
330
+ template<class V0, class V1>
331
+ constexpr math-common-simd-t<V0, V1> nextafter(const V0& x, const V1& y);
332
+ template<class V0, class V1>
333
+ constexpr math-common-simd-t<V0, V1> fdim(const V0& x, const V1& y);
334
+ template<class V0, class V1>
335
+ constexpr math-common-simd-t<V0, V1> fmax(const V0& x, const V1& y);
336
+ template<class V0, class V1>
337
+ constexpr math-common-simd-t<V0, V1> fmin(const V0& x, const V1& y);
338
+ template<class V0, class V1, class V2>
339
+ constexpr math-common-simd-t<V0, V1, V2> fma(const V0& x, const V1& y, const V2& z);
340
+ template<class V0, class V1, class V2>
341
+ constexpr math-common-simd-t<V0, V1, V2>
342
+ lerp(const V0& a, const V1& b, const V2& t) noexcept;
343
+ template<math-floating-point V>
344
+ constexpr rebind_t<int, deduced-vec-t<V>> fpclassify(const V& x);
345
+ template<math-floating-point V>
346
+ constexpr typename deduced-vec-t<V>::mask_type isfinite(const V& x);
347
+ template<math-floating-point V>
348
+ constexpr typename deduced-vec-t<V>::mask_type isinf(const V& x);
349
+ template<math-floating-point V>
350
+ constexpr typename deduced-vec-t<V>::mask_type isnan(const V& x);
351
+ template<math-floating-point V>
352
+ constexpr typename deduced-vec-t<V>::mask_type isnormal(const V& x);
353
+ template<math-floating-point V>
354
+ constexpr typename deduced-vec-t<V>::mask_type signbit(const V& x);
355
+ template<class V0, class V1>
356
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
357
+ isgreater(const V0& x, const V1& y);
358
+ template<class V0, class V1>
359
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
360
+ isgreaterequal(const V0& x, const V1& y);
361
+ template<class V0, class V1>
362
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
363
+ isless(const V0& x, const V1& y);
364
+ template<class V0, class V1>
365
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
366
+ islessequal(const V0& x, const V1& y);
367
+ template<class V0, class V1>
368
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
369
+ islessgreater(const V0& x, const V1& y);
370
+ template<class V0, class V1>
371
+ constexpr typename math-common-simd-t<V0, V1>::mask_type
372
+ isunordered(const V0& x, const V1& y);
373
+ template<math-floating-point V>
374
+ deduced-vec-t<V> assoc_laguerre(const rebind_t<unsigned, deduced-vec-t<V>>& n,
375
+ const rebind_t<unsigned, deduced-vec-t<V>>& m, const V& x);
376
+ template<math-floating-point V>
377
+ deduced-vec-t<V> assoc_legendre(const rebind_t<unsigned, deduced-vec-t<V>>& l,
378
+ const rebind_t<unsigned, deduced-vec-t<V>>& m, const V& x);
379
+ template<class V0, class V1>
380
+ math-common-simd-t<V0, V1> beta(const V0& x, const V1& y);
381
+ template<math-floating-point V> deduced-vec-t<V> comp_ellint_1(const V& k);
382
+ template<math-floating-point V> deduced-vec-t<V> comp_ellint_2(const V& k);
383
+ template<class V0, class V1>
384
+ math-common-simd-t<V0, V1> comp_ellint_3(const V0& k, const V1& nu);
385
+ template<class V0, class V1>
386
+ math-common-simd-t<V0, V1> cyl_bessel_i(const V0& nu, const V1& x);
387
+ template<class V0, class V1>
388
+ math-common-simd-t<V0, V1> cyl_bessel_j(const V0& nu, const V1& x);
389
+ template<class V0, class V1>
390
+ math-common-simd-t<V0, V1> cyl_bessel_k(const V0& nu, const V1& x);
391
+ template<class V0, class V1>
392
+ math-common-simd-t<V0, V1> cyl_neumann(const V0& nu, const V1& x);
393
+ template<class V0, class V1>
394
+ math-common-simd-t<V0, V1> ellint_1(const V0& k, const V1& phi);
395
+ template<class V0, class V1>
396
+ math-common-simd-t<V0, V1> ellint_2(const V0& k, const V1& phi);
397
+ template<class V0, class V1, class V2>
398
+ math-common-simd-t<V0, V1, V2> ellint_3(const V0& k, const V1& nu, const V2& phi);
399
+ template<math-floating-point V> deduced-vec-t<V> expint(const V& x);
400
+ template<math-floating-point V>
401
+ deduced-vec-t<V> hermite(const rebind_t<unsigned, deduced-vec-t<V>>& n, const V& x);
402
+ template<math-floating-point V>
403
+ deduced-vec-t<V> laguerre(const rebind_t<unsigned, deduced-vec-t<V>>& n, const V& x);
404
+ template<math-floating-point V>
405
+ deduced-vec-t<V> legendre(const rebind_t<unsigned, deduced-vec-t<V>>& l, const V& x);
406
+ template<math-floating-point V>
407
+ deduced-vec-t<V> riemann_zeta(const V& x);
408
+ template<math-floating-point V>
409
+ deduced-vec-t<V> sph_bessel(
410
+ const rebind_t<unsigned, deduced-vec-t<V>>& n, const V& x);
411
+ template<math-floating-point V>
412
+ deduced-vec-t<V> sph_legendre(const rebind_t<unsigned, deduced-vec-t<V>>& l,
413
+ const rebind_t<unsigned, deduced-vec-t<V>>& m, const V& theta);
414
+ template<math-floating-point V>
415
+ deduced-vec-t<V>
416
+ sph_neumann(const rebind_t<unsigned, deduced-vec-t<V>>& n, const V& x);
417
+
418
+ // [simd.bit], bit manipulation
419
+ template<simd-vec-type V> constexpr V byteswap(const V& v) noexcept;
420
+ template<simd-vec-type V> constexpr V bit_ceil(const V& v) noexcept;
421
+ template<simd-vec-type V> constexpr V bit_floor(const V& v) noexcept;
422
+
423
+ template<simd-vec-type V>
424
+ constexpr typename V::mask_type has_single_bit(const V& v) noexcept;
425
+
426
+ template<simd-vec-type V0, simd-vec-type V1>
427
+ constexpr V0 rotl(const V0& v, const V1& s) noexcept;
428
+ template<simd-vec-type V>
429
+ constexpr V rotl(const V& v, int s) noexcept;
430
+
431
+ template<simd-vec-type V0, simd-vec-type V1>
432
+ constexpr V0 rotr(const V0& v, const V1& s) noexcept;
433
+ template<simd-vec-type V>
434
+ constexpr V rotr(const V& v, int s) noexcept;
435
+
436
+ template<simd-vec-type V>
437
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
438
+ bit_width(const V& v) noexcept;
439
+ template<simd-vec-type V>
440
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
441
+ countl_zero(const V& v) noexcept;
442
+ template<simd-vec-type V>
443
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
444
+ countl_one(const V& v) noexcept;
445
+ template<simd-vec-type V>
446
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
447
+ countr_zero(const V& v) noexcept;
448
+ template<simd-vec-type V>
449
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
450
+ countr_one(const V& v) noexcept;
451
+ template<simd-vec-type V>
452
+ constexpr rebind_t<make_signed_t<typename V::value_type>, V>
453
+ popcount(const V& v) noexcept;
454
+
455
+ // [simd.complex.math], complex math
456
+ template<simd-complex V>
457
+ constexpr rebind_t<simd-complex-value-type<V>, V> real(const V&) noexcept;
458
+
459
+ template<simd-complex V>
460
+ constexpr rebind_t<simd-complex-value-type<V>, V> imag(const V&) noexcept;
461
+
462
+ template<simd-complex V>
463
+ constexpr rebind_t<simd-complex-value-type<V>, V> abs(const V&);
464
+
465
+ template<simd-complex V>
466
+ constexpr rebind_t<simd-complex-value-type<V>, V> arg(const V&);
467
+
468
+ template<simd-complex V>
469
+ constexpr rebind_t<simd-complex-value-type<V>, V> norm(const V&);
470
+
471
+ template<simd-complex V> constexpr V conj(const V&);
472
+ template<simd-complex V> constexpr V proj(const V&);
473
+ template<simd-complex V> constexpr V exp(const V& v);
474
+ template<simd-complex V> constexpr V log(const V& v);
475
+ template<simd-complex V> constexpr V log10(const V& v);
476
+
477
+ template<simd-complex V> constexpr V sqrt(const V& v);
478
+ template<simd-complex V> constexpr V sin(const V& v);
479
+ template<simd-complex V> constexpr V asin(const V& v);
480
+ template<simd-complex V> constexpr V cos(const V& v);
481
+ template<simd-complex V> constexpr V acos(const V& v);
482
+ template<simd-complex V> constexpr V tan(const V& v);
483
+ template<simd-complex V> constexpr V atan(const V& v);
484
+ template<simd-complex V> constexpr V sinh(const V& v);
485
+ template<simd-complex V> constexpr V asinh(const V& v);
486
+ template<simd-complex V> constexpr V cosh(const V& v);
487
+ template<simd-complex V> constexpr V acosh(const V& v);
488
+ template<simd-complex V> constexpr V tanh(const V& v);
489
+ template<simd-complex V> constexpr V atanh(const V& v);
490
+
491
+ template<simd-floating-point V>
492
+ rebind_t<complex<typename V::value_type>, V> polar(const V& x, const V& y = {});
493
+
494
+ template<simd-complex V> constexpr V pow(const V& x, const V& y);
495
+
496
+ // [simd.mask.class], class template basic_mask
497
+ template<size_t Bytes, class Abi = native-abi<integer-from<Bytes>>> class basic_mask;
498
+ template<class T, simd-size-type N = simd-size-v<T, native-abi<T>>>
499
+ using mask = basic_mask<sizeof(T), deduce-abi-t<T, N>>;
500
+
501
+ // [simd.mask.reductions], reductions
502
+ template<size_t Bytes, class Abi>
503
+ constexpr bool all_of(const basic_mask<Bytes, Abi>&) noexcept;
504
+ template<size_t Bytes, class Abi>
505
+ constexpr bool any_of(const basic_mask<Bytes, Abi>&) noexcept;
506
+ template<size_t Bytes, class Abi>
507
+ constexpr bool none_of(const basic_mask<Bytes, Abi>&) noexcept;
508
+ template<size_t Bytes, class Abi>
509
+ constexpr simd-size-type reduce_count(const basic_mask<Bytes, Abi>&) noexcept;
510
+ template<size_t Bytes, class Abi>
511
+ constexpr simd-size-type reduce_min_index(const basic_mask<Bytes, Abi>&);
512
+ template<size_t Bytes, class Abi>
513
+ constexpr simd-size-type reduce_max_index(const basic_mask<Bytes, Abi>&);
514
+
515
+ constexpr bool all_of(same_as<bool> auto) noexcept;
516
+ constexpr bool any_of(same_as<bool> auto) noexcept;
517
+ constexpr bool none_of(same_as<bool> auto) noexcept;
518
+ constexpr simd-size-type reduce_count(same_as<bool> auto) noexcept;
519
+ constexpr simd-size-type reduce_min_index(same_as<bool> auto);
520
+ constexpr simd-size-type reduce_max_index(same_as<bool> auto);
521
+ }
522
+
523
+ namespace std {
524
+ // See [simd.alg], algorithms
525
+ using simd::min;
526
+ using simd::max;
527
+ using simd::minmax;
528
+ using simd::clamp;
529
+
530
+ // See [simd.math], mathematical functions
531
+ using simd::acos;
532
+ using simd::asin;
533
+ using simd::atan;
534
+ using simd::atan2;
535
+ using simd::cos;
536
+ using simd::sin;
537
+ using simd::tan;
538
+ using simd::acosh;
539
+ using simd::asinh;
540
+ using simd::atanh;
541
+ using simd::cosh;
542
+ using simd::sinh;
543
+ using simd::tanh;
544
+ using simd::exp;
545
+ using simd::exp2;
546
+ using simd::expm1;
547
+ using simd::frexp;
548
+ using simd::ilogb;
549
+ using simd::ldexp;
550
+ using simd::log;
551
+ using simd::log10;
552
+ using simd::log1p;
553
+ using simd::log2;
554
+ using simd::logb;
555
+ using simd::modf;
556
+ using simd::scalbn;
557
+ using simd::scalbln;
558
+ using simd::cbrt;
559
+ using simd::abs;
560
+ using simd::fabs;
561
+ using simd::hypot;
562
+ using simd::pow;
563
+ using simd::sqrt;
564
+ using simd::erf;
565
+ using simd::erfc;
566
+ using simd::lgamma;
567
+ using simd::tgamma;
568
+ using simd::ceil;
569
+ using simd::floor;
570
+ using simd::nearbyint;
571
+ using simd::rint;
572
+ using simd::lrint;
573
+ using simd::llrint;
574
+ using simd::round;
575
+ using simd::lround;
576
+ using simd::llround;
577
+ using simd::trunc;
578
+ using simd::fmod;
579
+ using simd::remainder;
580
+ using simd::remquo;
581
+ using simd::copysign;
582
+ using simd::nextafter;
583
+ using simd::fdim;
584
+ using simd::fmax;
585
+ using simd::fmin;
586
+ using simd::fma;
587
+ using simd::lerp;
588
+ using simd::fpclassify;
589
+ using simd::isfinite;
590
+ using simd::isinf;
591
+ using simd::isnan;
592
+ using simd::isnormal;
593
+ using simd::signbit;
594
+ using simd::isgreater;
595
+ using simd::isgreaterequal;
596
+ using simd::isless;
597
+ using simd::islessequal;
598
+ using simd::islessgreater;
599
+ using simd::isunordered;
600
+ using simd::assoc_laguerre;
601
+ using simd::assoc_legendre;
602
+ using simd::beta;
603
+ using simd::comp_ellint_1;
604
+ using simd::comp_ellint_2;
605
+ using simd::comp_ellint_3;
606
+ using simd::cyl_bessel_i;
607
+ using simd::cyl_bessel_j;
608
+ using simd::cyl_bessel_k;
609
+ using simd::cyl_neumann;
610
+ using simd::ellint_1;
611
+ using simd::ellint_2;
612
+ using simd::ellint_3;
613
+ using simd::expint;
614
+ using simd::hermite;
615
+ using simd::laguerre;
616
+ using simd::legendre;
617
+ using simd::riemann_zeta;
618
+ using simd::sph_bessel;
619
+ using simd::sph_legendre;
620
+ using simd::sph_neumann;
621
+
622
+ // See [simd.bit], bit manipulation
623
+ using simd::byteswap;
624
+ using simd::bit_ceil;
625
+ using simd::bit_floor;
626
+ using simd::has_single_bit;
627
+ using simd::rotl;
628
+ using simd::rotr;
629
+ using simd::bit_width;
630
+ using simd::countl_zero;
631
+ using simd::countl_one;
632
+ using simd::countr_zero;
633
+ using simd::countr_one;
634
+ using simd::popcount;
635
+
636
+ // See [simd.complex.math], vec complex math
637
+ using simd::real;
638
+ using simd::imag;
639
+ using simd::arg;
640
+ using simd::norm;
641
+ using simd::conj;
642
+ using simd::proj;
643
+ using simd::polar;
644
+ }
645
+ ```
646
+