1 | #ifndef LLVM_OpenMP_INC |
2 | #define LLVM_OpenMP_INC |
3 | |
4 | #include "llvm/ADT/ArrayRef.h" |
5 | #include "llvm/ADT/BitmaskEnum.h" |
6 | #include "llvm/ADT/StringRef.h" |
7 | #include "llvm/Frontend/Directive/Spelling.h" |
8 | #include "llvm/Support/Compiler.h" |
9 | #include <cstddef> |
10 | #include <utility> |
11 | |
12 | namespace llvm { |
13 | namespace omp { |
14 | |
15 | LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); |
16 | |
17 | enum class Association { |
18 | Block, |
19 | Declaration, |
20 | Delimited, |
21 | Loop, |
22 | None, |
23 | Separating, |
24 | }; |
25 | |
26 | static constexpr std::size_t Association_enumSize = 6; |
27 | |
28 | enum class Category { |
29 | Declarative, |
30 | Executable, |
31 | Informational, |
32 | Meta, |
33 | Subsidiary, |
34 | Utility, |
35 | }; |
36 | |
37 | static constexpr std::size_t Category_enumSize = 6; |
38 | |
39 | enum class SourceLanguage : uint32_t { |
40 | C = 1U, |
41 | Fortran = 2U, |
42 | LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Fortran) |
43 | }; |
44 | |
45 | static constexpr std::size_t SourceLanguage_enumSize = 2; |
46 | |
47 | enum class Directive { |
48 | OMPD_allocate, |
49 | OMPD_allocators, |
50 | OMPD_assume, |
51 | OMPD_assumes, |
52 | OMPD_atomic, |
53 | OMPD_barrier, |
54 | OMPD_begin_assumes, |
55 | OMPD_begin_declare_target, |
56 | OMPD_begin_declare_variant, |
57 | OMPD_cancel, |
58 | OMPD_cancellation_point, |
59 | OMPD_critical, |
60 | OMPD_declare_mapper, |
61 | OMPD_declare_reduction, |
62 | OMPD_declare_simd, |
63 | OMPD_declare_target, |
64 | OMPD_declare_variant, |
65 | OMPD_depobj, |
66 | OMPD_distribute, |
67 | OMPD_distribute_parallel_do, |
68 | OMPD_distribute_parallel_do_simd, |
69 | OMPD_distribute_parallel_for, |
70 | OMPD_distribute_parallel_for_simd, |
71 | OMPD_distribute_simd, |
72 | OMPD_do, |
73 | OMPD_do_simd, |
74 | OMPD_end_assumes, |
75 | OMPD_end_declare_target, |
76 | OMPD_end_declare_variant, |
77 | OMPD_end_do, |
78 | OMPD_end_do_simd, |
79 | OMPD_end_scope, |
80 | OMPD_end_sections, |
81 | OMPD_end_single, |
82 | OMPD_end_workshare, |
83 | OMPD_error, |
84 | OMPD_flush, |
85 | OMPD_for, |
86 | OMPD_for_simd, |
87 | OMPD_interchange, |
88 | OMPD_masked_taskloop, |
89 | OMPD_masked_taskloop_simd, |
90 | OMPD_master, |
91 | OMPD_master_taskloop, |
92 | OMPD_master_taskloop_simd, |
93 | OMPD_metadirective, |
94 | OMPD_nothing, |
95 | OMPD_ordered, |
96 | OMPD_parallel, |
97 | OMPD_parallel_do, |
98 | OMPD_parallel_do_simd, |
99 | OMPD_parallel_for, |
100 | OMPD_parallel_for_simd, |
101 | OMPD_parallel_masked, |
102 | OMPD_parallel_masked_taskloop, |
103 | OMPD_parallel_masked_taskloop_simd, |
104 | OMPD_parallel_master, |
105 | OMPD_parallel_master_taskloop, |
106 | OMPD_parallel_master_taskloop_simd, |
107 | OMPD_parallel_sections, |
108 | OMPD_parallel_workshare, |
109 | OMPD_requires, |
110 | OMPD_reverse, |
111 | OMPD_scan, |
112 | OMPD_scope, |
113 | OMPD_section, |
114 | OMPD_sections, |
115 | OMPD_simd, |
116 | OMPD_single, |
117 | OMPD_stripe, |
118 | OMPD_target, |
119 | OMPD_target_data, |
120 | OMPD_target_enter_data, |
121 | OMPD_target_exit_data, |
122 | OMPD_target_parallel, |
123 | OMPD_target_parallel_do, |
124 | OMPD_target_parallel_do_simd, |
125 | OMPD_target_parallel_for, |
126 | OMPD_target_parallel_for_simd, |
127 | OMPD_target_simd, |
128 | OMPD_target_teams, |
129 | OMPD_target_teams_distribute, |
130 | OMPD_target_teams_distribute_parallel_do, |
131 | OMPD_target_teams_distribute_parallel_do_simd, |
132 | OMPD_target_teams_distribute_parallel_for, |
133 | OMPD_target_teams_distribute_parallel_for_simd, |
134 | OMPD_target_teams_distribute_simd, |
135 | OMPD_target_update, |
136 | OMPD_task, |
137 | OMPD_taskgroup, |
138 | OMPD_taskloop, |
139 | OMPD_taskloop_simd, |
140 | OMPD_taskwait, |
141 | OMPD_taskyield, |
142 | OMPD_teams, |
143 | OMPD_teams_distribute, |
144 | OMPD_teams_distribute_parallel_do, |
145 | OMPD_teams_distribute_parallel_do_simd, |
146 | OMPD_teams_distribute_parallel_for, |
147 | OMPD_teams_distribute_parallel_for_simd, |
148 | OMPD_teams_distribute_simd, |
149 | OMPD_threadprivate, |
150 | OMPD_tile, |
151 | OMPD_unknown, |
152 | OMPD_unroll, |
153 | OMPD_workshare, |
154 | OMPD_dispatch, |
155 | OMPD_interop, |
156 | OMPD_loop, |
157 | OMPD_masked, |
158 | OMPD_parallel_loop, |
159 | OMPD_target_loop, |
160 | OMPD_target_parallel_loop, |
161 | OMPD_target_teams_loop, |
162 | OMPD_teams_loop, |
163 | }; |
164 | |
165 | static constexpr std::size_t Directive_enumSize = 115; |
166 | |
167 | constexpr auto OMPD_allocate = Directive::OMPD_allocate; |
168 | constexpr auto OMPD_allocators = Directive::OMPD_allocators; |
169 | constexpr auto OMPD_assume = Directive::OMPD_assume; |
170 | constexpr auto OMPD_assumes = Directive::OMPD_assumes; |
171 | constexpr auto OMPD_atomic = Directive::OMPD_atomic; |
172 | constexpr auto OMPD_barrier = Directive::OMPD_barrier; |
173 | constexpr auto OMPD_begin_assumes = Directive::OMPD_begin_assumes; |
174 | constexpr auto OMPD_begin_declare_target = Directive::OMPD_begin_declare_target; |
175 | constexpr auto OMPD_begin_declare_variant = Directive::OMPD_begin_declare_variant; |
176 | constexpr auto OMPD_cancel = Directive::OMPD_cancel; |
177 | constexpr auto OMPD_cancellation_point = Directive::OMPD_cancellation_point; |
178 | constexpr auto OMPD_critical = Directive::OMPD_critical; |
179 | constexpr auto OMPD_declare_mapper = Directive::OMPD_declare_mapper; |
180 | constexpr auto OMPD_declare_reduction = Directive::OMPD_declare_reduction; |
181 | constexpr auto OMPD_declare_simd = Directive::OMPD_declare_simd; |
182 | constexpr auto OMPD_declare_target = Directive::OMPD_declare_target; |
183 | constexpr auto OMPD_declare_variant = Directive::OMPD_declare_variant; |
184 | constexpr auto OMPD_depobj = Directive::OMPD_depobj; |
185 | constexpr auto OMPD_distribute = Directive::OMPD_distribute; |
186 | constexpr auto OMPD_distribute_parallel_do = Directive::OMPD_distribute_parallel_do; |
187 | constexpr auto OMPD_distribute_parallel_do_simd = Directive::OMPD_distribute_parallel_do_simd; |
188 | constexpr auto OMPD_distribute_parallel_for = Directive::OMPD_distribute_parallel_for; |
189 | constexpr auto OMPD_distribute_parallel_for_simd = Directive::OMPD_distribute_parallel_for_simd; |
190 | constexpr auto OMPD_distribute_simd = Directive::OMPD_distribute_simd; |
191 | constexpr auto OMPD_do = Directive::OMPD_do; |
192 | constexpr auto OMPD_do_simd = Directive::OMPD_do_simd; |
193 | constexpr auto OMPD_end_assumes = Directive::OMPD_end_assumes; |
194 | constexpr auto OMPD_end_declare_target = Directive::OMPD_end_declare_target; |
195 | constexpr auto OMPD_end_declare_variant = Directive::OMPD_end_declare_variant; |
196 | constexpr auto OMPD_end_do = Directive::OMPD_end_do; |
197 | constexpr auto OMPD_end_do_simd = Directive::OMPD_end_do_simd; |
198 | constexpr auto OMPD_end_scope = Directive::OMPD_end_scope; |
199 | constexpr auto OMPD_end_sections = Directive::OMPD_end_sections; |
200 | constexpr auto OMPD_end_single = Directive::OMPD_end_single; |
201 | constexpr auto OMPD_end_workshare = Directive::OMPD_end_workshare; |
202 | constexpr auto OMPD_error = Directive::OMPD_error; |
203 | constexpr auto OMPD_flush = Directive::OMPD_flush; |
204 | constexpr auto OMPD_for = Directive::OMPD_for; |
205 | constexpr auto OMPD_for_simd = Directive::OMPD_for_simd; |
206 | constexpr auto OMPD_interchange = Directive::OMPD_interchange; |
207 | constexpr auto OMPD_masked_taskloop = Directive::OMPD_masked_taskloop; |
208 | constexpr auto OMPD_masked_taskloop_simd = Directive::OMPD_masked_taskloop_simd; |
209 | constexpr auto OMPD_master = Directive::OMPD_master; |
210 | constexpr auto OMPD_master_taskloop = Directive::OMPD_master_taskloop; |
211 | constexpr auto OMPD_master_taskloop_simd = Directive::OMPD_master_taskloop_simd; |
212 | constexpr auto OMPD_metadirective = Directive::OMPD_metadirective; |
213 | constexpr auto OMPD_nothing = Directive::OMPD_nothing; |
214 | constexpr auto OMPD_ordered = Directive::OMPD_ordered; |
215 | constexpr auto OMPD_parallel = Directive::OMPD_parallel; |
216 | constexpr auto OMPD_parallel_do = Directive::OMPD_parallel_do; |
217 | constexpr auto OMPD_parallel_do_simd = Directive::OMPD_parallel_do_simd; |
218 | constexpr auto OMPD_parallel_for = Directive::OMPD_parallel_for; |
219 | constexpr auto OMPD_parallel_for_simd = Directive::OMPD_parallel_for_simd; |
220 | constexpr auto OMPD_parallel_masked = Directive::OMPD_parallel_masked; |
221 | constexpr auto OMPD_parallel_masked_taskloop = Directive::OMPD_parallel_masked_taskloop; |
222 | constexpr auto OMPD_parallel_masked_taskloop_simd = Directive::OMPD_parallel_masked_taskloop_simd; |
223 | constexpr auto OMPD_parallel_master = Directive::OMPD_parallel_master; |
224 | constexpr auto OMPD_parallel_master_taskloop = Directive::OMPD_parallel_master_taskloop; |
225 | constexpr auto OMPD_parallel_master_taskloop_simd = Directive::OMPD_parallel_master_taskloop_simd; |
226 | constexpr auto OMPD_parallel_sections = Directive::OMPD_parallel_sections; |
227 | constexpr auto OMPD_parallel_workshare = Directive::OMPD_parallel_workshare; |
228 | constexpr auto OMPD_requires = Directive::OMPD_requires; |
229 | constexpr auto OMPD_reverse = Directive::OMPD_reverse; |
230 | constexpr auto OMPD_scan = Directive::OMPD_scan; |
231 | constexpr auto OMPD_scope = Directive::OMPD_scope; |
232 | constexpr auto OMPD_section = Directive::OMPD_section; |
233 | constexpr auto OMPD_sections = Directive::OMPD_sections; |
234 | constexpr auto OMPD_simd = Directive::OMPD_simd; |
235 | constexpr auto OMPD_single = Directive::OMPD_single; |
236 | constexpr auto OMPD_stripe = Directive::OMPD_stripe; |
237 | constexpr auto OMPD_target = Directive::OMPD_target; |
238 | constexpr auto OMPD_target_data = Directive::OMPD_target_data; |
239 | constexpr auto OMPD_target_enter_data = Directive::OMPD_target_enter_data; |
240 | constexpr auto OMPD_target_exit_data = Directive::OMPD_target_exit_data; |
241 | constexpr auto OMPD_target_parallel = Directive::OMPD_target_parallel; |
242 | constexpr auto OMPD_target_parallel_do = Directive::OMPD_target_parallel_do; |
243 | constexpr auto OMPD_target_parallel_do_simd = Directive::OMPD_target_parallel_do_simd; |
244 | constexpr auto OMPD_target_parallel_for = Directive::OMPD_target_parallel_for; |
245 | constexpr auto OMPD_target_parallel_for_simd = Directive::OMPD_target_parallel_for_simd; |
246 | constexpr auto OMPD_target_simd = Directive::OMPD_target_simd; |
247 | constexpr auto OMPD_target_teams = Directive::OMPD_target_teams; |
248 | constexpr auto OMPD_target_teams_distribute = Directive::OMPD_target_teams_distribute; |
249 | constexpr auto OMPD_target_teams_distribute_parallel_do = Directive::OMPD_target_teams_distribute_parallel_do; |
250 | constexpr auto OMPD_target_teams_distribute_parallel_do_simd = Directive::OMPD_target_teams_distribute_parallel_do_simd; |
251 | constexpr auto OMPD_target_teams_distribute_parallel_for = Directive::OMPD_target_teams_distribute_parallel_for; |
252 | constexpr auto OMPD_target_teams_distribute_parallel_for_simd = Directive::OMPD_target_teams_distribute_parallel_for_simd; |
253 | constexpr auto OMPD_target_teams_distribute_simd = Directive::OMPD_target_teams_distribute_simd; |
254 | constexpr auto OMPD_target_update = Directive::OMPD_target_update; |
255 | constexpr auto OMPD_task = Directive::OMPD_task; |
256 | constexpr auto OMPD_taskgroup = Directive::OMPD_taskgroup; |
257 | constexpr auto OMPD_taskloop = Directive::OMPD_taskloop; |
258 | constexpr auto OMPD_taskloop_simd = Directive::OMPD_taskloop_simd; |
259 | constexpr auto OMPD_taskwait = Directive::OMPD_taskwait; |
260 | constexpr auto OMPD_taskyield = Directive::OMPD_taskyield; |
261 | constexpr auto OMPD_teams = Directive::OMPD_teams; |
262 | constexpr auto OMPD_teams_distribute = Directive::OMPD_teams_distribute; |
263 | constexpr auto OMPD_teams_distribute_parallel_do = Directive::OMPD_teams_distribute_parallel_do; |
264 | constexpr auto OMPD_teams_distribute_parallel_do_simd = Directive::OMPD_teams_distribute_parallel_do_simd; |
265 | constexpr auto OMPD_teams_distribute_parallel_for = Directive::OMPD_teams_distribute_parallel_for; |
266 | constexpr auto OMPD_teams_distribute_parallel_for_simd = Directive::OMPD_teams_distribute_parallel_for_simd; |
267 | constexpr auto OMPD_teams_distribute_simd = Directive::OMPD_teams_distribute_simd; |
268 | constexpr auto OMPD_threadprivate = Directive::OMPD_threadprivate; |
269 | constexpr auto OMPD_tile = Directive::OMPD_tile; |
270 | constexpr auto OMPD_unknown = Directive::OMPD_unknown; |
271 | constexpr auto OMPD_unroll = Directive::OMPD_unroll; |
272 | constexpr auto OMPD_workshare = Directive::OMPD_workshare; |
273 | constexpr auto OMPD_dispatch = Directive::OMPD_dispatch; |
274 | constexpr auto OMPD_interop = Directive::OMPD_interop; |
275 | constexpr auto OMPD_loop = Directive::OMPD_loop; |
276 | constexpr auto OMPD_masked = Directive::OMPD_masked; |
277 | constexpr auto OMPD_parallel_loop = Directive::OMPD_parallel_loop; |
278 | constexpr auto OMPD_target_loop = Directive::OMPD_target_loop; |
279 | constexpr auto OMPD_target_parallel_loop = Directive::OMPD_target_parallel_loop; |
280 | constexpr auto OMPD_target_teams_loop = Directive::OMPD_target_teams_loop; |
281 | constexpr auto OMPD_teams_loop = Directive::OMPD_teams_loop; |
282 | |
283 | enum class Clause { |
284 | OMPC_absent, |
285 | OMPC_acq_rel, |
286 | OMPC_acquire, |
287 | OMPC_adjust_args, |
288 | OMPC_affinity, |
289 | OMPC_align, |
290 | OMPC_aligned, |
291 | OMPC_allocate, |
292 | OMPC_allocator, |
293 | OMPC_append_args, |
294 | OMPC_at, |
295 | OMPC_atomic_default_mem_order, |
296 | OMPC_bind, |
297 | OMPC_cancellation_construct_type, |
298 | OMPC_capture, |
299 | OMPC_collapse, |
300 | OMPC_compare, |
301 | OMPC_contains, |
302 | OMPC_copyprivate, |
303 | OMPC_copyin, |
304 | OMPC_default, |
305 | OMPC_defaultmap, |
306 | OMPC_depend, |
307 | OMPC_depobj, |
308 | OMPC_destroy, |
309 | OMPC_detach, |
310 | OMPC_device, |
311 | OMPC_device_type, |
312 | OMPC_dist_schedule, |
313 | OMPC_doacross, |
314 | OMPC_dynamic_allocators, |
315 | OMPC_enter, |
316 | OMPC_exclusive, |
317 | OMPC_fail, |
318 | OMPC_filter, |
319 | OMPC_final, |
320 | OMPC_firstprivate, |
321 | OMPC_flush, |
322 | OMPC_from, |
323 | OMPC_full, |
324 | OMPC_grainsize, |
325 | OMPC_has_device_addr, |
326 | OMPC_hint, |
327 | OMPC_holds, |
328 | OMPC_if, |
329 | OMPC_in_reduction, |
330 | OMPC_inbranch, |
331 | OMPC_inclusive, |
332 | OMPC_indirect, |
333 | OMPC_init, |
334 | OMPC_initializer, |
335 | OMPC_is_device_ptr, |
336 | OMPC_lastprivate, |
337 | OMPC_linear, |
338 | OMPC_link, |
339 | OMPC_map, |
340 | OMPC_match, |
341 | OMPC_memory_order, |
342 | OMPC_mergeable, |
343 | OMPC_message, |
344 | OMPC_nogroup, |
345 | OMPC_no_openmp, |
346 | OMPC_no_openmp_constructs, |
347 | OMPC_no_openmp_routines, |
348 | OMPC_no_parallelism, |
349 | OMPC_nowait, |
350 | OMPC_nocontext, |
351 | OMPC_nontemporal, |
352 | OMPC_notinbranch, |
353 | OMPC_novariants, |
354 | OMPC_num_tasks, |
355 | OMPC_num_teams, |
356 | OMPC_num_threads, |
357 | OMPC_ompx_attribute, |
358 | OMPC_ompx_bare, |
359 | OMPC_ompx_dyn_cgroup_mem, |
360 | OMPC_order, |
361 | OMPC_ordered, |
362 | OMPC_otherwise, |
363 | OMPC_partial, |
364 | OMPC_permutation, |
365 | OMPC_priority, |
366 | OMPC_private, |
367 | OMPC_proc_bind, |
368 | OMPC_read, |
369 | OMPC_reduction, |
370 | OMPC_relaxed, |
371 | OMPC_release, |
372 | OMPC_reverse_offload, |
373 | OMPC_safelen, |
374 | OMPC_schedule, |
375 | OMPC_self_maps, |
376 | OMPC_seq_cst, |
377 | OMPC_severity, |
378 | OMPC_shared, |
379 | OMPC_simd, |
380 | OMPC_simdlen, |
381 | OMPC_sizes, |
382 | OMPC_task_reduction, |
383 | OMPC_thread_limit, |
384 | OMPC_threadprivate, |
385 | OMPC_threads, |
386 | OMPC_to, |
387 | OMPC_unified_address, |
388 | OMPC_unified_shared_memory, |
389 | OMPC_uniform, |
390 | OMPC_unknown, |
391 | OMPC_untied, |
392 | OMPC_update, |
393 | OMPC_use, |
394 | OMPC_use_device_addr, |
395 | OMPC_use_device_ptr, |
396 | OMPC_uses_allocators, |
397 | OMPC_weak, |
398 | OMPC_when, |
399 | OMPC_write, |
400 | }; |
401 | |
402 | static constexpr std::size_t Clause_enumSize = 116; |
403 | |
404 | constexpr auto OMPC_absent = Clause::OMPC_absent; |
405 | constexpr auto OMPC_acq_rel = Clause::OMPC_acq_rel; |
406 | constexpr auto OMPC_acquire = Clause::OMPC_acquire; |
407 | constexpr auto OMPC_adjust_args = Clause::OMPC_adjust_args; |
408 | constexpr auto OMPC_affinity = Clause::OMPC_affinity; |
409 | constexpr auto OMPC_align = Clause::OMPC_align; |
410 | constexpr auto OMPC_aligned = Clause::OMPC_aligned; |
411 | constexpr auto OMPC_allocate = Clause::OMPC_allocate; |
412 | constexpr auto OMPC_allocator = Clause::OMPC_allocator; |
413 | constexpr auto OMPC_append_args = Clause::OMPC_append_args; |
414 | constexpr auto OMPC_at = Clause::OMPC_at; |
415 | constexpr auto OMPC_atomic_default_mem_order = Clause::OMPC_atomic_default_mem_order; |
416 | constexpr auto OMPC_bind = Clause::OMPC_bind; |
417 | constexpr auto OMPC_cancellation_construct_type = Clause::OMPC_cancellation_construct_type; |
418 | constexpr auto OMPC_capture = Clause::OMPC_capture; |
419 | constexpr auto OMPC_collapse = Clause::OMPC_collapse; |
420 | constexpr auto OMPC_compare = Clause::OMPC_compare; |
421 | constexpr auto OMPC_contains = Clause::OMPC_contains; |
422 | constexpr auto OMPC_copyprivate = Clause::OMPC_copyprivate; |
423 | constexpr auto OMPC_copyin = Clause::OMPC_copyin; |
424 | constexpr auto OMPC_default = Clause::OMPC_default; |
425 | constexpr auto OMPC_defaultmap = Clause::OMPC_defaultmap; |
426 | constexpr auto OMPC_depend = Clause::OMPC_depend; |
427 | constexpr auto OMPC_depobj = Clause::OMPC_depobj; |
428 | constexpr auto OMPC_destroy = Clause::OMPC_destroy; |
429 | constexpr auto OMPC_detach = Clause::OMPC_detach; |
430 | constexpr auto OMPC_device = Clause::OMPC_device; |
431 | constexpr auto OMPC_device_type = Clause::OMPC_device_type; |
432 | constexpr auto OMPC_dist_schedule = Clause::OMPC_dist_schedule; |
433 | constexpr auto OMPC_doacross = Clause::OMPC_doacross; |
434 | constexpr auto OMPC_dynamic_allocators = Clause::OMPC_dynamic_allocators; |
435 | constexpr auto OMPC_enter = Clause::OMPC_enter; |
436 | constexpr auto OMPC_exclusive = Clause::OMPC_exclusive; |
437 | constexpr auto OMPC_fail = Clause::OMPC_fail; |
438 | constexpr auto OMPC_filter = Clause::OMPC_filter; |
439 | constexpr auto OMPC_final = Clause::OMPC_final; |
440 | constexpr auto OMPC_firstprivate = Clause::OMPC_firstprivate; |
441 | constexpr auto OMPC_flush = Clause::OMPC_flush; |
442 | constexpr auto OMPC_from = Clause::OMPC_from; |
443 | constexpr auto OMPC_full = Clause::OMPC_full; |
444 | constexpr auto OMPC_grainsize = Clause::OMPC_grainsize; |
445 | constexpr auto OMPC_has_device_addr = Clause::OMPC_has_device_addr; |
446 | constexpr auto OMPC_hint = Clause::OMPC_hint; |
447 | constexpr auto OMPC_holds = Clause::OMPC_holds; |
448 | constexpr auto OMPC_if = Clause::OMPC_if; |
449 | constexpr auto OMPC_in_reduction = Clause::OMPC_in_reduction; |
450 | constexpr auto OMPC_inbranch = Clause::OMPC_inbranch; |
451 | constexpr auto OMPC_inclusive = Clause::OMPC_inclusive; |
452 | constexpr auto OMPC_indirect = Clause::OMPC_indirect; |
453 | constexpr auto OMPC_init = Clause::OMPC_init; |
454 | constexpr auto OMPC_initializer = Clause::OMPC_initializer; |
455 | constexpr auto OMPC_is_device_ptr = Clause::OMPC_is_device_ptr; |
456 | constexpr auto OMPC_lastprivate = Clause::OMPC_lastprivate; |
457 | constexpr auto OMPC_linear = Clause::OMPC_linear; |
458 | constexpr auto OMPC_link = Clause::OMPC_link; |
459 | constexpr auto OMPC_map = Clause::OMPC_map; |
460 | constexpr auto OMPC_match = Clause::OMPC_match; |
461 | constexpr auto OMPC_memory_order = Clause::OMPC_memory_order; |
462 | constexpr auto OMPC_mergeable = Clause::OMPC_mergeable; |
463 | constexpr auto OMPC_message = Clause::OMPC_message; |
464 | constexpr auto OMPC_nogroup = Clause::OMPC_nogroup; |
465 | constexpr auto OMPC_no_openmp = Clause::OMPC_no_openmp; |
466 | constexpr auto OMPC_no_openmp_constructs = Clause::OMPC_no_openmp_constructs; |
467 | constexpr auto OMPC_no_openmp_routines = Clause::OMPC_no_openmp_routines; |
468 | constexpr auto OMPC_no_parallelism = Clause::OMPC_no_parallelism; |
469 | constexpr auto OMPC_nowait = Clause::OMPC_nowait; |
470 | constexpr auto OMPC_nocontext = Clause::OMPC_nocontext; |
471 | constexpr auto OMPC_nontemporal = Clause::OMPC_nontemporal; |
472 | constexpr auto OMPC_notinbranch = Clause::OMPC_notinbranch; |
473 | constexpr auto OMPC_novariants = Clause::OMPC_novariants; |
474 | constexpr auto OMPC_num_tasks = Clause::OMPC_num_tasks; |
475 | constexpr auto OMPC_num_teams = Clause::OMPC_num_teams; |
476 | constexpr auto OMPC_num_threads = Clause::OMPC_num_threads; |
477 | constexpr auto OMPC_ompx_attribute = Clause::OMPC_ompx_attribute; |
478 | constexpr auto OMPC_ompx_bare = Clause::OMPC_ompx_bare; |
479 | constexpr auto OMPC_ompx_dyn_cgroup_mem = Clause::OMPC_ompx_dyn_cgroup_mem; |
480 | constexpr auto OMPC_order = Clause::OMPC_order; |
481 | constexpr auto OMPC_ordered = Clause::OMPC_ordered; |
482 | constexpr auto OMPC_otherwise = Clause::OMPC_otherwise; |
483 | constexpr auto OMPC_partial = Clause::OMPC_partial; |
484 | constexpr auto OMPC_permutation = Clause::OMPC_permutation; |
485 | constexpr auto OMPC_priority = Clause::OMPC_priority; |
486 | constexpr auto OMPC_private = Clause::OMPC_private; |
487 | constexpr auto OMPC_proc_bind = Clause::OMPC_proc_bind; |
488 | constexpr auto OMPC_read = Clause::OMPC_read; |
489 | constexpr auto OMPC_reduction = Clause::OMPC_reduction; |
490 | constexpr auto OMPC_relaxed = Clause::OMPC_relaxed; |
491 | constexpr auto OMPC_release = Clause::OMPC_release; |
492 | constexpr auto OMPC_reverse_offload = Clause::OMPC_reverse_offload; |
493 | constexpr auto OMPC_safelen = Clause::OMPC_safelen; |
494 | constexpr auto OMPC_schedule = Clause::OMPC_schedule; |
495 | constexpr auto OMPC_self_maps = Clause::OMPC_self_maps; |
496 | constexpr auto OMPC_seq_cst = Clause::OMPC_seq_cst; |
497 | constexpr auto OMPC_severity = Clause::OMPC_severity; |
498 | constexpr auto OMPC_shared = Clause::OMPC_shared; |
499 | constexpr auto OMPC_simd = Clause::OMPC_simd; |
500 | constexpr auto OMPC_simdlen = Clause::OMPC_simdlen; |
501 | constexpr auto OMPC_sizes = Clause::OMPC_sizes; |
502 | constexpr auto OMPC_task_reduction = Clause::OMPC_task_reduction; |
503 | constexpr auto OMPC_thread_limit = Clause::OMPC_thread_limit; |
504 | constexpr auto OMPC_threadprivate = Clause::OMPC_threadprivate; |
505 | constexpr auto OMPC_threads = Clause::OMPC_threads; |
506 | constexpr auto OMPC_to = Clause::OMPC_to; |
507 | constexpr auto OMPC_unified_address = Clause::OMPC_unified_address; |
508 | constexpr auto OMPC_unified_shared_memory = Clause::OMPC_unified_shared_memory; |
509 | constexpr auto OMPC_uniform = Clause::OMPC_uniform; |
510 | constexpr auto OMPC_unknown = Clause::OMPC_unknown; |
511 | constexpr auto OMPC_untied = Clause::OMPC_untied; |
512 | constexpr auto OMPC_update = Clause::OMPC_update; |
513 | constexpr auto OMPC_use = Clause::OMPC_use; |
514 | constexpr auto OMPC_use_device_addr = Clause::OMPC_use_device_addr; |
515 | constexpr auto OMPC_use_device_ptr = Clause::OMPC_use_device_ptr; |
516 | constexpr auto OMPC_uses_allocators = Clause::OMPC_uses_allocators; |
517 | constexpr auto OMPC_weak = Clause::OMPC_weak; |
518 | constexpr auto OMPC_when = Clause::OMPC_when; |
519 | constexpr auto OMPC_write = Clause::OMPC_write; |
520 | |
521 | enum class BindKind { |
522 | OMP_BIND_parallel=1, |
523 | OMP_BIND_teams=2, |
524 | OMP_BIND_thread=3, |
525 | }; |
526 | |
527 | constexpr auto OMP_BIND_parallel = BindKind::OMP_BIND_parallel; |
528 | constexpr auto OMP_BIND_teams = BindKind::OMP_BIND_teams; |
529 | constexpr auto OMP_BIND_thread = BindKind::OMP_BIND_thread; |
530 | |
531 | enum class CancellationConstructType { |
532 | OMP_CANCELLATION_CONSTRUCT_Parallel=1, |
533 | OMP_CANCELLATION_CONSTRUCT_Loop=2, |
534 | OMP_CANCELLATION_CONSTRUCT_Sections=3, |
535 | OMP_CANCELLATION_CONSTRUCT_Taskgroup=4, |
536 | OMP_CANCELLATION_CONSTRUCT_None=5, |
537 | }; |
538 | |
539 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Parallel = CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Parallel; |
540 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Loop = CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Loop; |
541 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Sections = CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Sections; |
542 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Taskgroup = CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Taskgroup; |
543 | constexpr auto OMP_CANCELLATION_CONSTRUCT_None = CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_None; |
544 | |
545 | enum class GrainsizeType { |
546 | OMP_GRAINSIZE_Strict=1, |
547 | OMP_GRAINSIZE_Unknown=2, |
548 | }; |
549 | |
550 | constexpr auto OMP_GRAINSIZE_Strict = GrainsizeType::OMP_GRAINSIZE_Strict; |
551 | constexpr auto OMP_GRAINSIZE_Unknown = GrainsizeType::OMP_GRAINSIZE_Unknown; |
552 | |
553 | enum class MemoryOrderKind { |
554 | OMP_MEMORY_ORDER_SeqCst=1, |
555 | OMP_MEMORY_ORDER_AcqRel=2, |
556 | OMP_MEMORY_ORDER_Acquire=3, |
557 | OMP_MEMORY_ORDER_Release=4, |
558 | OMP_MEMORY_ORDER_Relaxed=5, |
559 | OMP_MEMORY_ORDER_Default=6, |
560 | }; |
561 | |
562 | constexpr auto OMP_MEMORY_ORDER_SeqCst = MemoryOrderKind::OMP_MEMORY_ORDER_SeqCst; |
563 | constexpr auto OMP_MEMORY_ORDER_AcqRel = MemoryOrderKind::OMP_MEMORY_ORDER_AcqRel; |
564 | constexpr auto OMP_MEMORY_ORDER_Acquire = MemoryOrderKind::OMP_MEMORY_ORDER_Acquire; |
565 | constexpr auto OMP_MEMORY_ORDER_Release = MemoryOrderKind::OMP_MEMORY_ORDER_Release; |
566 | constexpr auto OMP_MEMORY_ORDER_Relaxed = MemoryOrderKind::OMP_MEMORY_ORDER_Relaxed; |
567 | constexpr auto OMP_MEMORY_ORDER_Default = MemoryOrderKind::OMP_MEMORY_ORDER_Default; |
568 | |
569 | enum class NumTasksType { |
570 | OMP_NUMTASKS_Strict=1, |
571 | OMP_NUMTASKS_Unknown=2, |
572 | }; |
573 | |
574 | constexpr auto OMP_NUMTASKS_Strict = NumTasksType::OMP_NUMTASKS_Strict; |
575 | constexpr auto OMP_NUMTASKS_Unknown = NumTasksType::OMP_NUMTASKS_Unknown; |
576 | |
577 | enum class NumThreadsType { |
578 | OMP_NUMTHREADS_Strict=1, |
579 | OMP_NUMTHREADS_Unknown=2, |
580 | }; |
581 | |
582 | constexpr auto OMP_NUMTHREADS_Strict = NumThreadsType::OMP_NUMTHREADS_Strict; |
583 | constexpr auto OMP_NUMTHREADS_Unknown = NumThreadsType::OMP_NUMTHREADS_Unknown; |
584 | |
585 | enum class OrderKind { |
586 | OMP_ORDER_unknown=2, |
587 | OMP_ORDER_concurrent=1, |
588 | }; |
589 | |
590 | constexpr auto OMP_ORDER_unknown = OrderKind::OMP_ORDER_unknown; |
591 | constexpr auto OMP_ORDER_concurrent = OrderKind::OMP_ORDER_concurrent; |
592 | |
593 | enum class ProcBindKind { |
594 | OMP_PROC_BIND_primary=5, |
595 | OMP_PROC_BIND_master=2, |
596 | OMP_PROC_BIND_close=3, |
597 | OMP_PROC_BIND_spread=4, |
598 | OMP_PROC_BIND_default=6, |
599 | OMP_PROC_BIND_unknown=7, |
600 | }; |
601 | |
602 | constexpr auto OMP_PROC_BIND_primary = ProcBindKind::OMP_PROC_BIND_primary; |
603 | constexpr auto OMP_PROC_BIND_master = ProcBindKind::OMP_PROC_BIND_master; |
604 | constexpr auto OMP_PROC_BIND_close = ProcBindKind::OMP_PROC_BIND_close; |
605 | constexpr auto OMP_PROC_BIND_spread = ProcBindKind::OMP_PROC_BIND_spread; |
606 | constexpr auto OMP_PROC_BIND_default = ProcBindKind::OMP_PROC_BIND_default; |
607 | constexpr auto OMP_PROC_BIND_unknown = ProcBindKind::OMP_PROC_BIND_unknown; |
608 | |
609 | enum class ScheduleKind { |
610 | OMP_SCHEDULE_Static=2, |
611 | OMP_SCHEDULE_Dynamic=3, |
612 | OMP_SCHEDULE_Guided=4, |
613 | OMP_SCHEDULE_Auto=5, |
614 | OMP_SCHEDULE_Runtime=6, |
615 | OMP_SCHEDULE_Default=7, |
616 | }; |
617 | |
618 | constexpr auto OMP_SCHEDULE_Static = ScheduleKind::OMP_SCHEDULE_Static; |
619 | constexpr auto OMP_SCHEDULE_Dynamic = ScheduleKind::OMP_SCHEDULE_Dynamic; |
620 | constexpr auto OMP_SCHEDULE_Guided = ScheduleKind::OMP_SCHEDULE_Guided; |
621 | constexpr auto OMP_SCHEDULE_Auto = ScheduleKind::OMP_SCHEDULE_Auto; |
622 | constexpr auto OMP_SCHEDULE_Runtime = ScheduleKind::OMP_SCHEDULE_Runtime; |
623 | constexpr auto OMP_SCHEDULE_Default = ScheduleKind::OMP_SCHEDULE_Default; |
624 | |
625 | // Enumeration helper functions |
626 | LLVM_ABI std::pair<Directive, directive::VersionRange> getOpenMPDirectiveKindAndVersions(StringRef Str); |
627 | inline Directive getOpenMPDirectiveKind(StringRef Str) { |
628 | return getOpenMPDirectiveKindAndVersions(Str).first; |
629 | } |
630 | |
631 | LLVM_ABI StringRef getOpenMPDirectiveName(Directive D, unsigned Ver = 0); |
632 | |
633 | LLVM_ABI std::pair<Clause, directive::VersionRange> getOpenMPClauseKindAndVersions(StringRef Str); |
634 | |
635 | inline Clause getOpenMPClauseKind(StringRef Str) { |
636 | return getOpenMPClauseKindAndVersions(Str).first; |
637 | } |
638 | |
639 | LLVM_ABI StringRef getOpenMPClauseName(Clause C, unsigned Ver = 0); |
640 | |
641 | /// Return true if \p C is a valid clause for \p D in version \p Version. |
642 | LLVM_ABI bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version); |
643 | |
644 | constexpr std::size_t getMaxLeafCount() { return 6; } |
645 | LLVM_ABI Association getDirectiveAssociation(Directive D); |
646 | LLVM_ABI Category getDirectiveCategory(Directive D); |
647 | LLVM_ABI SourceLanguage getDirectiveLanguages(Directive D); |
648 | LLVM_ABI BindKind getBindKind(StringRef Str); |
649 | LLVM_ABI StringRef getOpenMPBindKindName(BindKind x); |
650 | LLVM_ABI CancellationConstructType getCancellationConstructType(StringRef Str); |
651 | LLVM_ABI StringRef getOpenMPCancellationConstructTypeName(CancellationConstructType x); |
652 | LLVM_ABI GrainsizeType getGrainsizeType(StringRef Str); |
653 | LLVM_ABI StringRef getOpenMPGrainsizeTypeName(GrainsizeType x); |
654 | LLVM_ABI MemoryOrderKind getMemoryOrderKind(StringRef Str); |
655 | LLVM_ABI StringRef getOpenMPMemoryOrderKindName(MemoryOrderKind x); |
656 | LLVM_ABI NumTasksType getNumTasksType(StringRef Str); |
657 | LLVM_ABI StringRef getOpenMPNumTasksTypeName(NumTasksType x); |
658 | LLVM_ABI NumThreadsType getNumThreadsType(StringRef Str); |
659 | LLVM_ABI StringRef getOpenMPNumThreadsTypeName(NumThreadsType x); |
660 | LLVM_ABI OrderKind getOrderKind(StringRef Str); |
661 | LLVM_ABI StringRef getOpenMPOrderKindName(OrderKind x); |
662 | LLVM_ABI ProcBindKind getProcBindKind(StringRef Str); |
663 | LLVM_ABI StringRef getOpenMPProcBindKindName(ProcBindKind x); |
664 | LLVM_ABI ScheduleKind getScheduleKind(StringRef Str); |
665 | LLVM_ABI StringRef getOpenMPScheduleKindName(ScheduleKind x); |
666 | |
667 | } // namespace omp |
668 | } // namespace llvm |
669 | #endif // LLVM_OpenMP_INC |
670 | |