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