lower-bitint: Fix up handle_operand_addr for 0 constants [PR112771]
[official-gcc.git] / libgomp / libgomp_g.h
blob95046312ae9bd1cda2ad2350c2ee816d1f3b7392
1 /* Copyright (C) 2005-2023 Free Software Foundation, Inc.
2 Contributed by Richard Henderson <rth@redhat.com>.
4 This file is part of the GNU Offloading and Multi Processing Library
5 (libgomp).
7 Libgomp is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* This file contains prototypes of functions in the external ABI.
27 This file is included by files in the testsuite. */
29 #ifndef LIBGOMP_G_H
30 #define LIBGOMP_G_H 1
32 #include <stdbool.h>
33 #include <stddef.h>
34 #include <stdint.h>
36 /* barrier.c */
38 extern void GOMP_barrier (void);
39 extern bool GOMP_barrier_cancel (void);
41 /* critical.c */
43 extern void GOMP_critical_start (void);
44 extern void GOMP_critical_end (void);
45 extern void GOMP_critical_name_start (void **);
46 extern void GOMP_critical_name_end (void **);
47 extern void GOMP_atomic_start (void);
48 extern void GOMP_atomic_end (void);
50 /* loop.c */
52 extern bool GOMP_loop_static_start (long, long, long, long, long *, long *);
53 extern bool GOMP_loop_dynamic_start (long, long, long, long, long *, long *);
54 extern bool GOMP_loop_guided_start (long, long, long, long, long *, long *);
55 extern bool GOMP_loop_runtime_start (long, long, long, long *, long *);
56 extern bool GOMP_loop_nonmonotonic_dynamic_start (long, long, long, long,
57 long *, long *);
58 extern bool GOMP_loop_nonmonotonic_guided_start (long, long, long, long,
59 long *, long *);
60 extern bool GOMP_loop_nonmonotonic_runtime_start (long, long, long,
61 long *, long *);
62 extern bool GOMP_loop_maybe_nonmonotonic_runtime_start (long, long, long,
63 long *, long *);
64 extern bool GOMP_loop_start (long, long, long, long, long, long *, long *,
65 uintptr_t *, void **);
67 extern bool GOMP_loop_ordered_static_start (long, long, long, long,
68 long *, long *);
69 extern bool GOMP_loop_ordered_dynamic_start (long, long, long, long,
70 long *, long *);
71 extern bool GOMP_loop_ordered_guided_start (long, long, long, long,
72 long *, long *);
73 extern bool GOMP_loop_ordered_runtime_start (long, long, long, long *, long *);
74 extern bool GOMP_loop_ordered_start (long, long, long, long, long, long *,
75 long *, uintptr_t *, void **);
77 extern bool GOMP_loop_static_next (long *, long *);
78 extern bool GOMP_loop_dynamic_next (long *, long *);
79 extern bool GOMP_loop_guided_next (long *, long *);
80 extern bool GOMP_loop_runtime_next (long *, long *);
81 extern bool GOMP_loop_nonmonotonic_dynamic_next (long *, long *);
82 extern bool GOMP_loop_nonmonotonic_guided_next (long *, long *);
83 extern bool GOMP_loop_nonmonotonic_runtime_next (long *, long *);
84 extern bool GOMP_loop_maybe_nonmonotonic_runtime_next (long *, long *);
86 extern bool GOMP_loop_ordered_static_next (long *, long *);
87 extern bool GOMP_loop_ordered_dynamic_next (long *, long *);
88 extern bool GOMP_loop_ordered_guided_next (long *, long *);
89 extern bool GOMP_loop_ordered_runtime_next (long *, long *);
91 extern bool GOMP_loop_doacross_static_start (unsigned, long *, long, long *,
92 long *);
93 extern bool GOMP_loop_doacross_dynamic_start (unsigned, long *, long, long *,
94 long *);
95 extern bool GOMP_loop_doacross_guided_start (unsigned, long *, long, long *,
96 long *);
97 extern bool GOMP_loop_doacross_runtime_start (unsigned, long *, long *,
98 long *);
99 extern bool GOMP_loop_doacross_start (unsigned, long *, long, long, long *,
100 long *, uintptr_t *, void **);
102 extern void GOMP_parallel_loop_static_start (void (*)(void *), void *,
103 unsigned, long, long, long, long);
104 extern void GOMP_parallel_loop_dynamic_start (void (*)(void *), void *,
105 unsigned, long, long, long, long);
106 extern void GOMP_parallel_loop_guided_start (void (*)(void *), void *,
107 unsigned, long, long, long, long);
108 extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
109 unsigned, long, long, long);
110 extern void GOMP_parallel_loop_static (void (*)(void *), void *,
111 unsigned, long, long, long, long,
112 unsigned);
113 extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
114 unsigned, long, long, long, long,
115 unsigned);
116 extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
117 unsigned, long, long, long, long,
118 unsigned);
119 extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
120 unsigned, long, long, long,
121 unsigned);
122 extern void GOMP_parallel_loop_nonmonotonic_dynamic (void (*)(void *), void *,
123 unsigned, long, long,
124 long, long, unsigned);
125 extern void GOMP_parallel_loop_nonmonotonic_guided (void (*)(void *), void *,
126 unsigned, long, long,
127 long, long, unsigned);
128 extern void GOMP_parallel_loop_nonmonotonic_runtime (void (*)(void *), void *,
129 unsigned, long, long,
130 long, unsigned);
131 extern void GOMP_parallel_loop_maybe_nonmonotonic_runtime (void (*)(void *),
132 void *, unsigned,
133 long, long,
134 long, unsigned);
136 extern void GOMP_loop_end (void);
137 extern void GOMP_loop_end_nowait (void);
138 extern bool GOMP_loop_end_cancel (void);
140 /* loop_ull.c */
142 extern bool GOMP_loop_ull_static_start (bool, unsigned long long,
143 unsigned long long,
144 unsigned long long,
145 unsigned long long,
146 unsigned long long *,
147 unsigned long long *);
148 extern bool GOMP_loop_ull_dynamic_start (bool, unsigned long long,
149 unsigned long long,
150 unsigned long long,
151 unsigned long long,
152 unsigned long long *,
153 unsigned long long *);
154 extern bool GOMP_loop_ull_guided_start (bool, unsigned long long,
155 unsigned long long,
156 unsigned long long,
157 unsigned long long,
158 unsigned long long *,
159 unsigned long long *);
160 extern bool GOMP_loop_ull_runtime_start (bool, unsigned long long,
161 unsigned long long,
162 unsigned long long,
163 unsigned long long *,
164 unsigned long long *);
165 extern bool GOMP_loop_ull_nonmonotonic_dynamic_start (bool, unsigned long long,
166 unsigned long long,
167 unsigned long long,
168 unsigned long long,
169 unsigned long long *,
170 unsigned long long *);
171 extern bool GOMP_loop_ull_nonmonotonic_guided_start (bool, unsigned long long,
172 unsigned long long,
173 unsigned long long,
174 unsigned long long,
175 unsigned long long *,
176 unsigned long long *);
177 extern bool GOMP_loop_ull_nonmonotonic_runtime_start (bool, unsigned long long,
178 unsigned long long,
179 unsigned long long,
180 unsigned long long *,
181 unsigned long long *);
182 extern bool GOMP_loop_ull_maybe_nonmonotonic_runtime_start (bool,
183 unsigned long long,
184 unsigned long long,
185 unsigned long long,
186 unsigned long long *,
187 unsigned long long *);
188 extern bool GOMP_loop_ull_start (bool, unsigned long long, unsigned long long,
189 unsigned long long, long, unsigned long long,
190 unsigned long long *, unsigned long long *,
191 uintptr_t *, void **);
193 extern bool GOMP_loop_ull_ordered_static_start (bool, unsigned long long,
194 unsigned long long,
195 unsigned long long,
196 unsigned long long,
197 unsigned long long *,
198 unsigned long long *);
199 extern bool GOMP_loop_ull_ordered_dynamic_start (bool, unsigned long long,
200 unsigned long long,
201 unsigned long long,
202 unsigned long long,
203 unsigned long long *,
204 unsigned long long *);
205 extern bool GOMP_loop_ull_ordered_guided_start (bool, unsigned long long,
206 unsigned long long,
207 unsigned long long,
208 unsigned long long,
209 unsigned long long *,
210 unsigned long long *);
211 extern bool GOMP_loop_ull_ordered_runtime_start (bool, unsigned long long,
212 unsigned long long,
213 unsigned long long,
214 unsigned long long *,
215 unsigned long long *);
216 extern bool GOMP_loop_ull_ordered_start (bool, unsigned long long,
217 unsigned long long,
218 unsigned long long, long,
219 unsigned long long,
220 unsigned long long *,
221 unsigned long long *,
222 uintptr_t *, void **);
224 extern bool GOMP_loop_ull_static_next (unsigned long long *,
225 unsigned long long *);
226 extern bool GOMP_loop_ull_dynamic_next (unsigned long long *,
227 unsigned long long *);
228 extern bool GOMP_loop_ull_guided_next (unsigned long long *,
229 unsigned long long *);
230 extern bool GOMP_loop_ull_runtime_next (unsigned long long *,
231 unsigned long long *);
232 extern bool GOMP_loop_ull_nonmonotonic_dynamic_next (unsigned long long *,
233 unsigned long long *);
234 extern bool GOMP_loop_ull_nonmonotonic_guided_next (unsigned long long *,
235 unsigned long long *);
236 extern bool GOMP_loop_ull_nonmonotonic_runtime_next (unsigned long long *,
237 unsigned long long *);
238 extern bool GOMP_loop_ull_maybe_nonmonotonic_runtime_next (unsigned long long *,
239 unsigned long long *);
241 extern bool GOMP_loop_ull_ordered_static_next (unsigned long long *,
242 unsigned long long *);
243 extern bool GOMP_loop_ull_ordered_dynamic_next (unsigned long long *,
244 unsigned long long *);
245 extern bool GOMP_loop_ull_ordered_guided_next (unsigned long long *,
246 unsigned long long *);
247 extern bool GOMP_loop_ull_ordered_runtime_next (unsigned long long *,
248 unsigned long long *);
250 extern bool GOMP_loop_ull_doacross_static_start (unsigned,
251 unsigned long long *,
252 unsigned long long,
253 unsigned long long *,
254 unsigned long long *);
255 extern bool GOMP_loop_ull_doacross_dynamic_start (unsigned,
256 unsigned long long *,
257 unsigned long long,
258 unsigned long long *,
259 unsigned long long *);
260 extern bool GOMP_loop_ull_doacross_guided_start (unsigned,
261 unsigned long long *,
262 unsigned long long,
263 unsigned long long *,
264 unsigned long long *);
265 extern bool GOMP_loop_ull_doacross_runtime_start (unsigned,
266 unsigned long long *,
267 unsigned long long *,
268 unsigned long long *);
269 extern bool GOMP_loop_ull_doacross_start (unsigned, unsigned long long *,
270 long, unsigned long long,
271 unsigned long long *,
272 unsigned long long *,
273 uintptr_t *, void **);
275 /* ordered.c */
277 extern void GOMP_ordered_start (void);
278 extern void GOMP_ordered_end (void);
279 extern void GOMP_doacross_post (long *);
280 extern void GOMP_doacross_wait (long, ...);
281 extern void GOMP_doacross_ull_post (unsigned long long *);
282 extern void GOMP_doacross_ull_wait (unsigned long long, ...);
284 /* parallel.c */
286 extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
287 extern void GOMP_parallel_end (void);
288 extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
289 extern unsigned GOMP_parallel_reductions (void (*) (void *), void *, unsigned,
290 unsigned);
291 extern bool GOMP_cancel (int, bool);
292 extern bool GOMP_cancellation_point (int);
294 /* task.c */
296 extern void GOMP_task (void (*) (void *), void *, void (*) (void *, void *),
297 long, long, bool, unsigned, void **, int, void *);
298 extern void GOMP_taskloop (void (*) (void *), void *,
299 void (*) (void *, void *), long, long, unsigned,
300 unsigned long, int, long, long, long);
301 extern void GOMP_taskloop_ull (void (*) (void *), void *,
302 void (*) (void *, void *), long, long,
303 unsigned, unsigned long, int,
304 unsigned long long, unsigned long long,
305 unsigned long long);
306 extern void GOMP_taskwait (void);
307 extern void GOMP_taskwait_depend (void **);
308 extern void GOMP_taskwait_depend_nowait (void **);
309 extern void GOMP_taskyield (void);
310 extern void GOMP_taskgroup_start (void);
311 extern void GOMP_taskgroup_end (void);
312 extern void GOMP_taskgroup_reduction_register (uintptr_t *);
313 extern void GOMP_taskgroup_reduction_unregister (uintptr_t *);
314 extern void GOMP_task_reduction_remap (size_t, size_t, void **);
315 extern void GOMP_workshare_task_reduction_unregister (bool);
317 /* sections.c */
319 extern unsigned GOMP_sections_start (unsigned);
320 extern unsigned GOMP_sections2_start (unsigned, uintptr_t *, void **);
321 extern unsigned GOMP_sections_next (void);
322 extern void GOMP_parallel_sections_start (void (*) (void *), void *,
323 unsigned, unsigned);
324 extern void GOMP_parallel_sections (void (*) (void *), void *,
325 unsigned, unsigned, unsigned);
326 extern void GOMP_sections_end (void);
327 extern void GOMP_sections_end_nowait (void);
328 extern bool GOMP_sections_end_cancel (void);
330 /* single.c */
332 extern bool GOMP_single_start (void);
333 extern void *GOMP_single_copy_start (void);
334 extern void GOMP_single_copy_end (void *);
336 /* scope.c */
338 extern void GOMP_scope_start (uintptr_t *);
340 /* target.c */
342 extern void GOMP_target (int, void (*) (void *), const void *,
343 size_t, void **, size_t *, unsigned char *);
344 extern void GOMP_target_ext (int, void (*) (void *), size_t, void **, size_t *,
345 unsigned short *, unsigned int, void **, void **);
346 extern void GOMP_target_data (int, const void *,
347 size_t, void **, size_t *, unsigned char *);
348 extern void GOMP_target_data_ext (int, size_t, void **, size_t *,
349 unsigned short *);
350 extern void GOMP_target_end_data (void);
351 extern void GOMP_target_update (int, const void *,
352 size_t, void **, size_t *, unsigned char *);
353 extern void GOMP_target_update_ext (int, size_t, void **, size_t *,
354 unsigned short *, unsigned int, void **);
355 extern void GOMP_target_enter_exit_data (int, size_t, void **, size_t *,
356 unsigned short *, unsigned int,
357 void **);
358 extern void GOMP_teams (unsigned int, unsigned int);
359 extern bool GOMP_teams4 (unsigned int, unsigned int, unsigned int, bool);
360 extern void *GOMP_target_map_indirect_ptr (void *);
362 /* teams.c */
364 extern void GOMP_teams_reg (void (*) (void *), void *, unsigned, unsigned,
365 unsigned);
367 /* allocator.c */
369 extern void *GOMP_alloc (size_t, size_t, uintptr_t);
370 extern void GOMP_free (void *, uintptr_t);
372 /* error.c */
374 extern void GOMP_warning (const char *, size_t);
375 extern void GOMP_error (const char *, size_t);
377 /* oacc-async.c */
379 extern void GOACC_wait (int, int, ...);
381 /* oacc-mem.c */
383 extern void GOACC_enter_exit_data (int, size_t, void **, size_t *,
384 unsigned short *, int, int, ...);
385 extern void GOACC_enter_data (int, size_t, void **, size_t *,
386 unsigned short *, int, int, ...);
387 extern void GOACC_exit_data (int, size_t, void **, size_t *,
388 unsigned short *, int, int, ...);
389 extern void GOACC_declare (int, size_t, void **, size_t *, unsigned short *);
391 /* oacc-parallel.c */
393 extern void GOACC_parallel_keyed (int, void (*) (void *), size_t,
394 void **, size_t *, unsigned short *, ...);
395 extern void GOACC_parallel (int, void (*) (void *), size_t, void **, size_t *,
396 unsigned short *, int, int, int, int, int, ...);
397 extern void GOACC_data_start (int, size_t, void **, size_t *,
398 unsigned short *);
399 extern void GOACC_data_end (void);
400 extern void GOACC_update (int, size_t, void **, size_t *,
401 unsigned short *, int, int, ...);
402 extern int GOACC_get_num_threads (void);
403 extern int GOACC_get_thread_num (void);
405 #endif /* LIBGOMP_G_H */