2015-02-22 Arnaud Charlet <charlet@adacore.com>
[official-gcc.git] / libgomp / libgomp_g.h
blob5e88d451b9ab80e8e3a7f17cd49950885675441c
1 /* Copyright (C) 2005-2015 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>
35 /* barrier.c */
37 extern void GOMP_barrier (void);
38 extern bool GOMP_barrier_cancel (void);
40 /* critical.c */
42 extern void GOMP_critical_start (void);
43 extern void GOMP_critical_end (void);
44 extern void GOMP_critical_name_start (void **);
45 extern void GOMP_critical_name_end (void **);
46 extern void GOMP_atomic_start (void);
47 extern void GOMP_atomic_end (void);
49 /* loop.c */
51 extern bool GOMP_loop_static_start (long, long, long, long, long *, long *);
52 extern bool GOMP_loop_dynamic_start (long, long, long, long, long *, long *);
53 extern bool GOMP_loop_guided_start (long, long, long, long, long *, long *);
54 extern bool GOMP_loop_runtime_start (long, long, long, long *, long *);
56 extern bool GOMP_loop_ordered_static_start (long, long, long, long,
57 long *, long *);
58 extern bool GOMP_loop_ordered_dynamic_start (long, long, long, long,
59 long *, long *);
60 extern bool GOMP_loop_ordered_guided_start (long, long, long, long,
61 long *, long *);
62 extern bool GOMP_loop_ordered_runtime_start (long, long, long, long *, long *);
64 extern bool GOMP_loop_static_next (long *, long *);
65 extern bool GOMP_loop_dynamic_next (long *, long *);
66 extern bool GOMP_loop_guided_next (long *, long *);
67 extern bool GOMP_loop_runtime_next (long *, long *);
69 extern bool GOMP_loop_ordered_static_next (long *, long *);
70 extern bool GOMP_loop_ordered_dynamic_next (long *, long *);
71 extern bool GOMP_loop_ordered_guided_next (long *, long *);
72 extern bool GOMP_loop_ordered_runtime_next (long *, long *);
74 extern void GOMP_parallel_loop_static_start (void (*)(void *), void *,
75 unsigned, long, long, long, long);
76 extern void GOMP_parallel_loop_dynamic_start (void (*)(void *), void *,
77 unsigned, long, long, long, long);
78 extern void GOMP_parallel_loop_guided_start (void (*)(void *), void *,
79 unsigned, long, long, long, long);
80 extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
81 unsigned, long, long, long);
82 extern void GOMP_parallel_loop_static (void (*)(void *), void *,
83 unsigned, long, long, long, long,
84 unsigned);
85 extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
86 unsigned, long, long, long, long,
87 unsigned);
88 extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
89 unsigned, long, long, long, long,
90 unsigned);
91 extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
92 unsigned, long, long, long,
93 unsigned);
95 extern void GOMP_loop_end (void);
96 extern void GOMP_loop_end_nowait (void);
97 extern bool GOMP_loop_end_cancel (void);
99 /* loop_ull.c */
101 extern bool GOMP_loop_ull_static_start (bool, unsigned long long,
102 unsigned long long,
103 unsigned long long,
104 unsigned long long,
105 unsigned long long *,
106 unsigned long long *);
107 extern bool GOMP_loop_ull_dynamic_start (bool, unsigned long long,
108 unsigned long long,
109 unsigned long long,
110 unsigned long long,
111 unsigned long long *,
112 unsigned long long *);
113 extern bool GOMP_loop_ull_guided_start (bool, unsigned long long,
114 unsigned long long,
115 unsigned long long,
116 unsigned long long,
117 unsigned long long *,
118 unsigned long long *);
119 extern bool GOMP_loop_ull_runtime_start (bool, unsigned long long,
120 unsigned long long,
121 unsigned long long,
122 unsigned long long *,
123 unsigned long long *);
125 extern bool GOMP_loop_ull_ordered_static_start (bool, unsigned long long,
126 unsigned long long,
127 unsigned long long,
128 unsigned long long,
129 unsigned long long *,
130 unsigned long long *);
131 extern bool GOMP_loop_ull_ordered_dynamic_start (bool, unsigned long long,
132 unsigned long long,
133 unsigned long long,
134 unsigned long long,
135 unsigned long long *,
136 unsigned long long *);
137 extern bool GOMP_loop_ull_ordered_guided_start (bool, unsigned long long,
138 unsigned long long,
139 unsigned long long,
140 unsigned long long,
141 unsigned long long *,
142 unsigned long long *);
143 extern bool GOMP_loop_ull_ordered_runtime_start (bool, unsigned long long,
144 unsigned long long,
145 unsigned long long,
146 unsigned long long *,
147 unsigned long long *);
149 extern bool GOMP_loop_ull_static_next (unsigned long long *,
150 unsigned long long *);
151 extern bool GOMP_loop_ull_dynamic_next (unsigned long long *,
152 unsigned long long *);
153 extern bool GOMP_loop_ull_guided_next (unsigned long long *,
154 unsigned long long *);
155 extern bool GOMP_loop_ull_runtime_next (unsigned long long *,
156 unsigned long long *);
158 extern bool GOMP_loop_ull_ordered_static_next (unsigned long long *,
159 unsigned long long *);
160 extern bool GOMP_loop_ull_ordered_dynamic_next (unsigned long long *,
161 unsigned long long *);
162 extern bool GOMP_loop_ull_ordered_guided_next (unsigned long long *,
163 unsigned long long *);
164 extern bool GOMP_loop_ull_ordered_runtime_next (unsigned long long *,
165 unsigned long long *);
167 /* ordered.c */
169 extern void GOMP_ordered_start (void);
170 extern void GOMP_ordered_end (void);
172 /* parallel.c */
174 extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
175 extern void GOMP_parallel_end (void);
176 extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
177 extern bool GOMP_cancel (int, bool);
178 extern bool GOMP_cancellation_point (int);
180 /* task.c */
182 extern void GOMP_task (void (*) (void *), void *, void (*) (void *, void *),
183 long, long, bool, unsigned, void **);
184 extern void GOMP_taskwait (void);
185 extern void GOMP_taskyield (void);
186 extern void GOMP_taskgroup_start (void);
187 extern void GOMP_taskgroup_end (void);
189 /* sections.c */
191 extern unsigned GOMP_sections_start (unsigned);
192 extern unsigned GOMP_sections_next (void);
193 extern void GOMP_parallel_sections_start (void (*) (void *), void *,
194 unsigned, unsigned);
195 extern void GOMP_parallel_sections (void (*) (void *), void *,
196 unsigned, unsigned, unsigned);
197 extern void GOMP_sections_end (void);
198 extern void GOMP_sections_end_nowait (void);
199 extern bool GOMP_sections_end_cancel (void);
201 /* single.c */
203 extern bool GOMP_single_start (void);
204 extern void *GOMP_single_copy_start (void);
205 extern void GOMP_single_copy_end (void *);
207 /* target.c */
209 extern void GOMP_target (int, void (*) (void *), const void *,
210 size_t, void **, size_t *, unsigned char *);
211 extern void GOMP_target_data (int, const void *,
212 size_t, void **, size_t *, unsigned char *);
213 extern void GOMP_target_end_data (void);
214 extern void GOMP_target_update (int, const void *,
215 size_t, void **, size_t *, unsigned char *);
216 extern void GOMP_teams (unsigned int, unsigned int);
218 /* oacc-parallel.c */
220 extern void GOACC_data_start (int, size_t, void **, size_t *,
221 unsigned short *);
222 extern void GOACC_data_end (void);
223 extern void GOACC_enter_exit_data (int, size_t, void **,
224 size_t *, unsigned short *, int, int, ...);
225 extern void GOACC_parallel (int, void (*) (void *), size_t,
226 void **, size_t *, unsigned short *, int, int, int,
227 int, int, ...);
228 extern void GOACC_update (int, size_t, void **, size_t *,
229 unsigned short *, int, int, ...);
230 extern void GOACC_wait (int, int, ...);
231 extern int GOACC_get_num_threads (void);
232 extern int GOACC_get_thread_num (void);
234 #endif /* LIBGOMP_G_H */