1//===--- OpenMPKinds.def - OpenMP directives and clauses list ---*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// This file defines the list of supported OpenMP directives and
10/// clauses.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef OPENMP_SCHEDULE_KIND
15#define OPENMP_SCHEDULE_KIND(Name)
16#endif
17#ifndef OPENMP_SCHEDULE_MODIFIER
18#define OPENMP_SCHEDULE_MODIFIER(Name)
19#endif
20#ifndef OPENMP_DEPEND_KIND
21#define OPENMP_DEPEND_KIND(Name)
22#endif
23#ifndef OPENMP_LINEAR_KIND
24#define OPENMP_LINEAR_KIND(Name)
25#endif
26#ifndef OPENMP_MAP_KIND
27#define OPENMP_MAP_KIND(Name)
28#endif
29#ifndef OPENMP_MAP_MODIFIER_KIND
30#define OPENMP_MAP_MODIFIER_KIND(Name)
31#endif
32#ifndef OPENMP_MOTION_MODIFIER_KIND
33#define OPENMP_MOTION_MODIFIER_KIND(Name)
34#endif
35#ifndef OPENMP_DIST_SCHEDULE_KIND
36#define OPENMP_DIST_SCHEDULE_KIND(Name)
37#endif
38#ifndef OPENMP_DEFAULTMAP_KIND
39#define OPENMP_DEFAULTMAP_KIND(Name)
40#endif
41#ifndef OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND
42#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name)
43#endif
44#ifndef OPENMP_ATOMIC_FAIL_MODIFIER
45#define OPENMP_ATOMIC_FAIL_MODIFIER(Name)
46#endif
47#ifndef OPENMP_AT_KIND
48#define OPENMP_AT_KIND(Name)
49#endif
50#ifndef OPENMP_SEVERITY_KIND
51#define OPENMP_SEVERITY_KIND(Name)
52#endif
53#ifndef OPENMP_DEFAULTMAP_MODIFIER
54#define OPENMP_DEFAULTMAP_MODIFIER(Name)
55#endif
56#ifndef OPENMP_DEVICE_TYPE_KIND
57#define OPENMP_DEVICE_TYPE_KIND(Name)
58#endif
59#ifndef OPENMP_LASTPRIVATE_KIND
60#define OPENMP_LASTPRIVATE_KIND(Name)
61#endif
62#ifndef OPENMP_ORDER_KIND
63#define OPENMP_ORDER_KIND(Name)
64#endif
65#ifndef OPENMP_ORDER_MODIFIER
66#define OPENMP_ORDER_MODIFIER(Name)
67#endif
68#ifndef OPENMP_DEVICE_MODIFIER
69#define OPENMP_DEVICE_MODIFIER(Name)
70#endif
71#ifndef OPENMP_REDUCTION_MODIFIER
72#define OPENMP_REDUCTION_MODIFIER(Name)
73#endif
74#ifndef OPENMP_ADJUST_ARGS_KIND
75#define OPENMP_ADJUST_ARGS_KIND(Name)
76#endif
77#ifndef OPENMP_BIND_KIND
78#define OPENMP_BIND_KIND(Name)
79#endif
80#ifndef OPENMP_GRAINSIZE_MODIFIER
81#define OPENMP_GRAINSIZE_MODIFIER(Name)
82#endif
83#ifndef OPENMP_NUMTASKS_MODIFIER
84#define OPENMP_NUMTASKS_MODIFIER(Name)
85#endif
86#ifndef OPENMP_DOACROSS_MODIFIER
87#define OPENMP_DOACROSS_MODIFIER(Name)
88#endif
89
90// Static attributes for 'schedule' clause.
91OPENMP_SCHEDULE_KIND(static)
92OPENMP_SCHEDULE_KIND(dynamic)
93OPENMP_SCHEDULE_KIND(guided)
94OPENMP_SCHEDULE_KIND(auto)
95OPENMP_SCHEDULE_KIND(runtime)
96
97// Modifiers for 'schedule' clause.
98OPENMP_SCHEDULE_MODIFIER(monotonic)
99OPENMP_SCHEDULE_MODIFIER(nonmonotonic)
100OPENMP_SCHEDULE_MODIFIER(simd)
101
102// Modifiers for 'device' clause.
103OPENMP_DEVICE_MODIFIER(ancestor)
104OPENMP_DEVICE_MODIFIER(device_num)
105
106// Static attributes for 'defaultmap' clause.
107OPENMP_DEFAULTMAP_KIND(scalar)
108OPENMP_DEFAULTMAP_KIND(aggregate)
109OPENMP_DEFAULTMAP_KIND(pointer)
110
111// Modifiers for 'defaultmap' clause.
112OPENMP_DEFAULTMAP_MODIFIER(alloc)
113OPENMP_DEFAULTMAP_MODIFIER(to)
114OPENMP_DEFAULTMAP_MODIFIER(from)
115OPENMP_DEFAULTMAP_MODIFIER(tofrom)
116OPENMP_DEFAULTMAP_MODIFIER(firstprivate)
117OPENMP_DEFAULTMAP_MODIFIER(none)
118OPENMP_DEFAULTMAP_MODIFIER(default)
119OPENMP_DEFAULTMAP_MODIFIER(present)
120
121// Static attributes for 'depend' clause.
122OPENMP_DEPEND_KIND(in)
123OPENMP_DEPEND_KIND(out)
124OPENMP_DEPEND_KIND(inout)
125OPENMP_DEPEND_KIND(mutexinoutset)
126OPENMP_DEPEND_KIND(depobj)
127OPENMP_DEPEND_KIND(source)
128OPENMP_DEPEND_KIND(sink)
129OPENMP_DEPEND_KIND(inoutset)
130OPENMP_DEPEND_KIND(outallmemory)
131OPENMP_DEPEND_KIND(inoutallmemory)
132
133// Modifiers for 'linear' clause.
134OPENMP_LINEAR_KIND(val)
135OPENMP_LINEAR_KIND(ref)
136OPENMP_LINEAR_KIND(uval)
137OPENMP_LINEAR_KIND(step)
138
139// Modifiers for 'atomic_default_mem_order' clause.
140OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(seq_cst)
141OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(acq_rel)
142OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(relaxed)
143
144// Modifiers for atomic 'fail' clause.
145OPENMP_ATOMIC_FAIL_MODIFIER(seq_cst)
146OPENMP_ATOMIC_FAIL_MODIFIER(acquire)
147OPENMP_ATOMIC_FAIL_MODIFIER(relaxed)
148
149// Modifiers for 'at' clause.
150OPENMP_AT_KIND(compilation)
151OPENMP_AT_KIND(execution)
152
153// Modifiers for 'severity' clause.
154OPENMP_SEVERITY_KIND(fatal)
155OPENMP_SEVERITY_KIND(warning)
156
157// Map types for 'map' clause.
158OPENMP_MAP_KIND(alloc)
159OPENMP_MAP_KIND(to)
160OPENMP_MAP_KIND(from)
161OPENMP_MAP_KIND(tofrom)
162OPENMP_MAP_KIND(delete)
163OPENMP_MAP_KIND(release)
164
165// Map-type-modifiers for 'map' clause.
166OPENMP_MAP_MODIFIER_KIND(always)
167OPENMP_MAP_MODIFIER_KIND(close)
168OPENMP_MAP_MODIFIER_KIND(mapper)
169OPENMP_MAP_MODIFIER_KIND(iterator)
170OPENMP_MAP_MODIFIER_KIND(present)
171// This is an OpenMP extension for the sake of OpenACC support.
172OPENMP_MAP_MODIFIER_KIND(ompx_hold)
173
174// Modifiers for 'to' or 'from' clause.
175OPENMP_MOTION_MODIFIER_KIND(mapper)
176OPENMP_MOTION_MODIFIER_KIND(present)
177
178// Static attributes for 'dist_schedule' clause.
179OPENMP_DIST_SCHEDULE_KIND(static)
180
181// Device types for 'device_type' clause.
182OPENMP_DEVICE_TYPE_KIND(host)
183OPENMP_DEVICE_TYPE_KIND(nohost)
184OPENMP_DEVICE_TYPE_KIND(any)
185
186// Type of the 'lastprivate' clause.
187OPENMP_LASTPRIVATE_KIND(conditional)
188
189// Type of the 'order' clause.
190OPENMP_ORDER_KIND(concurrent)
191
192// Modifiers for the 'order' clause.
193OPENMP_ORDER_MODIFIER(reproducible)
194OPENMP_ORDER_MODIFIER(unconstrained)
195
196// Modifiers for 'reduction' clause.
197OPENMP_REDUCTION_MODIFIER(default)
198OPENMP_REDUCTION_MODIFIER(inscan)
199OPENMP_REDUCTION_MODIFIER(task)
200
201// Adjust-op kinds for the 'adjust_args' clause.
202OPENMP_ADJUST_ARGS_KIND(nothing)
203OPENMP_ADJUST_ARGS_KIND(need_device_ptr)
204
205// Binding kinds for the 'bind' clause.
206OPENMP_BIND_KIND(teams)
207OPENMP_BIND_KIND(parallel)
208OPENMP_BIND_KIND(thread)
209
210// Modifiers for the 'grainsize' clause.
211OPENMP_GRAINSIZE_MODIFIER(strict)
212
213// Modifiers for the 'num_tasks' clause.
214OPENMP_NUMTASKS_MODIFIER(strict)
215
216// Modifiers for the 'doacross' clause.
217OPENMP_DOACROSS_MODIFIER(source)
218OPENMP_DOACROSS_MODIFIER(sink)
219OPENMP_DOACROSS_MODIFIER(sink_omp_cur_iteration)
220OPENMP_DOACROSS_MODIFIER(source_omp_cur_iteration)
221
222#undef OPENMP_NUMTASKS_MODIFIER
223#undef OPENMP_GRAINSIZE_MODIFIER
224#undef OPENMP_BIND_KIND
225#undef OPENMP_ADJUST_ARGS_KIND
226#undef OPENMP_REDUCTION_MODIFIER
227#undef OPENMP_DEVICE_MODIFIER
228#undef OPENMP_ORDER_KIND
229#undef OPENMP_ORDER_MODIFIER
230#undef OPENMP_LASTPRIVATE_KIND
231#undef OPENMP_DEVICE_TYPE_KIND
232#undef OPENMP_LINEAR_KIND
233#undef OPENMP_DEPEND_KIND
234#undef OPENMP_SCHEDULE_MODIFIER
235#undef OPENMP_SCHEDULE_KIND
236#undef OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND
237#undef OPENMP_ATOMIC_FAIL_MODIFIER
238#undef OPENMP_AT_KIND
239#undef OPENMP_SEVERITY_KIND
240#undef OPENMP_MAP_KIND
241#undef OPENMP_MAP_MODIFIER_KIND
242#undef OPENMP_MOTION_MODIFIER_KIND
243#undef OPENMP_DIST_SCHEDULE_KIND
244#undef OPENMP_DEFAULTMAP_KIND
245#undef OPENMP_DEFAULTMAP_MODIFIER
246#undef OPENMP_DOACROSS_MODIFIER
247
248