xref: /netbsd-src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/omp.h (revision b6fd2da273dc4ead8893467a6fb7e008524b75f3)
1 /* This file is automatically generated.  DO NOT EDIT! */
2 /* Generated from: NetBSD: mknative-gcc,v 1.117 2023/07/31 01:48:37 mrg Exp  */
3 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4 
5 /* Copyright (C) 2005-2022 Free Software Foundation, Inc.
6    Contributed by Richard Henderson <rth@redhat.com>.
7 
8    This file is part of the GNU Offloading and Multi Processing Library
9    (libgomp).
10 
11    Libgomp is free software; you can redistribute it and/or modify it
12    under the terms of the GNU General Public License as published by
13    the Free Software Foundation; either version 3, or (at your option)
14    any later version.
15 
16    Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
17    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18    FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19    more details.
20 
21    Under Section 7 of GPL version 3, you are granted additional
22    permissions described in the GCC Runtime Library Exception, version
23    3.1, as published by the Free Software Foundation.
24 
25    You should have received a copy of the GNU General Public License and
26    a copy of the GCC Runtime Library Exception along with this program;
27    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
28    <http://www.gnu.org/licenses/>.  */
29 
30 #ifndef _OMP_H
31 #define _OMP_H 1
32 
33 #if defined(__GNUC__) && _OPENMP >= 201811
34 # define __GOMP_DEPRECATED_5_0 __attribute__((__deprecated__))
35 #else
36 # define __GOMP_DEPRECATED_5_0
37 #endif
38 
39 #if defined(__GNUC__) && _OPENMP >= 202011
40 # define __GOMP_DEPRECATED_5_1 __attribute__((__deprecated__))
41 #else
42 # define __GOMP_DEPRECATED_5_1
43 #endif
44 
45 #ifndef _LIBGOMP_OMP_LOCK_DEFINED
46 #define _LIBGOMP_OMP_LOCK_DEFINED 1
47 /* These two structures get edited by the libgomp build process to
48    reflect the shape of the two types.  Their internals are private
49    to the library.  */
50 
51 typedef struct
52 {
53   unsigned char _x[8]
54     __attribute__((__aligned__(8)));
55 } omp_lock_t;
56 
57 typedef struct
58 {
59   unsigned char _x[24]
60     __attribute__((__aligned__(8)));
61 } omp_nest_lock_t;
62 #endif
63 
64 typedef enum omp_sched_t
65 {
66   omp_sched_static = 1,
67   omp_sched_dynamic = 2,
68   omp_sched_guided = 3,
69   omp_sched_auto = 4,
70   omp_sched_monotonic = 0x80000000U
71 } omp_sched_t;
72 
73 typedef enum omp_proc_bind_t
74 {
75   omp_proc_bind_false = 0,
76   omp_proc_bind_true = 1,
77   omp_proc_bind_primary = 2,
78   omp_proc_bind_master __GOMP_DEPRECATED_5_1
79     = omp_proc_bind_primary,
80   omp_proc_bind_close = 3,
81   omp_proc_bind_spread = 4
82 } omp_proc_bind_t;
83 
84 typedef enum omp_sync_hint_t
85 {
86   omp_sync_hint_none = 0,
87   omp_lock_hint_none __GOMP_DEPRECATED_5_0 = omp_sync_hint_none,
88   omp_sync_hint_uncontended = 1,
89   omp_lock_hint_uncontended __GOMP_DEPRECATED_5_0 = omp_sync_hint_uncontended,
90   omp_sync_hint_contended = 2,
91   omp_lock_hint_contended __GOMP_DEPRECATED_5_0 = omp_sync_hint_contended,
92   omp_sync_hint_nonspeculative = 4,
93   omp_lock_hint_nonspeculative __GOMP_DEPRECATED_5_0
94     = omp_sync_hint_nonspeculative,
95   omp_sync_hint_speculative = 8,
96   omp_lock_hint_speculative __GOMP_DEPRECATED_5_0 = omp_sync_hint_speculative
97 } omp_sync_hint_t;
98 
99 typedef __GOMP_DEPRECATED_5_0 omp_sync_hint_t omp_lock_hint_t;
100 
101 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t
102 {
103   char __omp_depend_t__[2 * sizeof (void *)];
104 } omp_depend_t;
105 
106 typedef enum omp_pause_resource_t
107 {
108   omp_pause_soft = 1,
109   omp_pause_hard = 2
110 } omp_pause_resource_t;
111 
112 typedef __UINTPTR_TYPE__ omp_uintptr_t;
113 
114 #if __cplusplus >= 201103L
115 # define __GOMP_UINTPTR_T_ENUM : omp_uintptr_t
116 #else
117 # define __GOMP_UINTPTR_T_ENUM
118 #endif
119 
120 typedef enum omp_memspace_handle_t __GOMP_UINTPTR_T_ENUM
121 {
122   omp_default_mem_space = 0,
123   omp_large_cap_mem_space = 1,
124   omp_const_mem_space = 2,
125   omp_high_bw_mem_space = 3,
126   omp_low_lat_mem_space = 4,
127   __omp_memspace_handle_t_max__ = __UINTPTR_MAX__
128 } omp_memspace_handle_t;
129 
130 typedef enum omp_allocator_handle_t __GOMP_UINTPTR_T_ENUM
131 {
132   omp_null_allocator = 0,
133   omp_default_mem_alloc = 1,
134   omp_large_cap_mem_alloc = 2,
135   omp_const_mem_alloc = 3,
136   omp_high_bw_mem_alloc = 4,
137   omp_low_lat_mem_alloc = 5,
138   omp_cgroup_mem_alloc = 6,
139   omp_pteam_mem_alloc = 7,
140   omp_thread_mem_alloc = 8,
141   __omp_allocator_handle_t_max__ = __UINTPTR_MAX__
142 } omp_allocator_handle_t;
143 
144 typedef enum omp_alloctrait_key_t
145 {
146   omp_atk_sync_hint = 1,
147   omp_atk_alignment = 2,
148   omp_atk_access = 3,
149   omp_atk_pool_size = 4,
150   omp_atk_fallback = 5,
151   omp_atk_fb_data = 6,
152   omp_atk_pinned = 7,
153   omp_atk_partition = 8
154 } omp_alloctrait_key_t;
155 
156 typedef enum omp_alloctrait_value_t
157 {
158   omp_atv_default = (__UINTPTR_TYPE__) -1,
159   omp_atv_false = 0,
160   omp_atv_true = 1,
161   omp_atv_contended = 3,
162   omp_atv_uncontended = 4,
163   omp_atv_serialized = 5,
164   omp_atv_sequential __GOMP_DEPRECATED_5_1 = omp_atv_serialized,
165   omp_atv_private = 6,
166   omp_atv_all = 7,
167   omp_atv_thread = 8,
168   omp_atv_pteam = 9,
169   omp_atv_cgroup = 10,
170   omp_atv_default_mem_fb = 11,
171   omp_atv_null_fb = 12,
172   omp_atv_abort_fb = 13,
173   omp_atv_allocator_fb = 14,
174   omp_atv_environment = 15,
175   omp_atv_nearest = 16,
176   omp_atv_blocked = 17,
177   omp_atv_interleaved = 18
178 } omp_alloctrait_value_t;
179 
180 typedef struct omp_alloctrait_t
181 {
182   omp_alloctrait_key_t key;
183   omp_uintptr_t value;
184 } omp_alloctrait_t;
185 
186 typedef enum omp_event_handle_t __GOMP_UINTPTR_T_ENUM
187 {
188   __omp_event_handle_t_max__ = __UINTPTR_MAX__
189 } omp_event_handle_t;
190 
191 #ifdef __cplusplus
192 extern "C" {
193 # define __GOMP_NOTHROW throw ()
194 # define __GOMP_DEFAULT_NULL_ALLOCATOR = omp_null_allocator
195 #else
196 # define __GOMP_NOTHROW __attribute__((__nothrow__))
197 # define __GOMP_DEFAULT_NULL_ALLOCATOR
198 #endif
199 
200 extern void omp_set_num_threads (int) __GOMP_NOTHROW;
201 extern int omp_get_num_threads (void) __GOMP_NOTHROW;
202 extern int omp_get_max_threads (void) __GOMP_NOTHROW;
203 extern int omp_get_thread_num (void) __GOMP_NOTHROW;
204 extern int omp_get_num_procs (void) __GOMP_NOTHROW;
205 
206 extern int omp_in_parallel (void) __GOMP_NOTHROW;
207 
208 extern void omp_set_dynamic (int) __GOMP_NOTHROW;
209 extern int omp_get_dynamic (void) __GOMP_NOTHROW;
210 
211 extern void omp_set_nested (int) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0;
212 extern int omp_get_nested (void) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0;
213 
214 extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW;
215 extern void omp_init_lock_with_hint (omp_lock_t *, omp_sync_hint_t)
216   __GOMP_NOTHROW;
217 extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW;
218 extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW;
219 extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW;
220 extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW;
221 
222 extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
223 extern void omp_init_nest_lock_with_hint (omp_nest_lock_t *, omp_sync_hint_t)
224   __GOMP_NOTHROW;
225 extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
226 extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
227 extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
228 extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
229 
230 extern double omp_get_wtime (void) __GOMP_NOTHROW;
231 extern double omp_get_wtick (void) __GOMP_NOTHROW;
232 
233 extern void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW;
234 extern void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW;
235 extern int omp_get_thread_limit (void) __GOMP_NOTHROW;
236 extern void omp_set_max_active_levels (int) __GOMP_NOTHROW;
237 extern int omp_get_max_active_levels (void) __GOMP_NOTHROW;
238 extern int omp_get_supported_active_levels (void) __GOMP_NOTHROW;
239 extern int omp_get_level (void) __GOMP_NOTHROW;
240 extern int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW;
241 extern int omp_get_team_size (int) __GOMP_NOTHROW;
242 extern int omp_get_active_level (void) __GOMP_NOTHROW;
243 
244 extern int omp_in_final (void) __GOMP_NOTHROW;
245 
246 extern int omp_get_cancellation (void) __GOMP_NOTHROW;
247 extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW;
248 extern int omp_get_num_places (void) __GOMP_NOTHROW;
249 extern int omp_get_place_num_procs (int) __GOMP_NOTHROW;
250 extern void omp_get_place_proc_ids (int, int *) __GOMP_NOTHROW;
251 extern int omp_get_place_num (void) __GOMP_NOTHROW;
252 extern int omp_get_partition_num_places (void) __GOMP_NOTHROW;
253 extern void omp_get_partition_place_nums (int *) __GOMP_NOTHROW;
254 
255 extern void omp_set_default_device (int) __GOMP_NOTHROW;
256 extern int omp_get_default_device (void) __GOMP_NOTHROW;
257 extern int omp_get_num_devices (void) __GOMP_NOTHROW;
258 extern int omp_get_device_num (void) __GOMP_NOTHROW;
259 extern int omp_get_num_teams (void) __GOMP_NOTHROW;
260 extern int omp_get_team_num (void) __GOMP_NOTHROW;
261 
262 extern int omp_is_initial_device (void) __GOMP_NOTHROW;
263 extern int omp_get_initial_device (void) __GOMP_NOTHROW;
264 extern int omp_get_max_task_priority (void) __GOMP_NOTHROW;
265 
266 extern void omp_fulfill_event (omp_event_handle_t) __GOMP_NOTHROW;
267 
268 extern void omp_set_num_teams (int) __GOMP_NOTHROW;
269 extern int omp_get_max_teams (void) __GOMP_NOTHROW;
270 extern void omp_set_teams_thread_limit (int) __GOMP_NOTHROW;
271 extern int omp_get_teams_thread_limit (void) __GOMP_NOTHROW;
272 
273 extern void *omp_target_alloc (__SIZE_TYPE__, int) __GOMP_NOTHROW;
274 extern void omp_target_free (void *, int) __GOMP_NOTHROW;
275 extern int omp_target_is_present (const void *, int) __GOMP_NOTHROW;
276 extern int omp_target_memcpy (void *, const void *, __SIZE_TYPE__,
277 			      __SIZE_TYPE__, __SIZE_TYPE__, int, int)
278   __GOMP_NOTHROW;
279 extern int omp_target_memcpy_rect (void *, const void *, __SIZE_TYPE__, int,
280 				   const __SIZE_TYPE__ *,
281 				   const __SIZE_TYPE__ *,
282 				   const __SIZE_TYPE__ *,
283 				   const __SIZE_TYPE__ *,
284 				   const __SIZE_TYPE__ *, int, int)
285   __GOMP_NOTHROW;
286 extern int omp_target_associate_ptr (const void *, const void *, __SIZE_TYPE__,
287 				     __SIZE_TYPE__, int) __GOMP_NOTHROW;
288 extern int omp_target_disassociate_ptr (const void *, int) __GOMP_NOTHROW;
289 
290 extern void omp_set_affinity_format (const char *) __GOMP_NOTHROW;
291 extern __SIZE_TYPE__ omp_get_affinity_format (char *, __SIZE_TYPE__)
292   __GOMP_NOTHROW;
293 extern void omp_display_affinity (const char *) __GOMP_NOTHROW;
294 extern __SIZE_TYPE__ omp_capture_affinity (char *, __SIZE_TYPE__, const char *)
295   __GOMP_NOTHROW;
296 
297 extern int omp_pause_resource (omp_pause_resource_t, int) __GOMP_NOTHROW;
298 extern int omp_pause_resource_all (omp_pause_resource_t) __GOMP_NOTHROW;
299 
300 extern omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t,
301 						  int,
302 						  const omp_alloctrait_t [])
303   __GOMP_NOTHROW;
304 extern void omp_destroy_allocator (omp_allocator_handle_t) __GOMP_NOTHROW;
305 extern void omp_set_default_allocator (omp_allocator_handle_t) __GOMP_NOTHROW;
306 extern omp_allocator_handle_t omp_get_default_allocator (void) __GOMP_NOTHROW;
307 extern void omp_free (void *,
308 		      omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR)
309   __GOMP_NOTHROW;
310 extern void *omp_alloc (__SIZE_TYPE__,
311 			omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR)
312   __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free),
313 				__alloc_size__ (1)));
314 extern void *omp_aligned_alloc (__SIZE_TYPE__, __SIZE_TYPE__,
315 				omp_allocator_handle_t
316 				__GOMP_DEFAULT_NULL_ALLOCATOR)
317   __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free),
318 				__alloc_size__ (2), __alloc_align__ (1)));
319 extern void *omp_calloc (__SIZE_TYPE__, __SIZE_TYPE__,
320 			 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR)
321   __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free),
322 				__alloc_size__ (1, 2)));
323 extern void *omp_aligned_calloc (__SIZE_TYPE__, __SIZE_TYPE__, __SIZE_TYPE__,
324 				 omp_allocator_handle_t
325 				 __GOMP_DEFAULT_NULL_ALLOCATOR)
326   __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free),
327 				__alloc_size__ (2, 3), __alloc_align__ (1)));
328 extern void *omp_realloc (void *, __SIZE_TYPE__,
329 			  omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR,
330 			  omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR)
331   __GOMP_NOTHROW __attribute__((__malloc__ (omp_free), __alloc_size__ (2)));
332 
333 extern void omp_display_env (int) __GOMP_NOTHROW;
334 
335 #ifdef __cplusplus
336 }
337 #endif
338 
339 #endif /* _OMP_H */
340