14#ifndef LLVM_CLANG_BASIC_OPENACCKINDS_H
15#define LLVM_CLANG_BASIC_OPENACCKINDS_H
18#include "llvm/ADT/BitmaskEnum.h"
19#include "llvm/Support/ErrorHandling.h"
20#include "llvm/Support/raw_ostream.h"
72template <
typename StreamTy>
77 return Out <<
"parallel";
80 return Out <<
"serial";
83 return Out <<
"kernels";
89 return Out <<
"enter data";
92 return Out <<
"exit data";
95 return Out <<
"host_data";
101 return Out <<
"cache";
104 return Out <<
"parallel loop";
107 return Out <<
"serial loop";
110 return Out <<
"kernels loop";
113 return Out <<
"atomic";
116 return Out <<
"declare";
119 return Out <<
"init";
122 return Out <<
"shutdown";
128 return Out <<
"update";
131 return Out <<
"wait";
134 return Out <<
"routine";
137 return Out <<
"<invalid>";
139 llvm_unreachable(
"Uncovered directive kind");
180template <
typename StreamTy>
184 return Out <<
"read";
186 return Out <<
"write";
188 return Out <<
"update";
190 return Out <<
"capture";
192 return Out <<
"<none>";
194 llvm_unreachable(
"unknown atomic kind");
342template <
typename StreamTy>
346 return Out <<
"finalize";
349 return Out <<
"if_present";
355 return Out <<
"independent";
358 return Out <<
"auto";
361 return Out <<
"worker";
364 return Out <<
"vector";
367 return Out <<
"nohost";
370 return Out <<
"default";
376 return Out <<
"self";
379 return Out <<
"copy";
382 return Out <<
"pcopy";
385 return Out <<
"present_or_copy";
388 return Out <<
"use_device";
391 return Out <<
"attach";
394 return Out <<
"delete";
397 return Out <<
"detach";
400 return Out <<
"device";
403 return Out <<
"deviceptr";
406 return Out <<
"device_resident";
409 return Out <<
"firstprivate";
412 return Out <<
"host";
415 return Out <<
"link";
418 return Out <<
"no_create";
421 return Out <<
"present";
424 return Out <<
"private";
427 return Out <<
"copyout";
430 return Out <<
"pcopyout";
433 return Out <<
"present_or_copyout";
436 return Out <<
"copyin";
439 return Out <<
"pcopyin";
442 return Out <<
"present_or_copyin";
445 return Out <<
"create";
448 return Out <<
"pcreate";
451 return Out <<
"present_or_create";
454 return Out <<
"reduction";
457 return Out <<
"collapse";
460 return Out <<
"bind";
463 return Out <<
"vector_length";
466 return Out <<
"num_gangs";
469 return Out <<
"num_workers";
472 return Out <<
"device_num";
475 return Out <<
"default_async";
478 return Out <<
"device_type";
481 return Out <<
"dtype";
484 return Out <<
"async";
487 return Out <<
"tile";
490 return Out <<
"gang";
493 return Out <<
"wait";
496 llvm_unreachable(
"Shortloop shouldn't be generated in clang");
499 return Out <<
"<invalid>";
501 llvm_unreachable(
"Uncovered clause kind");
523template <
typename StreamTy>
528 return Out <<
"none";
530 return Out <<
"present";
532 return Out <<
"<invalid>";
534 llvm_unreachable(
"Unknown OpenACCDefaultClauseKind enum");
570template <
typename StreamTy>
593 return Out <<
"<invalid>";
595 llvm_unreachable(
"Unknown reduction operator kind");
615template <
typename StreamTy>
623 return Out <<
"static";
625 llvm_unreachable(
"unknown gang kind");
657template <
typename StreamTy>
661 return Out <<
"<invalid>";
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.
@ Invalid
Invalid Reduction Clause Kind.
bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)
bool isOpenACCCombinedDirectiveKind(OpenACCDirectiveKind K)
bool isOpenACCDataDirectiveKind(OpenACCDirectiveKind K)
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
OpenACCClauseKind
Represents the kind of an OpenACC clause.
@ Auto
'auto' clause, allowed on 'loop' directives.
@ Bind
'bind' clause, allowed on routine constructs.
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
@ Wait
'wait' clause, allowed on Compute, Data, 'update', and Combined constructs.
@ DevicePtr
'deviceptr' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ PCopyOut
'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
@ VectorLength
'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...
@ Async
'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.
@ PresentOrCreate
'create' clause alias 'present_or_create'.
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
@ NoHost
'nohost' clause, allowed on 'routine' directives.
@ PresentOrCopy
'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
@ Private
'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel loop', and 'serial loop' constru...
@ Invalid
Represents an invalid clause, for the purposes of parsing.
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Copy
'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ DeviceType
'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown', 'set', update',...
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
@ Attach
'attach' clause, allowed on Compute and Combined constructs, plus 'data' and 'enter data'.
@ Shortloop
'shortloop' is represented in the ACC.td file, but isn't present in the standard.
@ NumGangs
'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
@ Default
'default' clause, allowed on parallel, serial, kernel (and compound) constructs.
@ UseDevice
'use_device' clause, allowed on 'host_data' construct.
@ NoCreate
'no_create' clause, allowed on allowed on Compute and Combined constructs, plus 'data'.
@ PresentOrCopyOut
'copyout' clause alias 'present_or_copyout'.
@ Link
'link' clause, allowed on 'declare' construct.
@ Reduction
'reduction' clause, allowed on Parallel, Serial, Loop, and the combined constructs.
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
@ CopyOut
'copyout' clause, allowed on Compute and Combined constructs, plus 'data', 'exit data',...
@ Seq
'seq' clause, allowed on 'loop' and 'routine' directives.
@ FirstPrivate
'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop', and 'serial loop' constructs...
@ Host
'host' clause, allowed on 'update' construct.
@ PCopy
'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
@ Tile
'tile' clause, allowed on 'loop' and Combined constructs.
@ PCopyIn
'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
@ DeviceResident
'device_resident' clause, allowed on the 'declare' construct.
@ PCreate
'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
@ Present
'present' clause, allowed on Compute and Combined constructs, plus 'data' and 'declare'.
@ DType
'dtype' clause, an alias for 'device_type', stored separately for diagnostic purposes.
@ CopyIn
'copyin' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ Device
'device' clause, allowed on the 'update' construct.
@ Independent
'independent' clause, allowed on 'loop' directives.
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
@ IfPresent
'if_present' clause, allowed on 'host_data' and 'update' directives.
@ Detach
'detach' clause, allowed on the 'exit data' construct.
@ Delete
'delete' clause, allowed on the 'exit data' construct.
@ PresentOrCopyIn
'copyin' clause alias 'present_or_copyin'.
@ Finalize
'finalize' clause, allowed on 'exit data' directive.
StreamTy & printOpenACCDefaultClauseKind(StreamTy &Out, OpenACCDefaultClauseKind K)
@ Invalid
Not a valid option.
@ Present
'present' option.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
StreamTy & printOpenACCGangKind(StreamTy &Out, OpenACCGangKind GK)
StreamTy & printOpenACCClauseKind(StreamTy &Out, OpenACCClauseKind K)
StreamTy & printOpenACCModifierKind(StreamTy &Out, OpenACCModifierKind Mods)
StreamTy & printOpenACCDirectiveKind(StreamTy &Out, OpenACCDirectiveKind K)
StreamTy & printOpenACCAtomicKind(StreamTy &Out, OpenACCAtomicKind AK)
bool isOpenACCModifierBitSet(OpenACCModifierKind List, OpenACCModifierKind Bit)
@ None
The alignment was not explicit in code.
StreamTy & printOpenACCReductionOperator(StreamTy &Out, OpenACCReductionOperator Op)