1 /* Copyright (C) 2005-2024 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
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)
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
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. */
38 extern void GOMP_barrier (void);
39 extern bool GOMP_barrier_cancel (void);
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);
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,
58 extern bool GOMP_loop_nonmonotonic_guided_start (long, long, long, long,
60 extern bool GOMP_loop_nonmonotonic_runtime_start (long, long, long,
62 extern bool GOMP_loop_maybe_nonmonotonic_runtime_start (long, 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,
69 extern bool GOMP_loop_ordered_dynamic_start (long, long, long, long,
71 extern bool GOMP_loop_ordered_guided_start (long, long, 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 *,
93 extern bool GOMP_loop_doacross_dynamic_start (unsigned, long *, long, long *,
95 extern bool GOMP_loop_doacross_guided_start (unsigned, long *, long, long *,
97 extern bool GOMP_loop_doacross_runtime_start (unsigned, long *, 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,
113 extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
114 unsigned, long, long, long, long,
116 extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
117 unsigned, long, long, long, long,
119 extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
120 unsigned, long, long, long,
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,
131 extern void GOMP_parallel_loop_maybe_nonmonotonic_runtime (void (*)(void *),
136 extern void GOMP_loop_end (void);
137 extern void GOMP_loop_end_nowait (void);
138 extern bool GOMP_loop_end_cancel (void);
142 extern bool GOMP_loop_ull_static_start (bool, unsigned long long,
146 unsigned long long *,
147 unsigned long long *);
148 extern bool GOMP_loop_ull_dynamic_start (bool, unsigned long long,
152 unsigned long long *,
153 unsigned long long *);
154 extern bool GOMP_loop_ull_guided_start (bool, unsigned long long,
158 unsigned long long *,
159 unsigned long long *);
160 extern bool GOMP_loop_ull_runtime_start (bool, unsigned long long,
163 unsigned long long *,
164 unsigned long long *);
165 extern bool GOMP_loop_ull_nonmonotonic_dynamic_start (bool, unsigned long long,
169 unsigned long long *,
170 unsigned long long *);
171 extern bool GOMP_loop_ull_nonmonotonic_guided_start (bool, unsigned long long,
175 unsigned long long *,
176 unsigned long long *);
177 extern bool GOMP_loop_ull_nonmonotonic_runtime_start (bool, unsigned long long,
180 unsigned long long *,
181 unsigned long long *);
182 extern bool GOMP_loop_ull_maybe_nonmonotonic_runtime_start (bool,
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,
197 unsigned long long *,
198 unsigned long long *);
199 extern bool GOMP_loop_ull_ordered_dynamic_start (bool, unsigned long long,
203 unsigned long long *,
204 unsigned long long *);
205 extern bool GOMP_loop_ull_ordered_guided_start (bool, unsigned long long,
209 unsigned long long *,
210 unsigned long long *);
211 extern bool GOMP_loop_ull_ordered_runtime_start (bool, unsigned long long,
214 unsigned long long *,
215 unsigned long long *);
216 extern bool GOMP_loop_ull_ordered_start (bool, unsigned long long,
218 unsigned long 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 *,
253 unsigned long long *,
254 unsigned long long *);
255 extern bool GOMP_loop_ull_doacross_dynamic_start (unsigned,
256 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 *,
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 **);
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, ...);
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,
291 extern bool GOMP_cancel (int, bool);
292 extern bool GOMP_cancellation_point (int);
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,
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);
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 *,
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);
332 extern bool GOMP_single_start (void);
333 extern void *GOMP_single_copy_start (void);
334 extern void GOMP_single_copy_end (void *);
338 extern void GOMP_scope_start (uintptr_t *);
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 *,
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,
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 *);
364 extern void GOMP_teams_reg (void (*) (void *), void *, unsigned, unsigned,
369 extern void GOMP_add_alloc (void *);
370 extern bool GOMP_is_alloc (void *);
372 extern void *GOMP_alloc (size_t, size_t, uintptr_t);
373 extern void GOMP_free (void *, uintptr_t);
377 extern void GOMP_warning (const char *, size_t);
378 extern void GOMP_error (const char *, size_t);
382 extern void GOACC_wait (int, int, ...);
386 extern void GOACC_enter_exit_data (int, size_t, void **, size_t *,
387 unsigned short *, int, int, ...);
388 extern void GOACC_enter_data (int, size_t, void **, size_t *,
389 unsigned short *, int, int, ...);
390 extern void GOACC_exit_data (int, size_t, void **, size_t *,
391 unsigned short *, int, int, ...);
392 extern void GOACC_declare (int, size_t, void **, size_t *, unsigned short *);
394 /* oacc-parallel.c */
396 extern void GOACC_parallel_keyed (int, void (*) (void *), size_t,
397 void **, size_t *, unsigned short *, ...);
398 extern void GOACC_parallel (int, void (*) (void *), size_t, void **, size_t *,
399 unsigned short *, int, int, int, int, int, ...);
400 extern void GOACC_data_start (int, size_t, void **, size_t *,
402 extern void GOACC_data_end (void);
403 extern void GOACC_update (int, size_t, void **, size_t *,
404 unsigned short *, int, int, ...);
405 extern int GOACC_get_num_threads (void);
406 extern int GOACC_get_thread_num (void);
408 #endif /* LIBGOMP_G_H */