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");
274template <
typename StreamTy>
278 return Out <<
"finalize";
281 return Out <<
"if_present";
287 return Out <<
"independent";
290 return Out <<
"auto";
293 return Out <<
"worker";
296 return Out <<
"vector";
299 return Out <<
"nohost";
302 return Out <<
"default";
308 return Out <<
"self";
311 return Out <<
"copy";
314 return Out <<
"use_device";
317 return Out <<
"attach";
320 return Out <<
"delete";
323 return Out <<
"detach";
326 return Out <<
"device";
329 return Out <<
"deviceptr";
332 return Out <<
"device_resident";
335 return Out <<
"firstprivate";
338 return Out <<
"host";
341 return Out <<
"link";
344 return Out <<
"no_create";
347 return Out <<
"present";
350 return Out <<
"private";
353 return Out <<
"copyout";
356 return Out <<
"copyin";
359 return Out <<
"create";
362 return Out <<
"reduction";
365 return Out <<
"collapse";
368 return Out <<
"bind";
371 return Out <<
"vector_length";
374 return Out <<
"num_gangs";
377 return Out <<
"num_workers";
380 return Out <<
"device_num";
383 return Out <<
"default_async";
386 return Out <<
"device_type";
389 return Out <<
"dtype";
392 return Out <<
"async";
395 return Out <<
"tile";
398 return Out <<
"gang";
401 return Out <<
"wait";
404 return Out <<
"<invalid>";
406 llvm_unreachable(
"Uncovered clause kind");
428template <
typename StreamTy>
433 return Out <<
"none";
435 return Out <<
"present";
437 return Out <<
"<invalid>";
439 llvm_unreachable(
"Unknown OpenACCDefaultClauseKind enum");
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'.
@ 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.
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
@ NoHost
'nohost' clause, allowed on 'routine' directives.
@ 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
'copyin' 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'.
@ 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.
@ Tile
'tile' clause, allowed on 'loop' and Combined constructs.
@ DeviceResident
'device_resident' clause, allowed on the 'declare' construct.
@ 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.
@ 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)
@ None
The alignment was not explicit in code.