1130803Smarcel/* This file is automatically generated.  DO NOT EDIT! */
2130803Smarcel/* Generated from: NetBSD: mknative-gcc,v 1.117 2023/07/31 01:48:37 mrg Exp  */
3130803Smarcel/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4130803Smarcel
5130803Smarcel/* Copyright (C) 2005-2022 Free Software Foundation, Inc.
6130803Smarcel   Contributed by Richard Henderson <rth@redhat.com>.
7130803Smarcel
8130803Smarcel   This file is part of the GNU Offloading and Multi Processing Library
9130803Smarcel   (libgomp).
10130803Smarcel
11130803Smarcel   Libgomp is free software; you can redistribute it and/or modify it
12130803Smarcel   under the terms of the GNU General Public License as published by
13130803Smarcel   the Free Software Foundation; either version 3, or (at your option)
14130803Smarcel   any later version.
15130803Smarcel
16130803Smarcel   Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
17130803Smarcel   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18130803Smarcel   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19130803Smarcel   more details.
20130803Smarcel
21130803Smarcel   Under Section 7 of GPL version 3, you are granted additional
22130803Smarcel   permissions described in the GCC Runtime Library Exception, version
23130803Smarcel   3.1, as published by the Free Software Foundation.
24130803Smarcel
25130803Smarcel   You should have received a copy of the GNU General Public License and
26130803Smarcel   a copy of the GCC Runtime Library Exception along with this program;
27130803Smarcel   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
28130803Smarcel   <http://www.gnu.org/licenses/>.  */
29130803Smarcel
30130803Smarcel#ifndef _OMP_H
31130803Smarcel#define _OMP_H 1
32130803Smarcel
33130803Smarcel#if defined(__GNUC__) && _OPENMP >= 201811
34130803Smarcel# define __GOMP_DEPRECATED_5_0 __attribute__((__deprecated__))
35130803Smarcel#else
36130803Smarcel# define __GOMP_DEPRECATED_5_0
37130803Smarcel#endif
38130803Smarcel
39130803Smarcel#if defined(__GNUC__) && _OPENMP >= 202011
40130803Smarcel# define __GOMP_DEPRECATED_5_1 __attribute__((__deprecated__))
41130803Smarcel#else
42130803Smarcel# define __GOMP_DEPRECATED_5_1
43130803Smarcel#endif
44130803Smarcel
45130803Smarcel#ifndef _LIBGOMP_OMP_LOCK_DEFINED
46130803Smarcel#define _LIBGOMP_OMP_LOCK_DEFINED 1
47130803Smarcel/* These two structures get edited by the libgomp build process to
48130803Smarcel   reflect the shape of the two types.  Their internals are private
49130803Smarcel   to the library.  */
50130803Smarcel
51130803Smarceltypedef struct
52130803Smarcel{
53130803Smarcel  unsigned char _x[4]
54130803Smarcel    __attribute__((__aligned__(4)));
55130803Smarcel} omp_lock_t;
56130803Smarcel
57130803Smarceltypedef struct
58130803Smarcel{
59130803Smarcel  unsigned char _x[12]
60130803Smarcel    __attribute__((__aligned__(4)));
61130803Smarcel} omp_nest_lock_t;
62130803Smarcel#endif
63130803Smarcel
64130803Smarceltypedef enum omp_sched_t
65130803Smarcel{
66130803Smarcel  omp_sched_static = 1,
67130803Smarcel  omp_sched_dynamic = 2,
68130803Smarcel  omp_sched_guided = 3,
69130803Smarcel  omp_sched_auto = 4,
70130803Smarcel  omp_sched_monotonic = 0x80000000U
71130803Smarcel} omp_sched_t;
72130803Smarcel
73130803Smarceltypedef enum omp_proc_bind_t
74130803Smarcel{
75130803Smarcel  omp_proc_bind_false = 0,
76130803Smarcel  omp_proc_bind_true = 1,
77130803Smarcel  omp_proc_bind_primary = 2,
78130803Smarcel  omp_proc_bind_master __GOMP_DEPRECATED_5_1
79130803Smarcel    = omp_proc_bind_primary,
80130803Smarcel  omp_proc_bind_close = 3,
81130803Smarcel  omp_proc_bind_spread = 4
82130803Smarcel} omp_proc_bind_t;
83130803Smarcel
84130803Smarceltypedef enum omp_sync_hint_t
85130803Smarcel{
86130803Smarcel  omp_sync_hint_none = 0,
87130803Smarcel  omp_lock_hint_none __GOMP_DEPRECATED_5_0 = omp_sync_hint_none,
88130803Smarcel  omp_sync_hint_uncontended = 1,
89130803Smarcel  omp_lock_hint_uncontended __GOMP_DEPRECATED_5_0 = omp_sync_hint_uncontended,
90130803Smarcel  omp_sync_hint_contended = 2,
91130803Smarcel  omp_lock_hint_contended __GOMP_DEPRECATED_5_0 = omp_sync_hint_contended,
92130803Smarcel  omp_sync_hint_nonspeculative = 4,
93130803Smarcel  omp_lock_hint_nonspeculative __GOMP_DEPRECATED_5_0
94130803Smarcel    = omp_sync_hint_nonspeculative,
95130803Smarcel  omp_sync_hint_speculative = 8,
96130803Smarcel  omp_lock_hint_speculative __GOMP_DEPRECATED_5_0 = omp_sync_hint_speculative
97130803Smarcel} omp_sync_hint_t;
98130803Smarcel
99130803Smarceltypedef __GOMP_DEPRECATED_5_0 omp_sync_hint_t omp_lock_hint_t;
100130803Smarcel
101130803Smarceltypedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t
102130803Smarcel{
103130803Smarcel  char __omp_depend_t__[2 * sizeof (void *)];
104130803Smarcel} omp_depend_t;
105130803Smarcel
106130803Smarceltypedef enum omp_pause_resource_t
107130803Smarcel{
108130803Smarcel  omp_pause_soft = 1,
109130803Smarcel  omp_pause_hard = 2
110130803Smarcel} omp_pause_resource_t;
111130803Smarcel
112130803Smarceltypedef __UINTPTR_TYPE__ omp_uintptr_t;
113130803Smarcel
114130803Smarcel#if __cplusplus >= 201103L
115130803Smarcel# define __GOMP_UINTPTR_T_ENUM : omp_uintptr_t
116130803Smarcel#else
117130803Smarcel# define __GOMP_UINTPTR_T_ENUM
118130803Smarcel#endif
119130803Smarcel
120130803Smarceltypedef enum omp_memspace_handle_t __GOMP_UINTPTR_T_ENUM
121130803Smarcel{
122130803Smarcel  omp_default_mem_space = 0,
123130803Smarcel  omp_large_cap_mem_space = 1,
124130803Smarcel  omp_const_mem_space = 2,
125130803Smarcel  omp_high_bw_mem_space = 3,
126130803Smarcel  omp_low_lat_mem_space = 4,
127130803Smarcel  __omp_memspace_handle_t_max__ = __UINTPTR_MAX__
128130803Smarcel} omp_memspace_handle_t;
129130803Smarcel
130130803Smarceltypedef enum omp_allocator_handle_t __GOMP_UINTPTR_T_ENUM
131130803Smarcel{
132130803Smarcel  omp_null_allocator = 0,
133130803Smarcel  omp_default_mem_alloc = 1,
134130803Smarcel  omp_large_cap_mem_alloc = 2,
135130803Smarcel  omp_const_mem_alloc = 3,
136130803Smarcel  omp_high_bw_mem_alloc = 4,
137130803Smarcel  omp_low_lat_mem_alloc = 5,
138130803Smarcel  omp_cgroup_mem_alloc = 6,
139130803Smarcel  omp_pteam_mem_alloc = 7,
140130803Smarcel  omp_thread_mem_alloc = 8,
141130803Smarcel  __omp_allocator_handle_t_max__ = __UINTPTR_MAX__
142130803Smarcel} omp_allocator_handle_t;
143130803Smarcel
144130803Smarceltypedef enum omp_alloctrait_key_t
145130803Smarcel{
146130803Smarcel  omp_atk_sync_hint = 1,
147130803Smarcel  omp_atk_alignment = 2,
148130803Smarcel  omp_atk_access = 3,
149130803Smarcel  omp_atk_pool_size = 4,
150130803Smarcel  omp_atk_fallback = 5,
151130803Smarcel  omp_atk_fb_data = 6,
152130803Smarcel  omp_atk_pinned = 7,
153130803Smarcel  omp_atk_partition = 8
154130803Smarcel} omp_alloctrait_key_t;
155130803Smarcel
156130803Smarceltypedef enum omp_alloctrait_value_t
157130803Smarcel{
158130803Smarcel  omp_atv_default = (__UINTPTR_TYPE__) -1,
159130803Smarcel  omp_atv_false = 0,
160130803Smarcel  omp_atv_true = 1,
161130803Smarcel  omp_atv_contended = 3,
162130803Smarcel  omp_atv_uncontended = 4,
163130803Smarcel  omp_atv_serialized = 5,
164130803Smarcel  omp_atv_sequential __GOMP_DEPRECATED_5_1 = omp_atv_serialized,
165130803Smarcel  omp_atv_private = 6,
166130803Smarcel  omp_atv_all = 7,
167130803Smarcel  omp_atv_thread = 8,
168130803Smarcel  omp_atv_pteam = 9,
169130803Smarcel  omp_atv_cgroup = 10,
170130803Smarcel  omp_atv_default_mem_fb = 11,
171130803Smarcel  omp_atv_null_fb = 12,
172130803Smarcel  omp_atv_abort_fb = 13,
173130803Smarcel  omp_atv_allocator_fb = 14,
174130803Smarcel  omp_atv_environment = 15,
175130803Smarcel  omp_atv_nearest = 16,
176130803Smarcel  omp_atv_blocked = 17,
177130803Smarcel  omp_atv_interleaved = 18
178130803Smarcel} omp_alloctrait_value_t;
179130803Smarcel
180130803Smarceltypedef struct omp_alloctrait_t
181130803Smarcel{
182130803Smarcel  omp_alloctrait_key_t key;
183130803Smarcel  omp_uintptr_t value;
184130803Smarcel} omp_alloctrait_t;
185130803Smarcel
186130803Smarceltypedef enum omp_event_handle_t __GOMP_UINTPTR_T_ENUM
187130803Smarcel{
188130803Smarcel  __omp_event_handle_t_max__ = __UINTPTR_MAX__
189130803Smarcel} omp_event_handle_t;
190130803Smarcel
191130803Smarcel#ifdef __cplusplus
192130803Smarcelextern "C" {
193130803Smarcel# define __GOMP_NOTHROW throw ()
194130803Smarcel# define __GOMP_DEFAULT_NULL_ALLOCATOR = omp_null_allocator
195130803Smarcel#else
196# define __GOMP_NOTHROW __attribute__((__nothrow__))
197# define __GOMP_DEFAULT_NULL_ALLOCATOR
198#endif
199
200extern void omp_set_num_threads (int) __GOMP_NOTHROW;
201extern int omp_get_num_threads (void) __GOMP_NOTHROW;
202extern int omp_get_max_threads (void) __GOMP_NOTHROW;
203extern int omp_get_thread_num (void) __GOMP_NOTHROW;
204extern int omp_get_num_procs (void) __GOMP_NOTHROW;
205
206extern int omp_in_parallel (void) __GOMP_NOTHROW;
207
208extern void omp_set_dynamic (int) __GOMP_NOTHROW;
209extern int omp_get_dynamic (void) __GOMP_NOTHROW;
210
211extern void omp_set_nested (int) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0;
212extern int omp_get_nested (void) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0;
213
214extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW;
215extern void omp_init_lock_with_hint (omp_lock_t *, omp_sync_hint_t)
216  __GOMP_NOTHROW;
217extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW;
218extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW;
219extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW;
220extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW;
221
222extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
223extern void omp_init_nest_lock_with_hint (omp_nest_lock_t *, omp_sync_hint_t)
224  __GOMP_NOTHROW;
225extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
226extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
227extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
228extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
229
230extern double omp_get_wtime (void) __GOMP_NOTHROW;
231extern double omp_get_wtick (void) __GOMP_NOTHROW;
232
233extern void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW;
234extern void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW;
235extern int omp_get_thread_limit (void) __GOMP_NOTHROW;
236extern void omp_set_max_active_levels (int) __GOMP_NOTHROW;
237extern int omp_get_max_active_levels (void) __GOMP_NOTHROW;
238extern int omp_get_supported_active_levels (void) __GOMP_NOTHROW;
239extern int omp_get_level (void) __GOMP_NOTHROW;
240extern int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW;
241extern int omp_get_team_size (int) __GOMP_NOTHROW;
242extern int omp_get_active_level (void) __GOMP_NOTHROW;
243
244extern int omp_in_final (void) __GOMP_NOTHROW;
245
246extern int omp_get_cancellation (void) __GOMP_NOTHROW;
247extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW;
248extern int omp_get_num_places (void) __GOMP_NOTHROW;
249extern int omp_get_place_num_procs (int) __GOMP_NOTHROW;
250extern void omp_get_place_proc_ids (int, int *) __GOMP_NOTHROW;
251extern int omp_get_place_num (void) __GOMP_NOTHROW;
252extern int omp_get_partition_num_places (void) __GOMP_NOTHROW;
253extern void omp_get_partition_place_nums (int *) __GOMP_NOTHROW;
254
255extern void omp_set_default_device (int) __GOMP_NOTHROW;
256extern int omp_get_default_device (void) __GOMP_NOTHROW;
257extern int omp_get_num_devices (void) __GOMP_NOTHROW;
258extern int omp_get_device_num (void) __GOMP_NOTHROW;
259extern int omp_get_num_teams (void) __GOMP_NOTHROW;
260extern int omp_get_team_num (void) __GOMP_NOTHROW;
261
262extern int omp_is_initial_device (void) __GOMP_NOTHROW;
263extern int omp_get_initial_device (void) __GOMP_NOTHROW;
264extern int omp_get_max_task_priority (void) __GOMP_NOTHROW;
265
266extern void omp_fulfill_event (omp_event_handle_t) __GOMP_NOTHROW;
267
268extern void omp_set_num_teams (int) __GOMP_NOTHROW;
269extern int omp_get_max_teams (void) __GOMP_NOTHROW;
270extern void omp_set_teams_thread_limit (int) __GOMP_NOTHROW;
271extern int omp_get_teams_thread_limit (void) __GOMP_NOTHROW;
272
273extern void *omp_target_alloc (__SIZE_TYPE__, int) __GOMP_NOTHROW;
274extern void omp_target_free (void *, int) __GOMP_NOTHROW;
275extern int omp_target_is_present (const void *, int) __GOMP_NOTHROW;
276extern int omp_target_memcpy (void *, const void *, __SIZE_TYPE__,
277			      __SIZE_TYPE__, __SIZE_TYPE__, int, int)
278  __GOMP_NOTHROW;
279extern 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;
286extern int omp_target_associate_ptr (const void *, const void *, __SIZE_TYPE__,
287				     __SIZE_TYPE__, int) __GOMP_NOTHROW;
288extern int omp_target_disassociate_ptr (const void *, int) __GOMP_NOTHROW;
289
290extern void omp_set_affinity_format (const char *) __GOMP_NOTHROW;
291extern __SIZE_TYPE__ omp_get_affinity_format (char *, __SIZE_TYPE__)
292  __GOMP_NOTHROW;
293extern void omp_display_affinity (const char *) __GOMP_NOTHROW;
294extern __SIZE_TYPE__ omp_capture_affinity (char *, __SIZE_TYPE__, const char *)
295  __GOMP_NOTHROW;
296
297extern int omp_pause_resource (omp_pause_resource_t, int) __GOMP_NOTHROW;
298extern int omp_pause_resource_all (omp_pause_resource_t) __GOMP_NOTHROW;
299
300extern omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t,
301						  int,
302						  const omp_alloctrait_t [])
303  __GOMP_NOTHROW;
304extern void omp_destroy_allocator (omp_allocator_handle_t) __GOMP_NOTHROW;
305extern void omp_set_default_allocator (omp_allocator_handle_t) __GOMP_NOTHROW;
306extern omp_allocator_handle_t omp_get_default_allocator (void) __GOMP_NOTHROW;
307extern void omp_free (void *,
308		      omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR)
309  __GOMP_NOTHROW;
310extern 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)));
314extern 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)));
319extern 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)));
323extern 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)));
328extern 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
333extern void omp_display_env (int) __GOMP_NOTHROW;
334
335#ifdef __cplusplus
336}
337#endif
338
339#endif /* _OMP_H */
340