clang: include/clang/Basic/OpenACCKinds.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CLANG_BASIC_OPENACCKINDS_H
15#define LLVM_CLANG_BASIC_OPENACCKINDS_H
16
18#include "llvm/ADT/BitmaskEnum.h"
19#include "llvm/Support/ErrorHandling.h"
20#include "llvm/Support/raw_ostream.h"
21
24
25
26
27
29
33
34
35
36
41
42
45
46
50
51
53
54
56
57
58
64
65
67
68
70};
71
72template
75 switch (K) {
77 return Out << "parallel";
78
80 return Out << "serial";
81
83 return Out << "kernels";
84
86 return Out << "data";
87
89 return Out << "enter data";
90
92 return Out << "exit data";
93
95 return Out << "host_data";
96
98 return Out << "loop";
99
101 return Out << "cache";
102
104 return Out << "parallel loop";
105
107 return Out << "serial loop";
108
110 return Out << "kernels loop";
111
113 return Out << "atomic";
114
116 return Out << "declare";
117
119 return Out << "init";
120
122 return Out << "shutdown";
123
125 return Out << "set";
126
128 return Out << "update";
129
131 return Out << "wait";
132
134 return Out << "routine";
135
137 return Out << "";
138 }
139 llvm_unreachable("Uncovered directive kind");
140}
141
146
147inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
150}
151
157
163
164
171
179
180template
182 switch (AK) {
184 return Out << "read";
186 return Out << "write";
188 return Out << "update";
190 return Out << "capture";
192 return Out << "";
193 }
194 llvm_unreachable("unknown atomic kind");
195}
200inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
203}
204
205
206
208
209
211
212
214
216
218
220
221
223
225
227
228
230
232
233
235
236
238
240
241
243
244
246
248
249
251
252
254
256
258
260
262
264
265
267
269
270
272
273
275
277
278
280
282
284
285
287
289
291
293
294
296
298
299
301
302
304
305
307
308
310
311
313
315
317
319
321
323
324
326
327
329
331
332
333
334
335
337
338
340};
341
342template
344 switch (K) {
346 return Out << "finalize";
347
349 return Out << "if_present";
350
352 return Out << "seq";
353
355 return Out << "independent";
356
358 return Out << "auto";
359
361 return Out << "worker";
362
364 return Out << "vector";
365
367 return Out << "nohost";
368
370 return Out << "default";
371
373 return Out << "if";
374
376 return Out << "self";
377
379 return Out << "copy";
380
382 return Out << "pcopy";
383
385 return Out << "present_or_copy";
386
388 return Out << "use_device";
389
391 return Out << "attach";
392
394 return Out << "delete";
395
397 return Out << "detach";
398
400 return Out << "device";
401
403 return Out << "deviceptr";
404
406 return Out << "device_resident";
407
409 return Out << "firstprivate";
410
412 return Out << "host";
413
415 return Out << "link";
416
418 return Out << "no_create";
419
421 return Out << "present";
422
424 return Out << "private";
425
427 return Out << "copyout";
428
430 return Out << "pcopyout";
431
433 return Out << "present_or_copyout";
434
436 return Out << "copyin";
437
439 return Out << "pcopyin";
440
442 return Out << "present_or_copyin";
443
445 return Out << "create";
446
448 return Out << "pcreate";
449
451 return Out << "present_or_create";
452
454 return Out << "reduction";
455
457 return Out << "collapse";
458
460 return Out << "bind";
461
463 return Out << "vector_length";
464
466 return Out << "num_gangs";
467
469 return Out << "num_workers";
470
472 return Out << "device_num";
473
475 return Out << "default_async";
476
478 return Out << "device_type";
479
481 return Out << "dtype";
482
484 return Out << "async";
485
487 return Out << "tile";
488
490 return Out << "gang";
491
493 return Out << "wait";
494
496 llvm_unreachable("Shortloop shouldn't be generated in clang");
497 [[fallthrough]];
499 return Out << "";
500 }
501 llvm_unreachable("Uncovered clause kind");
502}
503
508
509inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
512}
513
522
523template
526 switch (K) {
528 return Out << "none";
530 return Out << "present";
532 return Out << "";
533 }
534 llvm_unreachable("Unknown OpenACCDefaultClauseKind enum");
535}
536
541
542inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
545}
546
548
550
552
554
556
558
560
562
564
566
568};
569
570template
573 switch (Op) {
575 return Out << "+";
577 return Out << "*";
579 return Out << "max";
581 return Out << "min";
583 return Out << "&";
585 return Out << "|";
587 return Out << "^";
589 return Out << "&&";
591 return Out << "||";
593 return Out << "";
594 }
595 llvm_unreachable("Unknown reduction operator kind");
596}
601inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
604}
605
614
615template
617 switch (GK) {
619 return Out << "num";
621 return Out << "dim";
623 return Out << "static";
624 }
625 llvm_unreachable("unknown gang kind");
626}
631inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
634}
635
636
637
638
639
640
651
656
657template
661 return Out << "";
662
663 bool First = true;
664
666 Out << "always";
668 }
669
672 Out << ", ";
673 Out << "alwaysin";
675 }
676
679 Out << ", ";
680 Out << "alwaysout";
682 }
683
686 Out << ", ";
687 Out << "readonly";
689 }
690
693 Out << ", ";
694 Out << "zero";
696 }
697
700 Out << ", ";
701 Out << "capture";
703 }
704 return Out;
705}
710inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
713}
714}
715
716#endif
Defines the Diagnostic-related interfaces.
@ LLVM_MARK_AS_BITMASK_ENUM
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
The JSON file list parser is used to communicate input to InstallAPI.
OpenACCDirectiveKind
Definition OpenACCKinds.h:28
@ Update
Definition OpenACCKinds.h:62
@ Routine
Definition OpenACCKinds.h:66
@ Wait
Definition OpenACCKinds.h:63
@ Shutdown
Definition OpenACCKinds.h:60
@ Declare
Definition OpenACCKinds.h:55
@ SerialLoop
Definition OpenACCKinds.h:48
@ Invalid
Definition OpenACCKinds.h:69
@ Serial
Definition OpenACCKinds.h:31
@ Atomic
Definition OpenACCKinds.h:52
@ KernelsLoop
Definition OpenACCKinds.h:49
@ Set
Definition OpenACCKinds.h:61
@ EnterData
Definition OpenACCKinds.h:38
@ HostData
Definition OpenACCKinds.h:40
@ Loop
Definition OpenACCKinds.h:43
@ Init
Definition OpenACCKinds.h:59
@ Parallel
Definition OpenACCKinds.h:30
@ Cache
Definition OpenACCKinds.h:44
@ ParallelLoop
Definition OpenACCKinds.h:47
@ Kernels
Definition OpenACCKinds.h:32
@ ExitData
Definition OpenACCKinds.h:39
@ Data
Definition OpenACCKinds.h:37
OpenACCReductionOperator
Definition OpenACCKinds.h:547
@ Multiplication
'*'.
Definition OpenACCKinds.h:551
@ Or
'||'.
Definition OpenACCKinds.h:565
@ Invalid
Invalid Reduction Clause Kind.
Definition OpenACCKinds.h:567
@ BitwiseAnd
'&'.
Definition OpenACCKinds.h:557
@ Max
'max'.
Definition OpenACCKinds.h:553
@ Min
'min'.
Definition OpenACCKinds.h:555
@ Addition
'+'.
Definition OpenACCKinds.h:549
@ BitwiseOr
'|'.
Definition OpenACCKinds.h:559
@ And
'&&'.
Definition OpenACCKinds.h:563
@ BitwiseXOr
'^'.
Definition OpenACCKinds.h:561
bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)
Definition OpenACCKinds.h:152
OpenACCAtomicKind
Definition OpenACCKinds.h:172
@ Update
Definition OpenACCKinds.h:175
@ Write
Definition OpenACCKinds.h:174
@ Capture
Definition OpenACCKinds.h:176
@ None
Definition OpenACCKinds.h:177
@ Read
Definition OpenACCKinds.h:173
bool isOpenACCCombinedDirectiveKind(OpenACCDirectiveKind K)
Definition OpenACCKinds.h:158
OpenACCModifierKind
Definition OpenACCKinds.h:641
@ Readonly
Definition OpenACCKinds.h:644
@ AlwaysIn
Definition OpenACCKinds.h:645
@ Capture
Definition OpenACCKinds.h:647
@ Invalid
Definition OpenACCKinds.h:642
@ AlwaysOut
Definition OpenACCKinds.h:646
@ Always
Definition OpenACCKinds.h:648
@ Zero
Definition OpenACCKinds.h:643
bool isOpenACCDataDirectiveKind(OpenACCDirectiveKind K)
Definition OpenACCKinds.h:165
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
OpenACCClauseKind
Represents the kind of an OpenACC clause.
Definition OpenACCKinds.h:207
@ Auto
'auto' clause, allowed on 'loop' directives.
Definition OpenACCKinds.h:215
@ Bind
'bind' clause, allowed on routine constructs.
Definition OpenACCKinds.h:217
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
Definition OpenACCKinds.h:281
@ Wait
'wait' clause, allowed on Compute, Data, 'update', and Combined constructs.
Definition OpenACCKinds.h:328
@ DevicePtr
'deviceptr' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
Definition OpenACCKinds.h:266
@ PCopyOut
'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
Definition OpenACCKinds.h:239
@ VectorLength
'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...
Definition OpenACCKinds.h:325
@ Async
'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.
Definition OpenACCKinds.h:210
@ PresentOrCreate
'create' clause alias 'present_or_create'.
Definition OpenACCKinds.h:250
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
Definition OpenACCKinds.h:219
@ NoHost
'nohost' clause, allowed on 'routine' directives.
Definition OpenACCKinds.h:297
@ PresentOrCopy
'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
Definition OpenACCKinds.h:226
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
Definition OpenACCKinds.h:263
@ Private
'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel loop', and 'serial loop' constru...
Definition OpenACCKinds.h:309
@ Invalid
Represents an invalid clause, for the purposes of parsing.
Definition OpenACCKinds.h:339
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
Definition OpenACCKinds.h:322
@ Copy
'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
Definition OpenACCKinds.h:222
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
Definition OpenACCKinds.h:330
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
Definition OpenACCKinds.h:245
@ DeviceType
'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown', 'set', update',...
Definition OpenACCKinds.h:271
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
Definition OpenACCKinds.h:255
@ Attach
'attach' clause, allowed on Compute and Combined constructs, plus 'data' and 'enter data'.
Definition OpenACCKinds.h:213
@ Shortloop
'shortloop' is represented in the ACC.td file, but isn't present in the standard.
Definition OpenACCKinds.h:336
@ NumGangs
'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs.
Definition OpenACCKinds.h:300
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
Definition OpenACCKinds.h:286
@ Default
'default' clause, allowed on parallel, serial, kernel (and compound) constructs.
Definition OpenACCKinds.h:253
@ UseDevice
'use_device' clause, allowed on 'host_data' construct.
Definition OpenACCKinds.h:320
@ NoCreate
'no_create' clause, allowed on allowed on Compute and Combined constructs, plus 'data'.
Definition OpenACCKinds.h:295
@ PresentOrCopyOut
'copyout' clause alias 'present_or_copyout'.
Definition OpenACCKinds.h:242
@ Link
'link' clause, allowed on 'declare' construct.
Definition OpenACCKinds.h:292
@ Reduction
'reduction' clause, allowed on Parallel, Serial, Loop, and the combined constructs.
Definition OpenACCKinds.h:312
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
Definition OpenACCKinds.h:314
@ CopyOut
'copyout' clause, allowed on Compute and Combined constructs, plus 'data', 'exit data',...
Definition OpenACCKinds.h:237
@ Seq
'seq' clause, allowed on 'loop' and 'routine' directives.
Definition OpenACCKinds.h:316
@ FirstPrivate
'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop', and 'serial loop' constructs...
Definition OpenACCKinds.h:279
@ Host
'host' clause, allowed on 'update' construct.
Definition OpenACCKinds.h:283
@ PCopy
'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
Definition OpenACCKinds.h:224
@ Tile
'tile' clause, allowed on 'loop' and Combined constructs.
Definition OpenACCKinds.h:318
@ PCopyIn
'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
Definition OpenACCKinds.h:231
@ DeviceResident
'device_resident' clause, allowed on the 'declare' construct.
Definition OpenACCKinds.h:268
@ PCreate
'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
Definition OpenACCKinds.h:247
@ Present
'present' clause, allowed on Compute and Combined constructs, plus 'data' and 'declare'.
Definition OpenACCKinds.h:306
@ DType
'dtype' clause, an alias for 'device_type', stored separately for diagnostic purposes.
Definition OpenACCKinds.h:274
@ CopyIn
'copyin' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
Definition OpenACCKinds.h:229
@ Device
'device' clause, allowed on the 'update' construct.
Definition OpenACCKinds.h:261
@ Independent
'independent' clause, allowed on 'loop' directives.
Definition OpenACCKinds.h:290
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
Definition OpenACCKinds.h:303
@ IfPresent
'if_present' clause, allowed on 'host_data' and 'update' directives.
Definition OpenACCKinds.h:288
@ Detach
'detach' clause, allowed on the 'exit data' construct.
Definition OpenACCKinds.h:259
@ Delete
'delete' clause, allowed on the 'exit data' construct.
Definition OpenACCKinds.h:257
@ PresentOrCopyIn
'copyin' clause alias 'present_or_copyin'.
Definition OpenACCKinds.h:234
@ Finalize
'finalize' clause, allowed on 'exit data' directive.
Definition OpenACCKinds.h:276
StreamTy & printOpenACCDefaultClauseKind(StreamTy &Out, OpenACCDefaultClauseKind K)
Definition OpenACCKinds.h:524
OpenACCDefaultClauseKind
Definition OpenACCKinds.h:514
@ Invalid
Not a valid option.
Definition OpenACCKinds.h:520
@ None
'none' option.
Definition OpenACCKinds.h:516
@ Present
'present' option.
Definition OpenACCKinds.h:518
StreamTy & printOpenACCGangKind(StreamTy &Out, OpenACCGangKind GK)
Definition OpenACCKinds.h:616
StreamTy & printOpenACCClauseKind(StreamTy &Out, OpenACCClauseKind K)
Definition OpenACCKinds.h:343
StreamTy & printOpenACCModifierKind(StreamTy &Out, OpenACCModifierKind Mods)
Definition OpenACCKinds.h:658
static OpenACCComputeConstruct * Create(const ASTContext &C, OpenACCDirectiveKind K, SourceLocation BeginLoc, SourceLocation DirectiveLoc, SourceLocation EndLoc, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
StreamTy & printOpenACCDirectiveKind(StreamTy &Out, OpenACCDirectiveKind K)
Definition OpenACCKinds.h:73
StreamTy & printOpenACCAtomicKind(StreamTy &Out, OpenACCAtomicKind AK)
Definition OpenACCKinds.h:181
bool isOpenACCModifierBitSet(OpenACCModifierKind List, OpenACCModifierKind Bit)
Definition OpenACCKinds.h:652
OpenACCGangKind
Definition OpenACCKinds.h:606
@ Static
static:
Definition OpenACCKinds.h:612
@ Dim
dim:
Definition OpenACCKinds.h:610
@ Num
num:
Definition OpenACCKinds.h:608
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ConceptReference *C)
Insertion operator for diagnostics.
@ None
The alignment was not explicit in code.
StreamTy & printOpenACCReductionOperator(StreamTy &Out, OpenACCReductionOperator Op)
Definition OpenACCKinds.h:571