LLVM OpenMP* Runtime Library
kmp_atomic.h
1 /*
2  * kmp_atomic.h - ATOMIC header file
3  */
4 
5 
6 //===----------------------------------------------------------------------===//
7 //
8 // The LLVM Compiler Infrastructure
9 //
10 // This file is dual licensed under the MIT and the University of Illinois Open
11 // Source Licenses. See LICENSE.txt for details.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 
16 #ifndef KMP_ATOMIC_H
17 #define KMP_ATOMIC_H
18 
19 #include "kmp_lock.h"
20 #include "kmp_os.h"
21 
22 #if OMPT_SUPPORT
23 #include "ompt-specific.h"
24 #endif
25 
26 // C++ build port.
27 // Intel compiler does not support _Complex datatype on win.
28 // Intel compiler supports _Complex datatype on lin and mac.
29 // On the other side, there is a problem of stack alignment on lin_32 and mac_32
30 // if the rhs is cmplx80 or cmplx128 typedef'ed datatype.
31 // The decision is: to use compiler supported _Complex type on lin and mac,
32 // to use typedef'ed types on win.
33 // Condition for WIN64 was modified in anticipation of 10.1 build compiler.
34 
35 #if defined(__cplusplus) && (KMP_OS_WINDOWS)
36 // create shortcuts for c99 complex types
37 
38 // Visual Studio cannot have function parameters that have the
39 // align __declspec attribute, so we must remove it. (Compiler Error C2719)
40 #if KMP_COMPILER_MSVC
41 #undef KMP_DO_ALIGN
42 #define KMP_DO_ALIGN(alignment) /* Nothing */
43 #endif
44 
45 #if (_MSC_VER < 1600) && defined(_DEBUG)
46 // Workaround for the problem of _DebugHeapTag unresolved external.
47 // This problem prevented to use our static debug library for C tests
48 // compiled with /MDd option (the library itself built with /MTd),
49 #undef _DEBUG
50 #define _DEBUG_TEMPORARILY_UNSET_
51 #endif
52 
53 #include <complex>
54 
55 template <typename type_lhs, typename type_rhs>
56 std::complex<type_lhs> __kmp_lhs_div_rhs(const std::complex<type_lhs> &lhs,
57  const std::complex<type_rhs> &rhs) {
58  type_lhs a = lhs.real();
59  type_lhs b = lhs.imag();
60  type_rhs c = rhs.real();
61  type_rhs d = rhs.imag();
62  type_rhs den = c * c + d * d;
63  type_rhs r = (a * c + b * d);
64  type_rhs i = (b * c - a * d);
65  std::complex<type_lhs> ret(r / den, i / den);
66  return ret;
67 }
68 
69 // complex8
70 struct __kmp_cmplx64_t : std::complex<double> {
71 
72  __kmp_cmplx64_t() : std::complex<double>() {}
73 
74  __kmp_cmplx64_t(const std::complex<double> &cd) : std::complex<double>(cd) {}
75 
76  void operator/=(const __kmp_cmplx64_t &rhs) {
77  std::complex<double> lhs = *this;
78  *this = __kmp_lhs_div_rhs(lhs, rhs);
79  }
80 
81  __kmp_cmplx64_t operator/(const __kmp_cmplx64_t &rhs) {
82  std::complex<double> lhs = *this;
83  return __kmp_lhs_div_rhs(lhs, rhs);
84  }
85 };
86 typedef struct __kmp_cmplx64_t kmp_cmplx64;
87 
88 // complex4
89 struct __kmp_cmplx32_t : std::complex<float> {
90 
91  __kmp_cmplx32_t() : std::complex<float>() {}
92 
93  __kmp_cmplx32_t(const std::complex<float> &cf) : std::complex<float>(cf) {}
94 
95  __kmp_cmplx32_t operator+(const __kmp_cmplx32_t &b) {
96  std::complex<float> lhs = *this;
97  std::complex<float> rhs = b;
98  return (lhs + rhs);
99  }
100  __kmp_cmplx32_t operator-(const __kmp_cmplx32_t &b) {
101  std::complex<float> lhs = *this;
102  std::complex<float> rhs = b;
103  return (lhs - rhs);
104  }
105  __kmp_cmplx32_t operator*(const __kmp_cmplx32_t &b) {
106  std::complex<float> lhs = *this;
107  std::complex<float> rhs = b;
108  return (lhs * rhs);
109  }
110 
111  __kmp_cmplx32_t operator+(const kmp_cmplx64 &b) {
112  kmp_cmplx64 t = kmp_cmplx64(*this) + b;
113  std::complex<double> d(t);
114  std::complex<float> f(d);
115  __kmp_cmplx32_t r(f);
116  return r;
117  }
118  __kmp_cmplx32_t operator-(const kmp_cmplx64 &b) {
119  kmp_cmplx64 t = kmp_cmplx64(*this) - b;
120  std::complex<double> d(t);
121  std::complex<float> f(d);
122  __kmp_cmplx32_t r(f);
123  return r;
124  }
125  __kmp_cmplx32_t operator*(const kmp_cmplx64 &b) {
126  kmp_cmplx64 t = kmp_cmplx64(*this) * b;
127  std::complex<double> d(t);
128  std::complex<float> f(d);
129  __kmp_cmplx32_t r(f);
130  return r;
131  }
132 
133  void operator/=(const __kmp_cmplx32_t &rhs) {
134  std::complex<float> lhs = *this;
135  *this = __kmp_lhs_div_rhs(lhs, rhs);
136  }
137 
138  __kmp_cmplx32_t operator/(const __kmp_cmplx32_t &rhs) {
139  std::complex<float> lhs = *this;
140  return __kmp_lhs_div_rhs(lhs, rhs);
141  }
142 
143  void operator/=(const kmp_cmplx64 &rhs) {
144  std::complex<float> lhs = *this;
145  *this = __kmp_lhs_div_rhs(lhs, rhs);
146  }
147 
148  __kmp_cmplx32_t operator/(const kmp_cmplx64 &rhs) {
149  std::complex<float> lhs = *this;
150  return __kmp_lhs_div_rhs(lhs, rhs);
151  }
152 };
153 typedef struct __kmp_cmplx32_t kmp_cmplx32;
154 
155 // complex10
156 struct KMP_DO_ALIGN(16) __kmp_cmplx80_t : std::complex<long double> {
157 
158  __kmp_cmplx80_t() : std::complex<long double>() {}
159 
160  __kmp_cmplx80_t(const std::complex<long double> &cld)
161  : std::complex<long double>(cld) {}
162 
163  void operator/=(const __kmp_cmplx80_t &rhs) {
164  std::complex<long double> lhs = *this;
165  *this = __kmp_lhs_div_rhs(lhs, rhs);
166  }
167 
168  __kmp_cmplx80_t operator/(const __kmp_cmplx80_t &rhs) {
169  std::complex<long double> lhs = *this;
170  return __kmp_lhs_div_rhs(lhs, rhs);
171  }
172 };
173 typedef KMP_DO_ALIGN(16) struct __kmp_cmplx80_t kmp_cmplx80;
174 
175 // complex16
176 #if KMP_HAVE_QUAD
177 struct __kmp_cmplx128_t : std::complex<_Quad> {
178 
179  __kmp_cmplx128_t() : std::complex<_Quad>() {}
180 
181  __kmp_cmplx128_t(const std::complex<_Quad> &cq) : std::complex<_Quad>(cq) {}
182 
183  void operator/=(const __kmp_cmplx128_t &rhs) {
184  std::complex<_Quad> lhs = *this;
185  *this = __kmp_lhs_div_rhs(lhs, rhs);
186  }
187 
188  __kmp_cmplx128_t operator/(const __kmp_cmplx128_t &rhs) {
189  std::complex<_Quad> lhs = *this;
190  return __kmp_lhs_div_rhs(lhs, rhs);
191  }
192 };
193 typedef struct __kmp_cmplx128_t kmp_cmplx128;
194 #endif /* KMP_HAVE_QUAD */
195 
196 #ifdef _DEBUG_TEMPORARILY_UNSET_
197 #undef _DEBUG_TEMPORARILY_UNSET_
198 // Set it back now
199 #define _DEBUG 1
200 #endif
201 
202 #else
203 // create shortcuts for c99 complex types
204 typedef float _Complex kmp_cmplx32;
205 typedef double _Complex kmp_cmplx64;
206 typedef long double _Complex kmp_cmplx80;
207 #if KMP_HAVE_QUAD
208 typedef _Quad _Complex kmp_cmplx128;
209 #endif
210 #endif
211 
212 // Compiler 12.0 changed alignment of 16 and 32-byte arguments (like _Quad
213 // and kmp_cmplx128) on IA-32 architecture. The following aligned structures
214 // are implemented to support the old alignment in 10.1, 11.0, 11.1 and
215 // introduce the new alignment in 12.0. See CQ88405.
216 #if KMP_ARCH_X86 && KMP_HAVE_QUAD
217 
218 // 4-byte aligned structures for backward compatibility.
219 
220 #pragma pack(push, 4)
221 
222 struct KMP_DO_ALIGN(4) Quad_a4_t {
223  _Quad q;
224 
225  Quad_a4_t() : q() {}
226  Quad_a4_t(const _Quad &cq) : q(cq) {}
227 
228  Quad_a4_t operator+(const Quad_a4_t &b) {
229  _Quad lhs = (*this).q;
230  _Quad rhs = b.q;
231  return (Quad_a4_t)(lhs + rhs);
232  }
233 
234  Quad_a4_t operator-(const Quad_a4_t &b) {
235  _Quad lhs = (*this).q;
236  _Quad rhs = b.q;
237  return (Quad_a4_t)(lhs - rhs);
238  }
239  Quad_a4_t operator*(const Quad_a4_t &b) {
240  _Quad lhs = (*this).q;
241  _Quad rhs = b.q;
242  return (Quad_a4_t)(lhs * rhs);
243  }
244 
245  Quad_a4_t operator/(const Quad_a4_t &b) {
246  _Quad lhs = (*this).q;
247  _Quad rhs = b.q;
248  return (Quad_a4_t)(lhs / rhs);
249  }
250 };
251 
252 struct KMP_DO_ALIGN(4) kmp_cmplx128_a4_t {
253  kmp_cmplx128 q;
254 
255  kmp_cmplx128_a4_t() : q() {}
256 
257  kmp_cmplx128_a4_t(const kmp_cmplx128 &c128) : q(c128) {}
258 
259  kmp_cmplx128_a4_t operator+(const kmp_cmplx128_a4_t &b) {
260  kmp_cmplx128 lhs = (*this).q;
261  kmp_cmplx128 rhs = b.q;
262  return (kmp_cmplx128_a4_t)(lhs + rhs);
263  }
264  kmp_cmplx128_a4_t operator-(const kmp_cmplx128_a4_t &b) {
265  kmp_cmplx128 lhs = (*this).q;
266  kmp_cmplx128 rhs = b.q;
267  return (kmp_cmplx128_a4_t)(lhs - rhs);
268  }
269  kmp_cmplx128_a4_t operator*(const kmp_cmplx128_a4_t &b) {
270  kmp_cmplx128 lhs = (*this).q;
271  kmp_cmplx128 rhs = b.q;
272  return (kmp_cmplx128_a4_t)(lhs * rhs);
273  }
274 
275  kmp_cmplx128_a4_t operator/(const kmp_cmplx128_a4_t &b) {
276  kmp_cmplx128 lhs = (*this).q;
277  kmp_cmplx128 rhs = b.q;
278  return (kmp_cmplx128_a4_t)(lhs / rhs);
279  }
280 };
281 
282 #pragma pack(pop)
283 
284 // New 16-byte aligned structures for 12.0 compiler.
285 struct KMP_DO_ALIGN(16) Quad_a16_t {
286  _Quad q;
287 
288  Quad_a16_t() : q() {}
289  Quad_a16_t(const _Quad &cq) : q(cq) {}
290 
291  Quad_a16_t operator+(const Quad_a16_t &b) {
292  _Quad lhs = (*this).q;
293  _Quad rhs = b.q;
294  return (Quad_a16_t)(lhs + rhs);
295  }
296 
297  Quad_a16_t operator-(const Quad_a16_t &b) {
298  _Quad lhs = (*this).q;
299  _Quad rhs = b.q;
300  return (Quad_a16_t)(lhs - rhs);
301  }
302  Quad_a16_t operator*(const Quad_a16_t &b) {
303  _Quad lhs = (*this).q;
304  _Quad rhs = b.q;
305  return (Quad_a16_t)(lhs * rhs);
306  }
307 
308  Quad_a16_t operator/(const Quad_a16_t &b) {
309  _Quad lhs = (*this).q;
310  _Quad rhs = b.q;
311  return (Quad_a16_t)(lhs / rhs);
312  }
313 };
314 
315 struct KMP_DO_ALIGN(16) kmp_cmplx128_a16_t {
316  kmp_cmplx128 q;
317 
318  kmp_cmplx128_a16_t() : q() {}
319 
320  kmp_cmplx128_a16_t(const kmp_cmplx128 &c128) : q(c128) {}
321 
322  kmp_cmplx128_a16_t operator+(const kmp_cmplx128_a16_t &b) {
323  kmp_cmplx128 lhs = (*this).q;
324  kmp_cmplx128 rhs = b.q;
325  return (kmp_cmplx128_a16_t)(lhs + rhs);
326  }
327  kmp_cmplx128_a16_t operator-(const kmp_cmplx128_a16_t &b) {
328  kmp_cmplx128 lhs = (*this).q;
329  kmp_cmplx128 rhs = b.q;
330  return (kmp_cmplx128_a16_t)(lhs - rhs);
331  }
332  kmp_cmplx128_a16_t operator*(const kmp_cmplx128_a16_t &b) {
333  kmp_cmplx128 lhs = (*this).q;
334  kmp_cmplx128 rhs = b.q;
335  return (kmp_cmplx128_a16_t)(lhs * rhs);
336  }
337 
338  kmp_cmplx128_a16_t operator/(const kmp_cmplx128_a16_t &b) {
339  kmp_cmplx128 lhs = (*this).q;
340  kmp_cmplx128 rhs = b.q;
341  return (kmp_cmplx128_a16_t)(lhs / rhs);
342  }
343 };
344 
345 #endif
346 
347 #if (KMP_ARCH_X86)
348 #define QUAD_LEGACY Quad_a4_t
349 #define CPLX128_LEG kmp_cmplx128_a4_t
350 #else
351 #define QUAD_LEGACY _Quad
352 #define CPLX128_LEG kmp_cmplx128
353 #endif
354 
355 #ifdef __cplusplus
356 extern "C" {
357 #endif
358 
359 extern int __kmp_atomic_mode;
360 
361 // Atomic locks can easily become contended, so we use queuing locks for them.
362 typedef kmp_queuing_lock_t kmp_atomic_lock_t;
363 
364 static inline void __kmp_acquire_atomic_lock(kmp_atomic_lock_t *lck,
365  kmp_int32 gtid) {
366 #if OMPT_SUPPORT && OMPT_TRACE
367  if (ompt_enabled && ompt_callbacks.ompt_callback(ompt_event_wait_atomic)) {
368  ompt_callbacks.ompt_callback(ompt_event_wait_atomic)((ompt_wait_id_t)lck);
369  }
370 #endif
371 
372  __kmp_acquire_queuing_lock(lck, gtid);
373 
374 #if OMPT_SUPPORT && OMPT_TRACE
375  if (ompt_enabled &&
376  ompt_callbacks.ompt_callback(ompt_event_acquired_atomic)) {
377  ompt_callbacks.ompt_callback(ompt_event_acquired_atomic)(
378  (ompt_wait_id_t)lck);
379  }
380 #endif
381 }
382 
383 static inline int __kmp_test_atomic_lock(kmp_atomic_lock_t *lck,
384  kmp_int32 gtid) {
385  return __kmp_test_queuing_lock(lck, gtid);
386 }
387 
388 static inline void __kmp_release_atomic_lock(kmp_atomic_lock_t *lck,
389  kmp_int32 gtid) {
390  __kmp_release_queuing_lock(lck, gtid);
391 #if OMPT_SUPPORT && OMPT_BLAME
392  if (ompt_enabled && ompt_callbacks.ompt_callback(ompt_event_release_atomic)) {
393  ompt_callbacks.ompt_callback(ompt_event_release_atomic)(
394  (ompt_wait_id_t)lck);
395  }
396 #endif
397 }
398 
399 static inline void __kmp_init_atomic_lock(kmp_atomic_lock_t *lck) {
400  __kmp_init_queuing_lock(lck);
401 }
402 
403 static inline void __kmp_destroy_atomic_lock(kmp_atomic_lock_t *lck) {
404  __kmp_destroy_queuing_lock(lck);
405 }
406 
407 // Global Locks
408 extern kmp_atomic_lock_t __kmp_atomic_lock; /* Control access to all user coded
409  atomics in Gnu compat mode */
410 extern kmp_atomic_lock_t __kmp_atomic_lock_1i; /* Control access to all user
411  coded atomics for 1-byte fixed
412  data types */
413 extern kmp_atomic_lock_t __kmp_atomic_lock_2i; /* Control access to all user
414  coded atomics for 2-byte fixed
415  data types */
416 extern kmp_atomic_lock_t __kmp_atomic_lock_4i; /* Control access to all user
417  coded atomics for 4-byte fixed
418  data types */
419 extern kmp_atomic_lock_t __kmp_atomic_lock_4r; /* Control access to all user
420  coded atomics for kmp_real32
421  data type */
422 extern kmp_atomic_lock_t __kmp_atomic_lock_8i; /* Control access to all user
423  coded atomics for 8-byte fixed
424  data types */
425 extern kmp_atomic_lock_t __kmp_atomic_lock_8r; /* Control access to all user
426  coded atomics for kmp_real64
427  data type */
428 extern kmp_atomic_lock_t
429  __kmp_atomic_lock_8c; /* Control access to all user coded atomics for
430  complex byte data type */
431 extern kmp_atomic_lock_t
432  __kmp_atomic_lock_10r; /* Control access to all user coded atomics for long
433  double data type */
434 extern kmp_atomic_lock_t __kmp_atomic_lock_16r; /* Control access to all user
435  coded atomics for _Quad data
436  type */
437 extern kmp_atomic_lock_t __kmp_atomic_lock_16c; /* Control access to all user
438  coded atomics for double
439  complex data type*/
440 extern kmp_atomic_lock_t
441  __kmp_atomic_lock_20c; /* Control access to all user coded atomics for long
442  double complex type*/
443 extern kmp_atomic_lock_t __kmp_atomic_lock_32c; /* Control access to all user
444  coded atomics for _Quad
445  complex data type */
446 
447 // Below routines for atomic UPDATE are listed
448 
449 // 1-byte
450 void __kmpc_atomic_fixed1_add(ident_t *id_ref, int gtid, char *lhs, char rhs);
451 void __kmpc_atomic_fixed1_andb(ident_t *id_ref, int gtid, char *lhs, char rhs);
452 void __kmpc_atomic_fixed1_div(ident_t *id_ref, int gtid, char *lhs, char rhs);
453 void __kmpc_atomic_fixed1u_div(ident_t *id_ref, int gtid, unsigned char *lhs,
454  unsigned char rhs);
455 void __kmpc_atomic_fixed1_mul(ident_t *id_ref, int gtid, char *lhs, char rhs);
456 void __kmpc_atomic_fixed1_orb(ident_t *id_ref, int gtid, char *lhs, char rhs);
457 void __kmpc_atomic_fixed1_shl(ident_t *id_ref, int gtid, char *lhs, char rhs);
458 void __kmpc_atomic_fixed1_shr(ident_t *id_ref, int gtid, char *lhs, char rhs);
459 void __kmpc_atomic_fixed1u_shr(ident_t *id_ref, int gtid, unsigned char *lhs,
460  unsigned char rhs);
461 void __kmpc_atomic_fixed1_sub(ident_t *id_ref, int gtid, char *lhs, char rhs);
462 void __kmpc_atomic_fixed1_xor(ident_t *id_ref, int gtid, char *lhs, char rhs);
463 // 2-byte
464 void __kmpc_atomic_fixed2_add(ident_t *id_ref, int gtid, short *lhs, short rhs);
465 void __kmpc_atomic_fixed2_andb(ident_t *id_ref, int gtid, short *lhs,
466  short rhs);
467 void __kmpc_atomic_fixed2_div(ident_t *id_ref, int gtid, short *lhs, short rhs);
468 void __kmpc_atomic_fixed2u_div(ident_t *id_ref, int gtid, unsigned short *lhs,
469  unsigned short rhs);
470 void __kmpc_atomic_fixed2_mul(ident_t *id_ref, int gtid, short *lhs, short rhs);
471 void __kmpc_atomic_fixed2_orb(ident_t *id_ref, int gtid, short *lhs, short rhs);
472 void __kmpc_atomic_fixed2_shl(ident_t *id_ref, int gtid, short *lhs, short rhs);
473 void __kmpc_atomic_fixed2_shr(ident_t *id_ref, int gtid, short *lhs, short rhs);
474 void __kmpc_atomic_fixed2u_shr(ident_t *id_ref, int gtid, unsigned short *lhs,
475  unsigned short rhs);
476 void __kmpc_atomic_fixed2_sub(ident_t *id_ref, int gtid, short *lhs, short rhs);
477 void __kmpc_atomic_fixed2_xor(ident_t *id_ref, int gtid, short *lhs, short rhs);
478 // 4-byte add / sub fixed
479 void __kmpc_atomic_fixed4_add(ident_t *id_ref, int gtid, kmp_int32 *lhs,
480  kmp_int32 rhs);
481 void __kmpc_atomic_fixed4_sub(ident_t *id_ref, int gtid, kmp_int32 *lhs,
482  kmp_int32 rhs);
483 // 4-byte add / sub float
484 void __kmpc_atomic_float4_add(ident_t *id_ref, int gtid, kmp_real32 *lhs,
485  kmp_real32 rhs);
486 void __kmpc_atomic_float4_sub(ident_t *id_ref, int gtid, kmp_real32 *lhs,
487  kmp_real32 rhs);
488 // 8-byte add / sub fixed
489 void __kmpc_atomic_fixed8_add(ident_t *id_ref, int gtid, kmp_int64 *lhs,
490  kmp_int64 rhs);
491 void __kmpc_atomic_fixed8_sub(ident_t *id_ref, int gtid, kmp_int64 *lhs,
492  kmp_int64 rhs);
493 // 8-byte add / sub float
494 void __kmpc_atomic_float8_add(ident_t *id_ref, int gtid, kmp_real64 *lhs,
495  kmp_real64 rhs);
496 void __kmpc_atomic_float8_sub(ident_t *id_ref, int gtid, kmp_real64 *lhs,
497  kmp_real64 rhs);
498 // 4-byte fixed
499 void __kmpc_atomic_fixed4_andb(ident_t *id_ref, int gtid, kmp_int32 *lhs,
500  kmp_int32 rhs);
501 void __kmpc_atomic_fixed4_div(ident_t *id_ref, int gtid, kmp_int32 *lhs,
502  kmp_int32 rhs);
503 void __kmpc_atomic_fixed4u_div(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
504  kmp_uint32 rhs);
505 void __kmpc_atomic_fixed4_mul(ident_t *id_ref, int gtid, kmp_int32 *lhs,
506  kmp_int32 rhs);
507 void __kmpc_atomic_fixed4_orb(ident_t *id_ref, int gtid, kmp_int32 *lhs,
508  kmp_int32 rhs);
509 void __kmpc_atomic_fixed4_shl(ident_t *id_ref, int gtid, kmp_int32 *lhs,
510  kmp_int32 rhs);
511 void __kmpc_atomic_fixed4_shr(ident_t *id_ref, int gtid, kmp_int32 *lhs,
512  kmp_int32 rhs);
513 void __kmpc_atomic_fixed4u_shr(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
514  kmp_uint32 rhs);
515 void __kmpc_atomic_fixed4_xor(ident_t *id_ref, int gtid, kmp_int32 *lhs,
516  kmp_int32 rhs);
517 // 8-byte fixed
518 void __kmpc_atomic_fixed8_andb(ident_t *id_ref, int gtid, kmp_int64 *lhs,
519  kmp_int64 rhs);
520 void __kmpc_atomic_fixed8_div(ident_t *id_ref, int gtid, kmp_int64 *lhs,
521  kmp_int64 rhs);
522 void __kmpc_atomic_fixed8u_div(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
523  kmp_uint64 rhs);
524 void __kmpc_atomic_fixed8_mul(ident_t *id_ref, int gtid, kmp_int64 *lhs,
525  kmp_int64 rhs);
526 void __kmpc_atomic_fixed8_orb(ident_t *id_ref, int gtid, kmp_int64 *lhs,
527  kmp_int64 rhs);
528 void __kmpc_atomic_fixed8_shl(ident_t *id_ref, int gtid, kmp_int64 *lhs,
529  kmp_int64 rhs);
530 void __kmpc_atomic_fixed8_shr(ident_t *id_ref, int gtid, kmp_int64 *lhs,
531  kmp_int64 rhs);
532 void __kmpc_atomic_fixed8u_shr(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
533  kmp_uint64 rhs);
534 void __kmpc_atomic_fixed8_xor(ident_t *id_ref, int gtid, kmp_int64 *lhs,
535  kmp_int64 rhs);
536 // 4-byte float
537 void __kmpc_atomic_float4_div(ident_t *id_ref, int gtid, kmp_real32 *lhs,
538  kmp_real32 rhs);
539 void __kmpc_atomic_float4_mul(ident_t *id_ref, int gtid, kmp_real32 *lhs,
540  kmp_real32 rhs);
541 // 8-byte float
542 void __kmpc_atomic_float8_div(ident_t *id_ref, int gtid, kmp_real64 *lhs,
543  kmp_real64 rhs);
544 void __kmpc_atomic_float8_mul(ident_t *id_ref, int gtid, kmp_real64 *lhs,
545  kmp_real64 rhs);
546 // 1-, 2-, 4-, 8-byte logical (&&, ||)
547 void __kmpc_atomic_fixed1_andl(ident_t *id_ref, int gtid, char *lhs, char rhs);
548 void __kmpc_atomic_fixed1_orl(ident_t *id_ref, int gtid, char *lhs, char rhs);
549 void __kmpc_atomic_fixed2_andl(ident_t *id_ref, int gtid, short *lhs,
550  short rhs);
551 void __kmpc_atomic_fixed2_orl(ident_t *id_ref, int gtid, short *lhs, short rhs);
552 void __kmpc_atomic_fixed4_andl(ident_t *id_ref, int gtid, kmp_int32 *lhs,
553  kmp_int32 rhs);
554 void __kmpc_atomic_fixed4_orl(ident_t *id_ref, int gtid, kmp_int32 *lhs,
555  kmp_int32 rhs);
556 void __kmpc_atomic_fixed8_andl(ident_t *id_ref, int gtid, kmp_int64 *lhs,
557  kmp_int64 rhs);
558 void __kmpc_atomic_fixed8_orl(ident_t *id_ref, int gtid, kmp_int64 *lhs,
559  kmp_int64 rhs);
560 // MIN / MAX
561 void __kmpc_atomic_fixed1_max(ident_t *id_ref, int gtid, char *lhs, char rhs);
562 void __kmpc_atomic_fixed1_min(ident_t *id_ref, int gtid, char *lhs, char rhs);
563 void __kmpc_atomic_fixed2_max(ident_t *id_ref, int gtid, short *lhs, short rhs);
564 void __kmpc_atomic_fixed2_min(ident_t *id_ref, int gtid, short *lhs, short rhs);
565 void __kmpc_atomic_fixed4_max(ident_t *id_ref, int gtid, kmp_int32 *lhs,
566  kmp_int32 rhs);
567 void __kmpc_atomic_fixed4_min(ident_t *id_ref, int gtid, kmp_int32 *lhs,
568  kmp_int32 rhs);
569 void __kmpc_atomic_fixed8_max(ident_t *id_ref, int gtid, kmp_int64 *lhs,
570  kmp_int64 rhs);
571 void __kmpc_atomic_fixed8_min(ident_t *id_ref, int gtid, kmp_int64 *lhs,
572  kmp_int64 rhs);
573 void __kmpc_atomic_float4_max(ident_t *id_ref, int gtid, kmp_real32 *lhs,
574  kmp_real32 rhs);
575 void __kmpc_atomic_float4_min(ident_t *id_ref, int gtid, kmp_real32 *lhs,
576  kmp_real32 rhs);
577 void __kmpc_atomic_float8_max(ident_t *id_ref, int gtid, kmp_real64 *lhs,
578  kmp_real64 rhs);
579 void __kmpc_atomic_float8_min(ident_t *id_ref, int gtid, kmp_real64 *lhs,
580  kmp_real64 rhs);
581 #if KMP_HAVE_QUAD
582 void __kmpc_atomic_float16_max(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
583  QUAD_LEGACY rhs);
584 void __kmpc_atomic_float16_min(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
585  QUAD_LEGACY rhs);
586 #if (KMP_ARCH_X86)
587 // Routines with 16-byte arguments aligned to 16-byte boundary; IA-32
588 // architecture only
589 void __kmpc_atomic_float16_max_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
590  Quad_a16_t rhs);
591 void __kmpc_atomic_float16_min_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
592  Quad_a16_t rhs);
593 #endif
594 #endif
595 // .NEQV. (same as xor)
596 void __kmpc_atomic_fixed1_neqv(ident_t *id_ref, int gtid, char *lhs, char rhs);
597 void __kmpc_atomic_fixed2_neqv(ident_t *id_ref, int gtid, short *lhs,
598  short rhs);
599 void __kmpc_atomic_fixed4_neqv(ident_t *id_ref, int gtid, kmp_int32 *lhs,
600  kmp_int32 rhs);
601 void __kmpc_atomic_fixed8_neqv(ident_t *id_ref, int gtid, kmp_int64 *lhs,
602  kmp_int64 rhs);
603 // .EQV. (same as ~xor)
604 void __kmpc_atomic_fixed1_eqv(ident_t *id_ref, int gtid, char *lhs, char rhs);
605 void __kmpc_atomic_fixed2_eqv(ident_t *id_ref, int gtid, short *lhs, short rhs);
606 void __kmpc_atomic_fixed4_eqv(ident_t *id_ref, int gtid, kmp_int32 *lhs,
607  kmp_int32 rhs);
608 void __kmpc_atomic_fixed8_eqv(ident_t *id_ref, int gtid, kmp_int64 *lhs,
609  kmp_int64 rhs);
610 // long double type
611 void __kmpc_atomic_float10_add(ident_t *id_ref, int gtid, long double *lhs,
612  long double rhs);
613 void __kmpc_atomic_float10_sub(ident_t *id_ref, int gtid, long double *lhs,
614  long double rhs);
615 void __kmpc_atomic_float10_mul(ident_t *id_ref, int gtid, long double *lhs,
616  long double rhs);
617 void __kmpc_atomic_float10_div(ident_t *id_ref, int gtid, long double *lhs,
618  long double rhs);
619 // _Quad type
620 #if KMP_HAVE_QUAD
621 void __kmpc_atomic_float16_add(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
622  QUAD_LEGACY rhs);
623 void __kmpc_atomic_float16_sub(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
624  QUAD_LEGACY rhs);
625 void __kmpc_atomic_float16_mul(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
626  QUAD_LEGACY rhs);
627 void __kmpc_atomic_float16_div(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
628  QUAD_LEGACY rhs);
629 #if (KMP_ARCH_X86)
630 // Routines with 16-byte arguments aligned to 16-byte boundary
631 void __kmpc_atomic_float16_add_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
632  Quad_a16_t rhs);
633 void __kmpc_atomic_float16_sub_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
634  Quad_a16_t rhs);
635 void __kmpc_atomic_float16_mul_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
636  Quad_a16_t rhs);
637 void __kmpc_atomic_float16_div_a16(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
638  Quad_a16_t rhs);
639 #endif
640 #endif
641 // routines for complex types
642 void __kmpc_atomic_cmplx4_add(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
643  kmp_cmplx32 rhs);
644 void __kmpc_atomic_cmplx4_sub(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
645  kmp_cmplx32 rhs);
646 void __kmpc_atomic_cmplx4_mul(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
647  kmp_cmplx32 rhs);
648 void __kmpc_atomic_cmplx4_div(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
649  kmp_cmplx32 rhs);
650 void __kmpc_atomic_cmplx8_add(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
651  kmp_cmplx64 rhs);
652 void __kmpc_atomic_cmplx8_sub(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
653  kmp_cmplx64 rhs);
654 void __kmpc_atomic_cmplx8_mul(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
655  kmp_cmplx64 rhs);
656 void __kmpc_atomic_cmplx8_div(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
657  kmp_cmplx64 rhs);
658 void __kmpc_atomic_cmplx10_add(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
659  kmp_cmplx80 rhs);
660 void __kmpc_atomic_cmplx10_sub(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
661  kmp_cmplx80 rhs);
662 void __kmpc_atomic_cmplx10_mul(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
663  kmp_cmplx80 rhs);
664 void __kmpc_atomic_cmplx10_div(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
665  kmp_cmplx80 rhs);
666 #if KMP_HAVE_QUAD
667 void __kmpc_atomic_cmplx16_add(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
668  CPLX128_LEG rhs);
669 void __kmpc_atomic_cmplx16_sub(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
670  CPLX128_LEG rhs);
671 void __kmpc_atomic_cmplx16_mul(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
672  CPLX128_LEG rhs);
673 void __kmpc_atomic_cmplx16_div(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
674  CPLX128_LEG rhs);
675 #if (KMP_ARCH_X86)
676 // Routines with 16-byte arguments aligned to 16-byte boundary
677 void __kmpc_atomic_cmplx16_add_a16(ident_t *id_ref, int gtid,
678  kmp_cmplx128_a16_t *lhs,
679  kmp_cmplx128_a16_t rhs);
680 void __kmpc_atomic_cmplx16_sub_a16(ident_t *id_ref, int gtid,
681  kmp_cmplx128_a16_t *lhs,
682  kmp_cmplx128_a16_t rhs);
683 void __kmpc_atomic_cmplx16_mul_a16(ident_t *id_ref, int gtid,
684  kmp_cmplx128_a16_t *lhs,
685  kmp_cmplx128_a16_t rhs);
686 void __kmpc_atomic_cmplx16_div_a16(ident_t *id_ref, int gtid,
687  kmp_cmplx128_a16_t *lhs,
688  kmp_cmplx128_a16_t rhs);
689 #endif
690 #endif
691 
692 #if OMP_40_ENABLED
693 
694 // OpenMP 4.0: x = expr binop x for non-commutative operations.
695 // Supported only on IA-32 architecture and Intel(R) 64
696 #if KMP_ARCH_X86 || KMP_ARCH_X86_64
697 
698 void __kmpc_atomic_fixed1_sub_rev(ident_t *id_ref, int gtid, char *lhs,
699  char rhs);
700 void __kmpc_atomic_fixed1_div_rev(ident_t *id_ref, int gtid, char *lhs,
701  char rhs);
702 void __kmpc_atomic_fixed1u_div_rev(ident_t *id_ref, int gtid,
703  unsigned char *lhs, unsigned char rhs);
704 void __kmpc_atomic_fixed1_shl_rev(ident_t *id_ref, int gtid, char *lhs,
705  char rhs);
706 void __kmpc_atomic_fixed1_shr_rev(ident_t *id_ref, int gtid, char *lhs,
707  char rhs);
708 void __kmpc_atomic_fixed1u_shr_rev(ident_t *id_ref, int gtid,
709  unsigned char *lhs, unsigned char rhs);
710 void __kmpc_atomic_fixed2_sub_rev(ident_t *id_ref, int gtid, short *lhs,
711  short rhs);
712 void __kmpc_atomic_fixed2_div_rev(ident_t *id_ref, int gtid, short *lhs,
713  short rhs);
714 void __kmpc_atomic_fixed2u_div_rev(ident_t *id_ref, int gtid,
715  unsigned short *lhs, unsigned short rhs);
716 void __kmpc_atomic_fixed2_shl_rev(ident_t *id_ref, int gtid, short *lhs,
717  short rhs);
718 void __kmpc_atomic_fixed2_shr_rev(ident_t *id_ref, int gtid, short *lhs,
719  short rhs);
720 void __kmpc_atomic_fixed2u_shr_rev(ident_t *id_ref, int gtid,
721  unsigned short *lhs, unsigned short rhs);
722 void __kmpc_atomic_fixed4_sub_rev(ident_t *id_ref, int gtid, kmp_int32 *lhs,
723  kmp_int32 rhs);
724 void __kmpc_atomic_fixed4_div_rev(ident_t *id_ref, int gtid, kmp_int32 *lhs,
725  kmp_int32 rhs);
726 void __kmpc_atomic_fixed4u_div_rev(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
727  kmp_uint32 rhs);
728 void __kmpc_atomic_fixed4_shl_rev(ident_t *id_ref, int gtid, kmp_int32 *lhs,
729  kmp_int32 rhs);
730 void __kmpc_atomic_fixed4_shr_rev(ident_t *id_ref, int gtid, kmp_int32 *lhs,
731  kmp_int32 rhs);
732 void __kmpc_atomic_fixed4u_shr_rev(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
733  kmp_uint32 rhs);
734 void __kmpc_atomic_fixed8_sub_rev(ident_t *id_ref, int gtid, kmp_int64 *lhs,
735  kmp_int64 rhs);
736 void __kmpc_atomic_fixed8_div_rev(ident_t *id_ref, int gtid, kmp_int64 *lhs,
737  kmp_int64 rhs);
738 void __kmpc_atomic_fixed8u_div_rev(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
739  kmp_uint64 rhs);
740 void __kmpc_atomic_fixed8_shl_rev(ident_t *id_ref, int gtid, kmp_int64 *lhs,
741  kmp_int64 rhs);
742 void __kmpc_atomic_fixed8_shr_rev(ident_t *id_ref, int gtid, kmp_int64 *lhs,
743  kmp_int64 rhs);
744 void __kmpc_atomic_fixed8u_shr_rev(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
745  kmp_uint64 rhs);
746 void __kmpc_atomic_float4_sub_rev(ident_t *id_ref, int gtid, float *lhs,
747  float rhs);
748 void __kmpc_atomic_float4_div_rev(ident_t *id_ref, int gtid, float *lhs,
749  float rhs);
750 void __kmpc_atomic_float8_sub_rev(ident_t *id_ref, int gtid, double *lhs,
751  double rhs);
752 void __kmpc_atomic_float8_div_rev(ident_t *id_ref, int gtid, double *lhs,
753  double rhs);
754 void __kmpc_atomic_float10_sub_rev(ident_t *id_ref, int gtid, long double *lhs,
755  long double rhs);
756 void __kmpc_atomic_float10_div_rev(ident_t *id_ref, int gtid, long double *lhs,
757  long double rhs);
758 #if KMP_HAVE_QUAD
759 void __kmpc_atomic_float16_sub_rev(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
760  QUAD_LEGACY rhs);
761 void __kmpc_atomic_float16_div_rev(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
762  QUAD_LEGACY rhs);
763 #endif
764 void __kmpc_atomic_cmplx4_sub_rev(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
765  kmp_cmplx32 rhs);
766 void __kmpc_atomic_cmplx4_div_rev(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
767  kmp_cmplx32 rhs);
768 void __kmpc_atomic_cmplx8_sub_rev(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
769  kmp_cmplx64 rhs);
770 void __kmpc_atomic_cmplx8_div_rev(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
771  kmp_cmplx64 rhs);
772 void __kmpc_atomic_cmplx10_sub_rev(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
773  kmp_cmplx80 rhs);
774 void __kmpc_atomic_cmplx10_div_rev(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
775  kmp_cmplx80 rhs);
776 #if KMP_HAVE_QUAD
777 void __kmpc_atomic_cmplx16_sub_rev(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
778  CPLX128_LEG rhs);
779 void __kmpc_atomic_cmplx16_div_rev(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
780  CPLX128_LEG rhs);
781 #if (KMP_ARCH_X86)
782 // Routines with 16-byte arguments aligned to 16-byte boundary
783 void __kmpc_atomic_float16_sub_a16_rev(ident_t *id_ref, int gtid,
784  Quad_a16_t *lhs, Quad_a16_t rhs);
785 void __kmpc_atomic_float16_div_a16_rev(ident_t *id_ref, int gtid,
786  Quad_a16_t *lhs, Quad_a16_t rhs);
787 void __kmpc_atomic_cmplx16_sub_a16_rev(ident_t *id_ref, int gtid,
788  kmp_cmplx128_a16_t *lhs,
789  kmp_cmplx128_a16_t rhs);
790 void __kmpc_atomic_cmplx16_div_a16_rev(ident_t *id_ref, int gtid,
791  kmp_cmplx128_a16_t *lhs,
792  kmp_cmplx128_a16_t rhs);
793 #endif
794 #endif // KMP_HAVE_QUAD
795 
796 #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
797 
798 #endif // OMP_40_ENABLED
799 
800 // routines for mixed types
801 
802 // RHS=float8
803 void __kmpc_atomic_fixed1_mul_float8(ident_t *id_ref, int gtid, char *lhs,
804  kmp_real64 rhs);
805 void __kmpc_atomic_fixed1_div_float8(ident_t *id_ref, int gtid, char *lhs,
806  kmp_real64 rhs);
807 void __kmpc_atomic_fixed2_mul_float8(ident_t *id_ref, int gtid, short *lhs,
808  kmp_real64 rhs);
809 void __kmpc_atomic_fixed2_div_float8(ident_t *id_ref, int gtid, short *lhs,
810  kmp_real64 rhs);
811 void __kmpc_atomic_fixed4_mul_float8(ident_t *id_ref, int gtid, kmp_int32 *lhs,
812  kmp_real64 rhs);
813 void __kmpc_atomic_fixed4_div_float8(ident_t *id_ref, int gtid, kmp_int32 *lhs,
814  kmp_real64 rhs);
815 void __kmpc_atomic_fixed8_mul_float8(ident_t *id_ref, int gtid, kmp_int64 *lhs,
816  kmp_real64 rhs);
817 void __kmpc_atomic_fixed8_div_float8(ident_t *id_ref, int gtid, kmp_int64 *lhs,
818  kmp_real64 rhs);
819 void __kmpc_atomic_float4_add_float8(ident_t *id_ref, int gtid, kmp_real32 *lhs,
820  kmp_real64 rhs);
821 void __kmpc_atomic_float4_sub_float8(ident_t *id_ref, int gtid, kmp_real32 *lhs,
822  kmp_real64 rhs);
823 void __kmpc_atomic_float4_mul_float8(ident_t *id_ref, int gtid, kmp_real32 *lhs,
824  kmp_real64 rhs);
825 void __kmpc_atomic_float4_div_float8(ident_t *id_ref, int gtid, kmp_real32 *lhs,
826  kmp_real64 rhs);
827 
828 // RHS=float16 (deprecated, to be removed when we are sure the compiler does not
829 // use them)
830 #if KMP_HAVE_QUAD
831 void __kmpc_atomic_fixed1_add_fp(ident_t *id_ref, int gtid, char *lhs,
832  _Quad rhs);
833 void __kmpc_atomic_fixed1u_add_fp(ident_t *id_ref, int gtid, unsigned char *lhs,
834  _Quad rhs);
835 void __kmpc_atomic_fixed1_sub_fp(ident_t *id_ref, int gtid, char *lhs,
836  _Quad rhs);
837 void __kmpc_atomic_fixed1u_sub_fp(ident_t *id_ref, int gtid, unsigned char *lhs,
838  _Quad rhs);
839 void __kmpc_atomic_fixed1_mul_fp(ident_t *id_ref, int gtid, char *lhs,
840  _Quad rhs);
841 void __kmpc_atomic_fixed1u_mul_fp(ident_t *id_ref, int gtid, unsigned char *lhs,
842  _Quad rhs);
843 void __kmpc_atomic_fixed1_div_fp(ident_t *id_ref, int gtid, char *lhs,
844  _Quad rhs);
845 void __kmpc_atomic_fixed1u_div_fp(ident_t *id_ref, int gtid, unsigned char *lhs,
846  _Quad rhs);
847 
848 void __kmpc_atomic_fixed2_add_fp(ident_t *id_ref, int gtid, short *lhs,
849  _Quad rhs);
850 void __kmpc_atomic_fixed2u_add_fp(ident_t *id_ref, int gtid,
851  unsigned short *lhs, _Quad rhs);
852 void __kmpc_atomic_fixed2_sub_fp(ident_t *id_ref, int gtid, short *lhs,
853  _Quad rhs);
854 void __kmpc_atomic_fixed2u_sub_fp(ident_t *id_ref, int gtid,
855  unsigned short *lhs, _Quad rhs);
856 void __kmpc_atomic_fixed2_mul_fp(ident_t *id_ref, int gtid, short *lhs,
857  _Quad rhs);
858 void __kmpc_atomic_fixed2u_mul_fp(ident_t *id_ref, int gtid,
859  unsigned short *lhs, _Quad rhs);
860 void __kmpc_atomic_fixed2_div_fp(ident_t *id_ref, int gtid, short *lhs,
861  _Quad rhs);
862 void __kmpc_atomic_fixed2u_div_fp(ident_t *id_ref, int gtid,
863  unsigned short *lhs, _Quad rhs);
864 
865 void __kmpc_atomic_fixed4_add_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
866  _Quad rhs);
867 void __kmpc_atomic_fixed4u_add_fp(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
868  _Quad rhs);
869 void __kmpc_atomic_fixed4_sub_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
870  _Quad rhs);
871 void __kmpc_atomic_fixed4u_sub_fp(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
872  _Quad rhs);
873 void __kmpc_atomic_fixed4_mul_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
874  _Quad rhs);
875 void __kmpc_atomic_fixed4u_mul_fp(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
876  _Quad rhs);
877 void __kmpc_atomic_fixed4_div_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
878  _Quad rhs);
879 void __kmpc_atomic_fixed4u_div_fp(ident_t *id_ref, int gtid, kmp_uint32 *lhs,
880  _Quad rhs);
881 
882 void __kmpc_atomic_fixed8_add_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
883  _Quad rhs);
884 void __kmpc_atomic_fixed8u_add_fp(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
885  _Quad rhs);
886 void __kmpc_atomic_fixed8_sub_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
887  _Quad rhs);
888 void __kmpc_atomic_fixed8u_sub_fp(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
889  _Quad rhs);
890 void __kmpc_atomic_fixed8_mul_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
891  _Quad rhs);
892 void __kmpc_atomic_fixed8u_mul_fp(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
893  _Quad rhs);
894 void __kmpc_atomic_fixed8_div_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
895  _Quad rhs);
896 void __kmpc_atomic_fixed8u_div_fp(ident_t *id_ref, int gtid, kmp_uint64 *lhs,
897  _Quad rhs);
898 
899 void __kmpc_atomic_float4_add_fp(ident_t *id_ref, int gtid, kmp_real32 *lhs,
900  _Quad rhs);
901 void __kmpc_atomic_float4_sub_fp(ident_t *id_ref, int gtid, kmp_real32 *lhs,
902  _Quad rhs);
903 void __kmpc_atomic_float4_mul_fp(ident_t *id_ref, int gtid, kmp_real32 *lhs,
904  _Quad rhs);
905 void __kmpc_atomic_float4_div_fp(ident_t *id_ref, int gtid, kmp_real32 *lhs,
906  _Quad rhs);
907 
908 void __kmpc_atomic_float8_add_fp(ident_t *id_ref, int gtid, kmp_real64 *lhs,
909  _Quad rhs);
910 void __kmpc_atomic_float8_sub_fp(ident_t *id_ref, int gtid, kmp_real64 *lhs,
911  _Quad rhs);
912 void __kmpc_atomic_float8_mul_fp(ident_t *id_ref, int gtid, kmp_real64 *lhs,
913  _Quad rhs);
914 void __kmpc_atomic_float8_div_fp(ident_t *id_ref, int gtid, kmp_real64 *lhs,
915  _Quad rhs);
916 
917 void __kmpc_atomic_float10_add_fp(ident_t *id_ref, int gtid, long double *lhs,
918  _Quad rhs);
919 void __kmpc_atomic_float10_sub_fp(ident_t *id_ref, int gtid, long double *lhs,
920  _Quad rhs);
921 void __kmpc_atomic_float10_mul_fp(ident_t *id_ref, int gtid, long double *lhs,
922  _Quad rhs);
923 void __kmpc_atomic_float10_div_fp(ident_t *id_ref, int gtid, long double *lhs,
924  _Quad rhs);
925 
926 // Reverse operations
927 void __kmpc_atomic_fixed1_sub_rev_fp(ident_t *id_ref, int gtid, char *lhs,
928  _Quad rhs);
929 void __kmpc_atomic_fixed1u_sub_rev_fp(ident_t *id_ref, int gtid,
930  unsigned char *lhs, _Quad rhs);
931 void __kmpc_atomic_fixed1_div_rev_fp(ident_t *id_ref, int gtid, char *lhs,
932  _Quad rhs);
933 void __kmpc_atomic_fixed1u_div_rev_fp(ident_t *id_ref, int gtid,
934  unsigned char *lhs, _Quad rhs);
935 void __kmpc_atomic_fixed2_sub_rev_fp(ident_t *id_ref, int gtid, short *lhs,
936  _Quad rhs);
937 void __kmpc_atomic_fixed2u_sub_rev_fp(ident_t *id_ref, int gtid,
938  unsigned short *lhs, _Quad rhs);
939 void __kmpc_atomic_fixed2_div_rev_fp(ident_t *id_ref, int gtid, short *lhs,
940  _Quad rhs);
941 void __kmpc_atomic_fixed2u_div_rev_fp(ident_t *id_ref, int gtid,
942  unsigned short *lhs, _Quad rhs);
943 void __kmpc_atomic_fixed4_sub_rev_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
944  _Quad rhs);
945 void __kmpc_atomic_fixed4u_sub_rev_fp(ident_t *id_ref, int gtid,
946  kmp_uint32 *lhs, _Quad rhs);
947 void __kmpc_atomic_fixed4_div_rev_fp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
948  _Quad rhs);
949 void __kmpc_atomic_fixed4u_div_rev_fp(ident_t *id_ref, int gtid,
950  kmp_uint32 *lhs, _Quad rhs);
951 void __kmpc_atomic_fixed8_sub_rev_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
952  _Quad rhs);
953 void __kmpc_atomic_fixed8u_sub_rev_fp(ident_t *id_ref, int gtid,
954  kmp_uint64 *lhs, _Quad rhs);
955 void __kmpc_atomic_fixed8_div_rev_fp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
956  _Quad rhs);
957 void __kmpc_atomic_fixed8u_div_rev_fp(ident_t *id_ref, int gtid,
958  kmp_uint64 *lhs, _Quad rhs);
959 void __kmpc_atomic_float4_sub_rev_fp(ident_t *id_ref, int gtid, float *lhs,
960  _Quad rhs);
961 void __kmpc_atomic_float4_div_rev_fp(ident_t *id_ref, int gtid, float *lhs,
962  _Quad rhs);
963 void __kmpc_atomic_float8_sub_rev_fp(ident_t *id_ref, int gtid, double *lhs,
964  _Quad rhs);
965 void __kmpc_atomic_float8_div_rev_fp(ident_t *id_ref, int gtid, double *lhs,
966  _Quad rhs);
967 void __kmpc_atomic_float10_sub_rev_fp(ident_t *id_ref, int gtid,
968  long double *lhs, _Quad rhs);
969 void __kmpc_atomic_float10_div_rev_fp(ident_t *id_ref, int gtid,
970  long double *lhs, _Quad rhs);
971 
972 #endif // KMP_HAVE_QUAD
973 
974 // RHS=cmplx8
975 void __kmpc_atomic_cmplx4_add_cmplx8(ident_t *id_ref, int gtid,
976  kmp_cmplx32 *lhs, kmp_cmplx64 rhs);
977 void __kmpc_atomic_cmplx4_sub_cmplx8(ident_t *id_ref, int gtid,
978  kmp_cmplx32 *lhs, kmp_cmplx64 rhs);
979 void __kmpc_atomic_cmplx4_mul_cmplx8(ident_t *id_ref, int gtid,
980  kmp_cmplx32 *lhs, kmp_cmplx64 rhs);
981 void __kmpc_atomic_cmplx4_div_cmplx8(ident_t *id_ref, int gtid,
982  kmp_cmplx32 *lhs, kmp_cmplx64 rhs);
983 
984 // generic atomic routines
985 void __kmpc_atomic_1(ident_t *id_ref, int gtid, void *lhs, void *rhs,
986  void (*f)(void *, void *, void *));
987 void __kmpc_atomic_2(ident_t *id_ref, int gtid, void *lhs, void *rhs,
988  void (*f)(void *, void *, void *));
989 void __kmpc_atomic_4(ident_t *id_ref, int gtid, void *lhs, void *rhs,
990  void (*f)(void *, void *, void *));
991 void __kmpc_atomic_8(ident_t *id_ref, int gtid, void *lhs, void *rhs,
992  void (*f)(void *, void *, void *));
993 void __kmpc_atomic_10(ident_t *id_ref, int gtid, void *lhs, void *rhs,
994  void (*f)(void *, void *, void *));
995 void __kmpc_atomic_16(ident_t *id_ref, int gtid, void *lhs, void *rhs,
996  void (*f)(void *, void *, void *));
997 void __kmpc_atomic_20(ident_t *id_ref, int gtid, void *lhs, void *rhs,
998  void (*f)(void *, void *, void *));
999 void __kmpc_atomic_32(ident_t *id_ref, int gtid, void *lhs, void *rhs,
1000  void (*f)(void *, void *, void *));
1001 
1002 // READ, WRITE, CAPTURE are supported only on IA-32 architecture and Intel(R) 64
1003 #if KMP_ARCH_X86 || KMP_ARCH_X86_64
1004 
1005 // Below routines for atomic READ are listed
1006 char __kmpc_atomic_fixed1_rd(ident_t *id_ref, int gtid, char *loc);
1007 short __kmpc_atomic_fixed2_rd(ident_t *id_ref, int gtid, short *loc);
1008 kmp_int32 __kmpc_atomic_fixed4_rd(ident_t *id_ref, int gtid, kmp_int32 *loc);
1009 kmp_int64 __kmpc_atomic_fixed8_rd(ident_t *id_ref, int gtid, kmp_int64 *loc);
1010 kmp_real32 __kmpc_atomic_float4_rd(ident_t *id_ref, int gtid, kmp_real32 *loc);
1011 kmp_real64 __kmpc_atomic_float8_rd(ident_t *id_ref, int gtid, kmp_real64 *loc);
1012 long double __kmpc_atomic_float10_rd(ident_t *id_ref, int gtid,
1013  long double *loc);
1014 #if KMP_HAVE_QUAD
1015 QUAD_LEGACY __kmpc_atomic_float16_rd(ident_t *id_ref, int gtid,
1016  QUAD_LEGACY *loc);
1017 #endif
1018 // Fix for CQ220361: cmplx4 READ will return void on Windows* OS; read value
1019 // will be returned through an additional parameter
1020 #if (KMP_OS_WINDOWS)
1021 void __kmpc_atomic_cmplx4_rd(kmp_cmplx32 *out, ident_t *id_ref, int gtid,
1022  kmp_cmplx32 *loc);
1023 #else
1024 kmp_cmplx32 __kmpc_atomic_cmplx4_rd(ident_t *id_ref, int gtid,
1025  kmp_cmplx32 *loc);
1026 #endif
1027 kmp_cmplx64 __kmpc_atomic_cmplx8_rd(ident_t *id_ref, int gtid,
1028  kmp_cmplx64 *loc);
1029 kmp_cmplx80 __kmpc_atomic_cmplx10_rd(ident_t *id_ref, int gtid,
1030  kmp_cmplx80 *loc);
1031 #if KMP_HAVE_QUAD
1032 CPLX128_LEG __kmpc_atomic_cmplx16_rd(ident_t *id_ref, int gtid,
1033  CPLX128_LEG *loc);
1034 #if (KMP_ARCH_X86)
1035 // Routines with 16-byte arguments aligned to 16-byte boundary
1036 Quad_a16_t __kmpc_atomic_float16_a16_rd(ident_t *id_ref, int gtid,
1037  Quad_a16_t *loc);
1038 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_a16_rd(ident_t *id_ref, int gtid,
1039  kmp_cmplx128_a16_t *loc);
1040 #endif
1041 #endif
1042 
1043 // Below routines for atomic WRITE are listed
1044 void __kmpc_atomic_fixed1_wr(ident_t *id_ref, int gtid, char *lhs, char rhs);
1045 void __kmpc_atomic_fixed2_wr(ident_t *id_ref, int gtid, short *lhs, short rhs);
1046 void __kmpc_atomic_fixed4_wr(ident_t *id_ref, int gtid, kmp_int32 *lhs,
1047  kmp_int32 rhs);
1048 void __kmpc_atomic_fixed8_wr(ident_t *id_ref, int gtid, kmp_int64 *lhs,
1049  kmp_int64 rhs);
1050 void __kmpc_atomic_float4_wr(ident_t *id_ref, int gtid, kmp_real32 *lhs,
1051  kmp_real32 rhs);
1052 void __kmpc_atomic_float8_wr(ident_t *id_ref, int gtid, kmp_real64 *lhs,
1053  kmp_real64 rhs);
1054 void __kmpc_atomic_float10_wr(ident_t *id_ref, int gtid, long double *lhs,
1055  long double rhs);
1056 #if KMP_HAVE_QUAD
1057 void __kmpc_atomic_float16_wr(ident_t *id_ref, int gtid, QUAD_LEGACY *lhs,
1058  QUAD_LEGACY rhs);
1059 #endif
1060 void __kmpc_atomic_cmplx4_wr(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1061  kmp_cmplx32 rhs);
1062 void __kmpc_atomic_cmplx8_wr(ident_t *id_ref, int gtid, kmp_cmplx64 *lhs,
1063  kmp_cmplx64 rhs);
1064 void __kmpc_atomic_cmplx10_wr(ident_t *id_ref, int gtid, kmp_cmplx80 *lhs,
1065  kmp_cmplx80 rhs);
1066 #if KMP_HAVE_QUAD
1067 void __kmpc_atomic_cmplx16_wr(ident_t *id_ref, int gtid, CPLX128_LEG *lhs,
1068  CPLX128_LEG rhs);
1069 #if (KMP_ARCH_X86)
1070 // Routines with 16-byte arguments aligned to 16-byte boundary
1071 void __kmpc_atomic_float16_a16_wr(ident_t *id_ref, int gtid, Quad_a16_t *lhs,
1072  Quad_a16_t rhs);
1073 void __kmpc_atomic_cmplx16_a16_wr(ident_t *id_ref, int gtid,
1074  kmp_cmplx128_a16_t *lhs,
1075  kmp_cmplx128_a16_t rhs);
1076 #endif
1077 #endif
1078 
1079 // Below routines for atomic CAPTURE are listed
1080 
1081 // 1-byte
1082 char __kmpc_atomic_fixed1_add_cpt(ident_t *id_ref, int gtid, char *lhs,
1083  char rhs, int flag);
1084 char __kmpc_atomic_fixed1_andb_cpt(ident_t *id_ref, int gtid, char *lhs,
1085  char rhs, int flag);
1086 char __kmpc_atomic_fixed1_div_cpt(ident_t *id_ref, int gtid, char *lhs,
1087  char rhs, int flag);
1088 unsigned char __kmpc_atomic_fixed1u_div_cpt(ident_t *id_ref, int gtid,
1089  unsigned char *lhs,
1090  unsigned char rhs, int flag);
1091 char __kmpc_atomic_fixed1_mul_cpt(ident_t *id_ref, int gtid, char *lhs,
1092  char rhs, int flag);
1093 char __kmpc_atomic_fixed1_orb_cpt(ident_t *id_ref, int gtid, char *lhs,
1094  char rhs, int flag);
1095 char __kmpc_atomic_fixed1_shl_cpt(ident_t *id_ref, int gtid, char *lhs,
1096  char rhs, int flag);
1097 char __kmpc_atomic_fixed1_shr_cpt(ident_t *id_ref, int gtid, char *lhs,
1098  char rhs, int flag);
1099 unsigned char __kmpc_atomic_fixed1u_shr_cpt(ident_t *id_ref, int gtid,
1100  unsigned char *lhs,
1101  unsigned char rhs, int flag);
1102 char __kmpc_atomic_fixed1_sub_cpt(ident_t *id_ref, int gtid, char *lhs,
1103  char rhs, int flag);
1104 char __kmpc_atomic_fixed1_xor_cpt(ident_t *id_ref, int gtid, char *lhs,
1105  char rhs, int flag);
1106 // 2-byte
1107 short __kmpc_atomic_fixed2_add_cpt(ident_t *id_ref, int gtid, short *lhs,
1108  short rhs, int flag);
1109 short __kmpc_atomic_fixed2_andb_cpt(ident_t *id_ref, int gtid, short *lhs,
1110  short rhs, int flag);
1111 short __kmpc_atomic_fixed2_div_cpt(ident_t *id_ref, int gtid, short *lhs,
1112  short rhs, int flag);
1113 unsigned short __kmpc_atomic_fixed2u_div_cpt(ident_t *id_ref, int gtid,
1114  unsigned short *lhs,
1115  unsigned short rhs, int flag);
1116 short __kmpc_atomic_fixed2_mul_cpt(ident_t *id_ref, int gtid, short *lhs,
1117  short rhs, int flag);
1118 short __kmpc_atomic_fixed2_orb_cpt(ident_t *id_ref, int gtid, short *lhs,
1119  short rhs, int flag);
1120 short __kmpc_atomic_fixed2_shl_cpt(ident_t *id_ref, int gtid, short *lhs,
1121  short rhs, int flag);
1122 short __kmpc_atomic_fixed2_shr_cpt(ident_t *id_ref, int gtid, short *lhs,
1123  short rhs, int flag);
1124 unsigned short __kmpc_atomic_fixed2u_shr_cpt(ident_t *id_ref, int gtid,
1125  unsigned short *lhs,
1126  unsigned short rhs, int flag);
1127 short __kmpc_atomic_fixed2_sub_cpt(ident_t *id_ref, int gtid, short *lhs,
1128  short rhs, int flag);
1129 short __kmpc_atomic_fixed2_xor_cpt(ident_t *id_ref, int gtid, short *lhs,
1130  short rhs, int flag);
1131 // 4-byte add / sub fixed
1132 kmp_int32 __kmpc_atomic_fixed4_add_cpt(ident_t *id_ref, int gtid,
1133  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1134 kmp_int32 __kmpc_atomic_fixed4_sub_cpt(ident_t *id_ref, int gtid,
1135  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1136 // 4-byte add / sub float
1137 kmp_real32 __kmpc_atomic_float4_add_cpt(ident_t *id_ref, int gtid,
1138  kmp_real32 *lhs, kmp_real32 rhs,
1139  int flag);
1140 kmp_real32 __kmpc_atomic_float4_sub_cpt(ident_t *id_ref, int gtid,
1141  kmp_real32 *lhs, kmp_real32 rhs,
1142  int flag);
1143 // 8-byte add / sub fixed
1144 kmp_int64 __kmpc_atomic_fixed8_add_cpt(ident_t *id_ref, int gtid,
1145  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1146 kmp_int64 __kmpc_atomic_fixed8_sub_cpt(ident_t *id_ref, int gtid,
1147  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1148 // 8-byte add / sub float
1149 kmp_real64 __kmpc_atomic_float8_add_cpt(ident_t *id_ref, int gtid,
1150  kmp_real64 *lhs, kmp_real64 rhs,
1151  int flag);
1152 kmp_real64 __kmpc_atomic_float8_sub_cpt(ident_t *id_ref, int gtid,
1153  kmp_real64 *lhs, kmp_real64 rhs,
1154  int flag);
1155 // 4-byte fixed
1156 kmp_int32 __kmpc_atomic_fixed4_andb_cpt(ident_t *id_ref, int gtid,
1157  kmp_int32 *lhs, kmp_int32 rhs,
1158  int flag);
1159 kmp_int32 __kmpc_atomic_fixed4_div_cpt(ident_t *id_ref, int gtid,
1160  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1161 kmp_uint32 __kmpc_atomic_fixed4u_div_cpt(ident_t *id_ref, int gtid,
1162  kmp_uint32 *lhs, kmp_uint32 rhs,
1163  int flag);
1164 kmp_int32 __kmpc_atomic_fixed4_mul_cpt(ident_t *id_ref, int gtid,
1165  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1166 kmp_int32 __kmpc_atomic_fixed4_orb_cpt(ident_t *id_ref, int gtid,
1167  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1168 kmp_int32 __kmpc_atomic_fixed4_shl_cpt(ident_t *id_ref, int gtid,
1169  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1170 kmp_int32 __kmpc_atomic_fixed4_shr_cpt(ident_t *id_ref, int gtid,
1171  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1172 kmp_uint32 __kmpc_atomic_fixed4u_shr_cpt(ident_t *id_ref, int gtid,
1173  kmp_uint32 *lhs, kmp_uint32 rhs,
1174  int flag);
1175 kmp_int32 __kmpc_atomic_fixed4_xor_cpt(ident_t *id_ref, int gtid,
1176  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1177 // 8-byte fixed
1178 kmp_int64 __kmpc_atomic_fixed8_andb_cpt(ident_t *id_ref, int gtid,
1179  kmp_int64 *lhs, kmp_int64 rhs,
1180  int flag);
1181 kmp_int64 __kmpc_atomic_fixed8_div_cpt(ident_t *id_ref, int gtid,
1182  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1183 kmp_uint64 __kmpc_atomic_fixed8u_div_cpt(ident_t *id_ref, int gtid,
1184  kmp_uint64 *lhs, kmp_uint64 rhs,
1185  int flag);
1186 kmp_int64 __kmpc_atomic_fixed8_mul_cpt(ident_t *id_ref, int gtid,
1187  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1188 kmp_int64 __kmpc_atomic_fixed8_orb_cpt(ident_t *id_ref, int gtid,
1189  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1190 kmp_int64 __kmpc_atomic_fixed8_shl_cpt(ident_t *id_ref, int gtid,
1191  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1192 kmp_int64 __kmpc_atomic_fixed8_shr_cpt(ident_t *id_ref, int gtid,
1193  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1194 kmp_uint64 __kmpc_atomic_fixed8u_shr_cpt(ident_t *id_ref, int gtid,
1195  kmp_uint64 *lhs, kmp_uint64 rhs,
1196  int flag);
1197 kmp_int64 __kmpc_atomic_fixed8_xor_cpt(ident_t *id_ref, int gtid,
1198  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1199 // 4-byte float
1200 kmp_real32 __kmpc_atomic_float4_div_cpt(ident_t *id_ref, int gtid,
1201  kmp_real32 *lhs, kmp_real32 rhs,
1202  int flag);
1203 kmp_real32 __kmpc_atomic_float4_mul_cpt(ident_t *id_ref, int gtid,
1204  kmp_real32 *lhs, kmp_real32 rhs,
1205  int flag);
1206 // 8-byte float
1207 kmp_real64 __kmpc_atomic_float8_div_cpt(ident_t *id_ref, int gtid,
1208  kmp_real64 *lhs, kmp_real64 rhs,
1209  int flag);
1210 kmp_real64 __kmpc_atomic_float8_mul_cpt(ident_t *id_ref, int gtid,
1211  kmp_real64 *lhs, kmp_real64 rhs,
1212  int flag);
1213 // 1-, 2-, 4-, 8-byte logical (&&, ||)
1214 char __kmpc_atomic_fixed1_andl_cpt(ident_t *id_ref, int gtid, char *lhs,
1215  char rhs, int flag);
1216 char __kmpc_atomic_fixed1_orl_cpt(ident_t *id_ref, int gtid, char *lhs,
1217  char rhs, int flag);
1218 short __kmpc_atomic_fixed2_andl_cpt(ident_t *id_ref, int gtid, short *lhs,
1219  short rhs, int flag);
1220 short __kmpc_atomic_fixed2_orl_cpt(ident_t *id_ref, int gtid, short *lhs,
1221  short rhs, int flag);
1222 kmp_int32 __kmpc_atomic_fixed4_andl_cpt(ident_t *id_ref, int gtid,
1223  kmp_int32 *lhs, kmp_int32 rhs,
1224  int flag);
1225 kmp_int32 __kmpc_atomic_fixed4_orl_cpt(ident_t *id_ref, int gtid,
1226  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1227 kmp_int64 __kmpc_atomic_fixed8_andl_cpt(ident_t *id_ref, int gtid,
1228  kmp_int64 *lhs, kmp_int64 rhs,
1229  int flag);
1230 kmp_int64 __kmpc_atomic_fixed8_orl_cpt(ident_t *id_ref, int gtid,
1231  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1232 // MIN / MAX
1233 char __kmpc_atomic_fixed1_max_cpt(ident_t *id_ref, int gtid, char *lhs,
1234  char rhs, int flag);
1235 char __kmpc_atomic_fixed1_min_cpt(ident_t *id_ref, int gtid, char *lhs,
1236  char rhs, int flag);
1237 short __kmpc_atomic_fixed2_max_cpt(ident_t *id_ref, int gtid, short *lhs,
1238  short rhs, int flag);
1239 short __kmpc_atomic_fixed2_min_cpt(ident_t *id_ref, int gtid, short *lhs,
1240  short rhs, int flag);
1241 kmp_int32 __kmpc_atomic_fixed4_max_cpt(ident_t *id_ref, int gtid,
1242  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1243 kmp_int32 __kmpc_atomic_fixed4_min_cpt(ident_t *id_ref, int gtid,
1244  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1245 kmp_int64 __kmpc_atomic_fixed8_max_cpt(ident_t *id_ref, int gtid,
1246  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1247 kmp_int64 __kmpc_atomic_fixed8_min_cpt(ident_t *id_ref, int gtid,
1248  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1249 kmp_real32 __kmpc_atomic_float4_max_cpt(ident_t *id_ref, int gtid,
1250  kmp_real32 *lhs, kmp_real32 rhs,
1251  int flag);
1252 kmp_real32 __kmpc_atomic_float4_min_cpt(ident_t *id_ref, int gtid,
1253  kmp_real32 *lhs, kmp_real32 rhs,
1254  int flag);
1255 kmp_real64 __kmpc_atomic_float8_max_cpt(ident_t *id_ref, int gtid,
1256  kmp_real64 *lhs, kmp_real64 rhs,
1257  int flag);
1258 kmp_real64 __kmpc_atomic_float8_min_cpt(ident_t *id_ref, int gtid,
1259  kmp_real64 *lhs, kmp_real64 rhs,
1260  int flag);
1261 #if KMP_HAVE_QUAD
1262 QUAD_LEGACY __kmpc_atomic_float16_max_cpt(ident_t *id_ref, int gtid,
1263  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1264  int flag);
1265 QUAD_LEGACY __kmpc_atomic_float16_min_cpt(ident_t *id_ref, int gtid,
1266  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1267  int flag);
1268 #endif
1269 // .NEQV. (same as xor)
1270 char __kmpc_atomic_fixed1_neqv_cpt(ident_t *id_ref, int gtid, char *lhs,
1271  char rhs, int flag);
1272 short __kmpc_atomic_fixed2_neqv_cpt(ident_t *id_ref, int gtid, short *lhs,
1273  short rhs, int flag);
1274 kmp_int32 __kmpc_atomic_fixed4_neqv_cpt(ident_t *id_ref, int gtid,
1275  kmp_int32 *lhs, kmp_int32 rhs,
1276  int flag);
1277 kmp_int64 __kmpc_atomic_fixed8_neqv_cpt(ident_t *id_ref, int gtid,
1278  kmp_int64 *lhs, kmp_int64 rhs,
1279  int flag);
1280 // .EQV. (same as ~xor)
1281 char __kmpc_atomic_fixed1_eqv_cpt(ident_t *id_ref, int gtid, char *lhs,
1282  char rhs, int flag);
1283 short __kmpc_atomic_fixed2_eqv_cpt(ident_t *id_ref, int gtid, short *lhs,
1284  short rhs, int flag);
1285 kmp_int32 __kmpc_atomic_fixed4_eqv_cpt(ident_t *id_ref, int gtid,
1286  kmp_int32 *lhs, kmp_int32 rhs, int flag);
1287 kmp_int64 __kmpc_atomic_fixed8_eqv_cpt(ident_t *id_ref, int gtid,
1288  kmp_int64 *lhs, kmp_int64 rhs, int flag);
1289 // long double type
1290 long double __kmpc_atomic_float10_add_cpt(ident_t *id_ref, int gtid,
1291  long double *lhs, long double rhs,
1292  int flag);
1293 long double __kmpc_atomic_float10_sub_cpt(ident_t *id_ref, int gtid,
1294  long double *lhs, long double rhs,
1295  int flag);
1296 long double __kmpc_atomic_float10_mul_cpt(ident_t *id_ref, int gtid,
1297  long double *lhs, long double rhs,
1298  int flag);
1299 long double __kmpc_atomic_float10_div_cpt(ident_t *id_ref, int gtid,
1300  long double *lhs, long double rhs,
1301  int flag);
1302 #if KMP_HAVE_QUAD
1303 // _Quad type
1304 QUAD_LEGACY __kmpc_atomic_float16_add_cpt(ident_t *id_ref, int gtid,
1305  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1306  int flag);
1307 QUAD_LEGACY __kmpc_atomic_float16_sub_cpt(ident_t *id_ref, int gtid,
1308  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1309  int flag);
1310 QUAD_LEGACY __kmpc_atomic_float16_mul_cpt(ident_t *id_ref, int gtid,
1311  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1312  int flag);
1313 QUAD_LEGACY __kmpc_atomic_float16_div_cpt(ident_t *id_ref, int gtid,
1314  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1315  int flag);
1316 #endif
1317 // routines for complex types
1318 // Workaround for cmplx4 routines - return void; captured value is returned via
1319 // the argument
1320 void __kmpc_atomic_cmplx4_add_cpt(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1321  kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);
1322 void __kmpc_atomic_cmplx4_sub_cpt(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1323  kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);
1324 void __kmpc_atomic_cmplx4_mul_cpt(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1325  kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);
1326 void __kmpc_atomic_cmplx4_div_cpt(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1327  kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);
1328 
1329 kmp_cmplx64 __kmpc_atomic_cmplx8_add_cpt(ident_t *id_ref, int gtid,
1330  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1331  int flag);
1332 kmp_cmplx64 __kmpc_atomic_cmplx8_sub_cpt(ident_t *id_ref, int gtid,
1333  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1334  int flag);
1335 kmp_cmplx64 __kmpc_atomic_cmplx8_mul_cpt(ident_t *id_ref, int gtid,
1336  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1337  int flag);
1338 kmp_cmplx64 __kmpc_atomic_cmplx8_div_cpt(ident_t *id_ref, int gtid,
1339  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1340  int flag);
1341 kmp_cmplx80 __kmpc_atomic_cmplx10_add_cpt(ident_t *id_ref, int gtid,
1342  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1343  int flag);
1344 kmp_cmplx80 __kmpc_atomic_cmplx10_sub_cpt(ident_t *id_ref, int gtid,
1345  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1346  int flag);
1347 kmp_cmplx80 __kmpc_atomic_cmplx10_mul_cpt(ident_t *id_ref, int gtid,
1348  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1349  int flag);
1350 kmp_cmplx80 __kmpc_atomic_cmplx10_div_cpt(ident_t *id_ref, int gtid,
1351  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1352  int flag);
1353 #if KMP_HAVE_QUAD
1354 CPLX128_LEG __kmpc_atomic_cmplx16_add_cpt(ident_t *id_ref, int gtid,
1355  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1356  int flag);
1357 CPLX128_LEG __kmpc_atomic_cmplx16_sub_cpt(ident_t *id_ref, int gtid,
1358  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1359  int flag);
1360 CPLX128_LEG __kmpc_atomic_cmplx16_mul_cpt(ident_t *id_ref, int gtid,
1361  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1362  int flag);
1363 CPLX128_LEG __kmpc_atomic_cmplx16_div_cpt(ident_t *id_ref, int gtid,
1364  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1365  int flag);
1366 #if (KMP_ARCH_X86)
1367 // Routines with 16-byte arguments aligned to 16-byte boundary
1368 Quad_a16_t __kmpc_atomic_float16_add_a16_cpt(ident_t *id_ref, int gtid,
1369  Quad_a16_t *lhs, Quad_a16_t rhs,
1370  int flag);
1371 Quad_a16_t __kmpc_atomic_float16_sub_a16_cpt(ident_t *id_ref, int gtid,
1372  Quad_a16_t *lhs, Quad_a16_t rhs,
1373  int flag);
1374 Quad_a16_t __kmpc_atomic_float16_mul_a16_cpt(ident_t *id_ref, int gtid,
1375  Quad_a16_t *lhs, Quad_a16_t rhs,
1376  int flag);
1377 Quad_a16_t __kmpc_atomic_float16_div_a16_cpt(ident_t *id_ref, int gtid,
1378  Quad_a16_t *lhs, Quad_a16_t rhs,
1379  int flag);
1380 Quad_a16_t __kmpc_atomic_float16_max_a16_cpt(ident_t *id_ref, int gtid,
1381  Quad_a16_t *lhs, Quad_a16_t rhs,
1382  int flag);
1383 Quad_a16_t __kmpc_atomic_float16_min_a16_cpt(ident_t *id_ref, int gtid,
1384  Quad_a16_t *lhs, Quad_a16_t rhs,
1385  int flag);
1386 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_add_a16_cpt(ident_t *id_ref, int gtid,
1387  kmp_cmplx128_a16_t *lhs,
1388  kmp_cmplx128_a16_t rhs,
1389  int flag);
1390 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_sub_a16_cpt(ident_t *id_ref, int gtid,
1391  kmp_cmplx128_a16_t *lhs,
1392  kmp_cmplx128_a16_t rhs,
1393  int flag);
1394 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_mul_a16_cpt(ident_t *id_ref, int gtid,
1395  kmp_cmplx128_a16_t *lhs,
1396  kmp_cmplx128_a16_t rhs,
1397  int flag);
1398 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_div_a16_cpt(ident_t *id_ref, int gtid,
1399  kmp_cmplx128_a16_t *lhs,
1400  kmp_cmplx128_a16_t rhs,
1401  int flag);
1402 #endif
1403 #endif
1404 
1405 void __kmpc_atomic_start(void);
1406 void __kmpc_atomic_end(void);
1407 
1408 #if OMP_40_ENABLED
1409 
1410 // OpenMP 4.0: v = x = expr binop x; { v = x; x = expr binop x; } { x = expr
1411 // binop x; v = x; } for non-commutative operations.
1412 
1413 char __kmpc_atomic_fixed1_sub_cpt_rev(ident_t *id_ref, int gtid, char *lhs,
1414  char rhs, int flag);
1415 char __kmpc_atomic_fixed1_div_cpt_rev(ident_t *id_ref, int gtid, char *lhs,
1416  char rhs, int flag);
1417 unsigned char __kmpc_atomic_fixed1u_div_cpt_rev(ident_t *id_ref, int gtid,
1418  unsigned char *lhs,
1419  unsigned char rhs, int flag);
1420 char __kmpc_atomic_fixed1_shl_cpt_rev(ident_t *id_ref, int gtid, char *lhs,
1421  char rhs, int flag);
1422 char __kmpc_atomic_fixed1_shr_cpt_rev(ident_t *id_ref, int gtid, char *lhs,
1423  char rhs, int flag);
1424 unsigned char __kmpc_atomic_fixed1u_shr_cpt_rev(ident_t *id_ref, int gtid,
1425  unsigned char *lhs,
1426  unsigned char rhs, int flag);
1427 short __kmpc_atomic_fixed2_sub_cpt_rev(ident_t *id_ref, int gtid, short *lhs,
1428  short rhs, int flag);
1429 short __kmpc_atomic_fixed2_div_cpt_rev(ident_t *id_ref, int gtid, short *lhs,
1430  short rhs, int flag);
1431 unsigned short __kmpc_atomic_fixed2u_div_cpt_rev(ident_t *id_ref, int gtid,
1432  unsigned short *lhs,
1433  unsigned short rhs, int flag);
1434 short __kmpc_atomic_fixed2_shl_cpt_rev(ident_t *id_ref, int gtid, short *lhs,
1435  short rhs, int flag);
1436 short __kmpc_atomic_fixed2_shr_cpt_rev(ident_t *id_ref, int gtid, short *lhs,
1437  short rhs, int flag);
1438 unsigned short __kmpc_atomic_fixed2u_shr_cpt_rev(ident_t *id_ref, int gtid,
1439  unsigned short *lhs,
1440  unsigned short rhs, int flag);
1441 kmp_int32 __kmpc_atomic_fixed4_sub_cpt_rev(ident_t *id_ref, int gtid,
1442  kmp_int32 *lhs, kmp_int32 rhs,
1443  int flag);
1444 kmp_int32 __kmpc_atomic_fixed4_div_cpt_rev(ident_t *id_ref, int gtid,
1445  kmp_int32 *lhs, kmp_int32 rhs,
1446  int flag);
1447 kmp_uint32 __kmpc_atomic_fixed4u_div_cpt_rev(ident_t *id_ref, int gtid,
1448  kmp_uint32 *lhs, kmp_uint32 rhs,
1449  int flag);
1450 kmp_int32 __kmpc_atomic_fixed4_shl_cpt_rev(ident_t *id_ref, int gtid,
1451  kmp_int32 *lhs, kmp_int32 rhs,
1452  int flag);
1453 kmp_int32 __kmpc_atomic_fixed4_shr_cpt_rev(ident_t *id_ref, int gtid,
1454  kmp_int32 *lhs, kmp_int32 rhs,
1455  int flag);
1456 kmp_uint32 __kmpc_atomic_fixed4u_shr_cpt_rev(ident_t *id_ref, int gtid,
1457  kmp_uint32 *lhs, kmp_uint32 rhs,
1458  int flag);
1459 kmp_int64 __kmpc_atomic_fixed8_sub_cpt_rev(ident_t *id_ref, int gtid,
1460  kmp_int64 *lhs, kmp_int64 rhs,
1461  int flag);
1462 kmp_int64 __kmpc_atomic_fixed8_div_cpt_rev(ident_t *id_ref, int gtid,
1463  kmp_int64 *lhs, kmp_int64 rhs,
1464  int flag);
1465 kmp_uint64 __kmpc_atomic_fixed8u_div_cpt_rev(ident_t *id_ref, int gtid,
1466  kmp_uint64 *lhs, kmp_uint64 rhs,
1467  int flag);
1468 kmp_int64 __kmpc_atomic_fixed8_shl_cpt_rev(ident_t *id_ref, int gtid,
1469  kmp_int64 *lhs, kmp_int64 rhs,
1470  int flag);
1471 kmp_int64 __kmpc_atomic_fixed8_shr_cpt_rev(ident_t *id_ref, int gtid,
1472  kmp_int64 *lhs, kmp_int64 rhs,
1473  int flag);
1474 kmp_uint64 __kmpc_atomic_fixed8u_shr_cpt_rev(ident_t *id_ref, int gtid,
1475  kmp_uint64 *lhs, kmp_uint64 rhs,
1476  int flag);
1477 float __kmpc_atomic_float4_sub_cpt_rev(ident_t *id_ref, int gtid, float *lhs,
1478  float rhs, int flag);
1479 float __kmpc_atomic_float4_div_cpt_rev(ident_t *id_ref, int gtid, float *lhs,
1480  float rhs, int flag);
1481 double __kmpc_atomic_float8_sub_cpt_rev(ident_t *id_ref, int gtid, double *lhs,
1482  double rhs, int flag);
1483 double __kmpc_atomic_float8_div_cpt_rev(ident_t *id_ref, int gtid, double *lhs,
1484  double rhs, int flag);
1485 long double __kmpc_atomic_float10_sub_cpt_rev(ident_t *id_ref, int gtid,
1486  long double *lhs, long double rhs,
1487  int flag);
1488 long double __kmpc_atomic_float10_div_cpt_rev(ident_t *id_ref, int gtid,
1489  long double *lhs, long double rhs,
1490  int flag);
1491 #if KMP_HAVE_QUAD
1492 QUAD_LEGACY __kmpc_atomic_float16_sub_cpt_rev(ident_t *id_ref, int gtid,
1493  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1494  int flag);
1495 QUAD_LEGACY __kmpc_atomic_float16_div_cpt_rev(ident_t *id_ref, int gtid,
1496  QUAD_LEGACY *lhs, QUAD_LEGACY rhs,
1497  int flag);
1498 #endif
1499 // Workaround for cmplx4 routines - return void; captured value is returned via
1500 // the argument
1501 void __kmpc_atomic_cmplx4_sub_cpt_rev(ident_t *id_ref, int gtid,
1502  kmp_cmplx32 *lhs, kmp_cmplx32 rhs,
1503  kmp_cmplx32 *out, int flag);
1504 void __kmpc_atomic_cmplx4_div_cpt_rev(ident_t *id_ref, int gtid,
1505  kmp_cmplx32 *lhs, kmp_cmplx32 rhs,
1506  kmp_cmplx32 *out, int flag);
1507 kmp_cmplx64 __kmpc_atomic_cmplx8_sub_cpt_rev(ident_t *id_ref, int gtid,
1508  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1509  int flag);
1510 kmp_cmplx64 __kmpc_atomic_cmplx8_div_cpt_rev(ident_t *id_ref, int gtid,
1511  kmp_cmplx64 *lhs, kmp_cmplx64 rhs,
1512  int flag);
1513 kmp_cmplx80 __kmpc_atomic_cmplx10_sub_cpt_rev(ident_t *id_ref, int gtid,
1514  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1515  int flag);
1516 kmp_cmplx80 __kmpc_atomic_cmplx10_div_cpt_rev(ident_t *id_ref, int gtid,
1517  kmp_cmplx80 *lhs, kmp_cmplx80 rhs,
1518  int flag);
1519 #if KMP_HAVE_QUAD
1520 CPLX128_LEG __kmpc_atomic_cmplx16_sub_cpt_rev(ident_t *id_ref, int gtid,
1521  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1522  int flag);
1523 CPLX128_LEG __kmpc_atomic_cmplx16_div_cpt_rev(ident_t *id_ref, int gtid,
1524  CPLX128_LEG *lhs, CPLX128_LEG rhs,
1525  int flag);
1526 #if (KMP_ARCH_X86)
1527 Quad_a16_t __kmpc_atomic_float16_sub_a16_cpt_rev(ident_t *id_ref, int gtid,
1528  Quad_a16_t *lhs,
1529  Quad_a16_t rhs, int flag);
1530 Quad_a16_t __kmpc_atomic_float16_div_a16_cpt_rev(ident_t *id_ref, int gtid,
1531  Quad_a16_t *lhs,
1532  Quad_a16_t rhs, int flag);
1533 kmp_cmplx128_a16_t
1534 __kmpc_atomic_cmplx16_sub_a16_cpt_rev(ident_t *id_ref, int gtid,
1535  kmp_cmplx128_a16_t *lhs,
1536  kmp_cmplx128_a16_t rhs, int flag);
1537 kmp_cmplx128_a16_t
1538 __kmpc_atomic_cmplx16_div_a16_cpt_rev(ident_t *id_ref, int gtid,
1539  kmp_cmplx128_a16_t *lhs,
1540  kmp_cmplx128_a16_t rhs, int flag);
1541 #endif
1542 #endif
1543 
1544 // OpenMP 4.0 Capture-write (swap): {v = x; x = expr;}
1545 char __kmpc_atomic_fixed1_swp(ident_t *id_ref, int gtid, char *lhs, char rhs);
1546 short __kmpc_atomic_fixed2_swp(ident_t *id_ref, int gtid, short *lhs,
1547  short rhs);
1548 kmp_int32 __kmpc_atomic_fixed4_swp(ident_t *id_ref, int gtid, kmp_int32 *lhs,
1549  kmp_int32 rhs);
1550 kmp_int64 __kmpc_atomic_fixed8_swp(ident_t *id_ref, int gtid, kmp_int64 *lhs,
1551  kmp_int64 rhs);
1552 float __kmpc_atomic_float4_swp(ident_t *id_ref, int gtid, float *lhs,
1553  float rhs);
1554 double __kmpc_atomic_float8_swp(ident_t *id_ref, int gtid, double *lhs,
1555  double rhs);
1556 long double __kmpc_atomic_float10_swp(ident_t *id_ref, int gtid,
1557  long double *lhs, long double rhs);
1558 #if KMP_HAVE_QUAD
1559 QUAD_LEGACY __kmpc_atomic_float16_swp(ident_t *id_ref, int gtid,
1560  QUAD_LEGACY *lhs, QUAD_LEGACY rhs);
1561 #endif
1562 // !!! TODO: check if we need a workaround here
1563 void __kmpc_atomic_cmplx4_swp(ident_t *id_ref, int gtid, kmp_cmplx32 *lhs,
1564  kmp_cmplx32 rhs, kmp_cmplx32 *out);
1565 // kmp_cmplx32 __kmpc_atomic_cmplx4_swp( ident_t *id_ref, int gtid,
1566 // kmp_cmplx32 * lhs, kmp_cmplx32 rhs );
1567 
1568 kmp_cmplx64 __kmpc_atomic_cmplx8_swp(ident_t *id_ref, int gtid,
1569  kmp_cmplx64 *lhs, kmp_cmplx64 rhs);
1570 kmp_cmplx80 __kmpc_atomic_cmplx10_swp(ident_t *id_ref, int gtid,
1571  kmp_cmplx80 *lhs, kmp_cmplx80 rhs);
1572 #if KMP_HAVE_QUAD
1573 CPLX128_LEG __kmpc_atomic_cmplx16_swp(ident_t *id_ref, int gtid,
1574  CPLX128_LEG *lhs, CPLX128_LEG rhs);
1575 #if (KMP_ARCH_X86)
1576 Quad_a16_t __kmpc_atomic_float16_a16_swp(ident_t *id_ref, int gtid,
1577  Quad_a16_t *lhs, Quad_a16_t rhs);
1578 kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_a16_swp(ident_t *id_ref, int gtid,
1579  kmp_cmplx128_a16_t *lhs,
1580  kmp_cmplx128_a16_t rhs);
1581 #endif
1582 #endif
1583 
1584 // Capture routines for mixed types (RHS=float16)
1585 #if KMP_HAVE_QUAD
1586 
1587 char __kmpc_atomic_fixed1_add_cpt_fp(ident_t *id_ref, int gtid, char *lhs,
1588  _Quad rhs, int flag);
1589 char __kmpc_atomic_fixed1_sub_cpt_fp(ident_t *id_ref, int gtid, char *lhs,
1590  _Quad rhs, int flag);
1591 char __kmpc_atomic_fixed1_mul_cpt_fp(ident_t *id_ref, int gtid, char *lhs,
1592  _Quad rhs, int flag);
1593 char __kmpc_atomic_fixed1_div_cpt_fp(ident_t *id_ref, int gtid, char *lhs,
1594  _Quad rhs, int flag);
1595 unsigned char __kmpc_atomic_fixed1u_add_cpt_fp(ident_t *id_ref, int gtid,
1596  unsigned char *lhs, _Quad rhs,
1597  int flag);
1598 unsigned char __kmpc_atomic_fixed1u_sub_cpt_fp(ident_t *id_ref, int gtid,
1599  unsigned char *lhs, _Quad rhs,
1600  int flag);
1601 unsigned char __kmpc_atomic_fixed1u_mul_cpt_fp(ident_t *id_ref, int gtid,
1602  unsigned char *lhs, _Quad rhs,
1603  int flag);
1604 unsigned char __kmpc_atomic_fixed1u_div_cpt_fp(ident_t *id_ref, int gtid,
1605  unsigned char *lhs, _Quad rhs,
1606  int flag);
1607 
1608 short __kmpc_atomic_fixed2_add_cpt_fp(ident_t *id_ref, int gtid, short *lhs,
1609  _Quad rhs, int flag);
1610 short __kmpc_atomic_fixed2_sub_cpt_fp(ident_t *id_ref, int gtid, short *lhs,
1611  _Quad rhs, int flag);
1612 short __kmpc_atomic_fixed2_mul_cpt_fp(ident_t *id_ref, int gtid, short *lhs,
1613  _Quad rhs, int flag);
1614 short __kmpc_atomic_fixed2_div_cpt_fp(ident_t *id_ref, int gtid, short *lhs,
1615  _Quad rhs, int flag);
1616 unsigned short __kmpc_atomic_fixed2u_add_cpt_fp(ident_t *id_ref, int gtid,
1617  unsigned short *lhs, _Quad rhs,
1618  int flag);
1619 unsigned short __kmpc_atomic_fixed2u_sub_cpt_fp(ident_t *id_ref, int gtid,
1620  unsigned short *lhs, _Quad rhs,
1621  int flag);
1622 unsigned short __kmpc_atomic_fixed2u_mul_cpt_fp(ident_t *id_ref, int gtid,
1623  unsigned short *lhs, _Quad rhs,
1624  int flag);
1625 unsigned short __kmpc_atomic_fixed2u_div_cpt_fp(ident_t *id_ref, int gtid,
1626  unsigned short *lhs, _Quad rhs,
1627  int flag);
1628 
1629 kmp_int32 __kmpc_atomic_fixed4_add_cpt_fp(ident_t *id_ref, int gtid,
1630  kmp_int32 *lhs, _Quad rhs, int flag);
1631 kmp_int32 __kmpc_atomic_fixed4_sub_cpt_fp(ident_t *id_ref, int gtid,
1632  kmp_int32 *lhs, _Quad rhs, int flag);
1633 kmp_int32 __kmpc_atomic_fixed4_mul_cpt_fp(ident_t *id_ref, int gtid,
1634  kmp_int32 *lhs, _Quad rhs, int flag);
1635 kmp_int32 __kmpc_atomic_fixed4_div_cpt_fp(ident_t *id_ref, int gtid,
1636  kmp_int32 *lhs, _Quad rhs, int flag);
1637 kmp_uint32 __kmpc_atomic_fixed4u_add_cpt_fp(ident_t *id_ref, int gtid,
1638  kmp_uint32 *lhs, _Quad rhs,
1639  int flag);
1640 kmp_uint32 __kmpc_atomic_fixed4u_sub_cpt_fp(ident_t *id_ref, int gtid,
1641  kmp_uint32 *lhs, _Quad rhs,
1642  int flag);
1643 kmp_uint32 __kmpc_atomic_fixed4u_mul_cpt_fp(ident_t *id_ref, int gtid,
1644  kmp_uint32 *lhs, _Quad rhs,
1645  int flag);
1646 kmp_uint32 __kmpc_atomic_fixed4u_div_cpt_fp(ident_t *id_ref, int gtid,
1647  kmp_uint32 *lhs, _Quad rhs,
1648  int flag);
1649 
1650 kmp_int64 __kmpc_atomic_fixed8_add_cpt_fp(ident_t *id_ref, int gtid,
1651  kmp_int64 *lhs, _Quad rhs, int flag);
1652 kmp_int64 __kmpc_atomic_fixed8_sub_cpt_fp(ident_t *id_ref, int gtid,
1653  kmp_int64 *lhs, _Quad rhs, int flag);
1654 kmp_int64 __kmpc_atomic_fixed8_mul_cpt_fp(ident_t *id_ref, int gtid,
1655  kmp_int64 *lhs, _Quad rhs, int flag);
1656 kmp_int64 __kmpc_atomic_fixed8_div_cpt_fp(ident_t *id_ref, int gtid,
1657  kmp_int64 *lhs, _Quad rhs, int flag);
1658 kmp_uint64 __kmpc_atomic_fixed8u_add_cpt_fp(ident_t *id_ref, int gtid,
1659  kmp_uint64 *lhs, _Quad rhs,
1660  int flag);
1661 kmp_uint64 __kmpc_atomic_fixed8u_sub_cpt_fp(ident_t *id_ref, int gtid,
1662  kmp_uint64 *lhs, _Quad rhs,
1663  int flag);
1664 kmp_uint64 __kmpc_atomic_fixed8u_mul_cpt_fp(ident_t *id_ref, int gtid,
1665  kmp_uint64 *lhs, _Quad rhs,
1666  int flag);
1667 kmp_uint64 __kmpc_atomic_fixed8u_div_cpt_fp(ident_t *id_ref, int gtid,
1668  kmp_uint64 *lhs, _Quad rhs,
1669  int flag);
1670 
1671 float __kmpc_atomic_float4_add_cpt_fp(ident_t *id_ref, int gtid,
1672  kmp_real32 *lhs, _Quad rhs, int flag);
1673 float __kmpc_atomic_float4_sub_cpt_fp(ident_t *id_ref, int gtid,
1674  kmp_real32 *lhs, _Quad rhs, int flag);
1675 float __kmpc_atomic_float4_mul_cpt_fp(ident_t *id_ref, int gtid,
1676  kmp_real32 *lhs, _Quad rhs, int flag);
1677 float __kmpc_atomic_float4_div_cpt_fp(ident_t *id_ref, int gtid,
1678  kmp_real32 *lhs, _Quad rhs, int flag);
1679 
1680 double __kmpc_atomic_float8_add_cpt_fp(ident_t *id_ref, int gtid,
1681  kmp_real64 *lhs, _Quad rhs, int flag);
1682 double __kmpc_atomic_float8_sub_cpt_fp(ident_t *id_ref, int gtid,
1683  kmp_real64 *lhs, _Quad rhs, int flag);
1684 double __kmpc_atomic_float8_mul_cpt_fp(ident_t *id_ref, int gtid,
1685  kmp_real64 *lhs, _Quad rhs, int flag);
1686 double __kmpc_atomic_float8_div_cpt_fp(ident_t *id_ref, int gtid,
1687  kmp_real64 *lhs, _Quad rhs, int flag);
1688 
1689 long double __kmpc_atomic_float10_add_cpt_fp(ident_t *id_ref, int gtid,
1690  long double *lhs, _Quad rhs,
1691  int flag);
1692 long double __kmpc_atomic_float10_sub_cpt_fp(ident_t *id_ref, int gtid,
1693  long double *lhs, _Quad rhs,
1694  int flag);
1695 long double __kmpc_atomic_float10_mul_cpt_fp(ident_t *id_ref, int gtid,
1696  long double *lhs, _Quad rhs,
1697  int flag);
1698 long double __kmpc_atomic_float10_div_cpt_fp(ident_t *id_ref, int gtid,
1699  long double *lhs, _Quad rhs,
1700  int flag);
1701 
1702 char __kmpc_atomic_fixed1_sub_cpt_rev_fp(ident_t *id_ref, int gtid, char *lhs,
1703  _Quad rhs, int flag);
1704 unsigned char __kmpc_atomic_fixed1u_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1705  unsigned char *lhs,
1706  _Quad rhs, int flag);
1707 char __kmpc_atomic_fixed1_div_cpt_rev_fp(ident_t *id_ref, int gtid, char *lhs,
1708  _Quad rhs, int flag);
1709 unsigned char __kmpc_atomic_fixed1u_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1710  unsigned char *lhs,
1711  _Quad rhs, int flag);
1712 short __kmpc_atomic_fixed2_sub_cpt_rev_fp(ident_t *id_ref, int gtid, short *lhs,
1713  _Quad rhs, int flag);
1714 unsigned short __kmpc_atomic_fixed2u_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1715  unsigned short *lhs,
1716  _Quad rhs, int flag);
1717 short __kmpc_atomic_fixed2_div_cpt_rev_fp(ident_t *id_ref, int gtid, short *lhs,
1718  _Quad rhs, int flag);
1719 unsigned short __kmpc_atomic_fixed2u_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1720  unsigned short *lhs,
1721  _Quad rhs, int flag);
1722 kmp_int32 __kmpc_atomic_fixed4_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1723  kmp_int32 *lhs, _Quad rhs,
1724  int flag);
1725 kmp_uint32 __kmpc_atomic_fixed4u_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1726  kmp_uint32 *lhs, _Quad rhs,
1727  int flag);
1728 kmp_int32 __kmpc_atomic_fixed4_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1729  kmp_int32 *lhs, _Quad rhs,
1730  int flag);
1731 kmp_uint32 __kmpc_atomic_fixed4u_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1732  kmp_uint32 *lhs, _Quad rhs,
1733  int flag);
1734 kmp_int64 __kmpc_atomic_fixed8_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1735  kmp_int64 *lhs, _Quad rhs,
1736  int flag);
1737 kmp_uint64 __kmpc_atomic_fixed8u_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1738  kmp_uint64 *lhs, _Quad rhs,
1739  int flag);
1740 kmp_int64 __kmpc_atomic_fixed8_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1741  kmp_int64 *lhs, _Quad rhs,
1742  int flag);
1743 kmp_uint64 __kmpc_atomic_fixed8u_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1744  kmp_uint64 *lhs, _Quad rhs,
1745  int flag);
1746 float __kmpc_atomic_float4_sub_cpt_rev_fp(ident_t *id_ref, int gtid, float *lhs,
1747  _Quad rhs, int flag);
1748 float __kmpc_atomic_float4_div_cpt_rev_fp(ident_t *id_ref, int gtid, float *lhs,
1749  _Quad rhs, int flag);
1750 double __kmpc_atomic_float8_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1751  double *lhs, _Quad rhs, int flag);
1752 double __kmpc_atomic_float8_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1753  double *lhs, _Quad rhs, int flag);
1754 long double __kmpc_atomic_float10_sub_cpt_rev_fp(ident_t *id_ref, int gtid,
1755  long double *lhs, _Quad rhs,
1756  int flag);
1757 long double __kmpc_atomic_float10_div_cpt_rev_fp(ident_t *id_ref, int gtid,
1758  long double *lhs, _Quad rhs,
1759  int flag);
1760 
1761 #endif // KMP_HAVE_QUAD
1762 
1763 // End of OpenMP 4.0 capture
1764 
1765 #endif // OMP_40_ENABLED
1766 
1767 #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
1768 
1769 /* ------------------------------------------------------------------------ */
1770 
1771 #ifdef __cplusplus
1772 } // extern "C"
1773 #endif
1774 
1775 #endif /* KMP_ATOMIC_H */
1776 
1777 // end of file
Definition: kmp.h:208