14#ifndef LLVM_CLANG_BASIC_OPENACCKINDS_H
15#define LLVM_CLANG_BASIC_OPENACCKINDS_H
18#include "llvm/Support/ErrorHandling.h"
19#include "llvm/Support/raw_ostream.h"
69template <
typename StreamTy>
74 return Out <<
"parallel";
77 return Out <<
"serial";
80 return Out <<
"kernels";
86 return Out <<
"enter data";
89 return Out <<
"exit data";
92 return Out <<
"host_data";
98 return Out <<
"cache";
101 return Out <<
"parallel loop";
104 return Out <<
"serial loop";
107 return Out <<
"kernels loop";
110 return Out <<
"atomic";
113 return Out <<
"declare";
116 return Out <<
"init";
119 return Out <<
"shutdown";
125 return Out <<
"update";
128 return Out <<
"wait";
131 return Out <<
"routine";
134 return Out <<
"<invalid>";
136 llvm_unreachable(
"Uncovered directive kind");
293template <
typename StreamTy>
297 return Out <<
"finalize";
300 return Out <<
"if_present";
306 return Out <<
"independent";
309 return Out <<
"auto";
312 return Out <<
"worker";
315 return Out <<
"vector";
318 return Out <<
"nohost";
321 return Out <<
"default";
327 return Out <<
"self";
330 return Out <<
"copy";
333 return Out <<
"pcopy";
336 return Out <<
"present_or_copy";
339 return Out <<
"use_device";
342 return Out <<
"attach";
345 return Out <<
"delete";
348 return Out <<
"detach";
351 return Out <<
"device";
354 return Out <<
"deviceptr";
357 return Out <<
"device_resident";
360 return Out <<
"firstprivate";
363 return Out <<
"host";
366 return Out <<
"link";
369 return Out <<
"no_create";
372 return Out <<
"present";
375 return Out <<
"private";
378 return Out <<
"copyout";
381 return Out <<
"pcopyout";
384 return Out <<
"present_or_copyout";
387 return Out <<
"copyin";
390 return Out <<
"pcopyin";
393 return Out <<
"present_or_copyin";
396 return Out <<
"create";
399 return Out <<
"pcreate";
402 return Out <<
"present_or_create";
405 return Out <<
"reduction";
408 return Out <<
"collapse";
411 return Out <<
"bind";
414 return Out <<
"vector_length";
417 return Out <<
"num_gangs";
420 return Out <<
"num_workers";
423 return Out <<
"device_num";
426 return Out <<
"default_async";
429 return Out <<
"device_type";
432 return Out <<
"dtype";
435 return Out <<
"async";
438 return Out <<
"tile";
441 return Out <<
"gang";
444 return Out <<
"wait";
447 return Out <<
"<invalid>";
449 llvm_unreachable(
"Uncovered clause kind");
471template <
typename StreamTy>
476 return Out <<
"none";
478 return Out <<
"present";
480 return Out <<
"<invalid>";
482 llvm_unreachable(
"Unknown OpenACCDefaultClauseKind enum");
518template <
typename StreamTy>
541 return Out <<
"<invalid>";
543 llvm_unreachable(
"Unknown reduction operator kind");
Defines the Diagnostic-related interfaces.
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
The JSON file list parser is used to communicate input to InstallAPI.
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'.
@ 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.
bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)
StreamTy & printOpenACCDefaultClauseKind(StreamTy &Out, OpenACCDefaultClauseKind K)
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
@ Invalid
Not a valid option.
@ Present
'present' option.
StreamTy & printOpenACCClauseKind(StreamTy &Out, OpenACCClauseKind K)
StreamTy & printOpenACCDirectiveKind(StreamTy &Out, OpenACCDirectiveKind K)
@ Invalid
Invalid Reduction Clause Kind.
@ None
The alignment was not explicit in code.
StreamTy & printOpenACCReductionOperator(StreamTy &Out, OpenACCReductionOperator Op)