clang 19.0.0git
SemaOpenACC.h
Go to the documentation of this file.
1//===----- SemaOpenACC.h - Semantic Analysis for OpenACC constructs -------===//
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 declares semantic analysis for OpenACC constructs and
10/// clauses.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_SEMA_SEMAOPENACC_H
15#define LLVM_CLANG_SEMA_SEMAOPENACC_H
16
17#include "clang/AST/DeclGroup.h"
21#include "clang/Sema/SemaBase.h"
22#include <variant>
23
24namespace clang {
25class OpenACCClause;
26
27class SemaOpenACC : public SemaBase {
28public:
29 // Redeclaration of the version in OpenACCClause.h.
30 using DeviceTypeArgument = std::pair<IdentifierInfo *, SourceLocation>;
31
32 /// A type to represent all the data for an OpenACC Clause that has been
33 /// parsed, but not yet created/semantically analyzed. This is effectively a
34 /// discriminated union on the 'Clause Kind', with all of the individual
35 /// clause details stored in a std::variant.
38 OpenACCClauseKind ClauseKind;
39 SourceRange ClauseRange;
40 SourceLocation LParenLoc;
41
42 struct DefaultDetails {
43 OpenACCDefaultClauseKind DefaultClauseKind;
44 };
45
46 struct ConditionDetails {
47 Expr *ConditionExpr;
48 };
49
50 struct IntExprDetails {
51 SmallVector<Expr *> IntExprs;
52 };
53
54 struct VarListDetails {
55 SmallVector<Expr *> VarList;
56 bool IsReadOnly;
57 bool IsZero;
58 };
59
60 struct WaitDetails {
61 Expr *DevNumExpr;
62 SourceLocation QueuesLoc;
63 SmallVector<Expr *> QueueIdExprs;
64 };
65
66 struct DeviceTypeDetails {
68 };
69 struct ReductionDetails {
71 SmallVector<Expr *> VarList;
72 };
73
74 std::variant<std::monostate, DefaultDetails, ConditionDetails,
75 IntExprDetails, VarListDetails, WaitDetails, DeviceTypeDetails,
76 ReductionDetails>
77 Details = std::monostate{};
78
79 public:
81 OpenACCClauseKind ClauseKind, SourceLocation BeginLoc)
82 : DirKind(DirKind), ClauseKind(ClauseKind), ClauseRange(BeginLoc, {}) {}
83
84 OpenACCDirectiveKind getDirectiveKind() const { return DirKind; }
85
86 OpenACCClauseKind getClauseKind() const { return ClauseKind; }
87
88 SourceLocation getBeginLoc() const { return ClauseRange.getBegin(); }
89
90 SourceLocation getLParenLoc() const { return LParenLoc; }
91
92 SourceLocation getEndLoc() const { return ClauseRange.getEnd(); }
93
95 assert(ClauseKind == OpenACCClauseKind::Default &&
96 "Parsed clause is not a default clause");
97 return std::get<DefaultDetails>(Details).DefaultClauseKind;
98 }
99
100 const Expr *getConditionExpr() const {
101 return const_cast<OpenACCParsedClause *>(this)->getConditionExpr();
102 }
103
105 assert((ClauseKind == OpenACCClauseKind::If ||
106 (ClauseKind == OpenACCClauseKind::Self &&
107 DirKind != OpenACCDirectiveKind::Update)) &&
108 "Parsed clause kind does not have a condition expr");
109
110 // 'self' has an optional ConditionExpr, so be tolerant of that. This will
111 // assert in variant otherwise.
112 if (ClauseKind == OpenACCClauseKind::Self &&
113 std::holds_alternative<std::monostate>(Details))
114 return nullptr;
115
116 return std::get<ConditionDetails>(Details).ConditionExpr;
117 }
118
119 unsigned getNumIntExprs() const {
120 assert((ClauseKind == OpenACCClauseKind::NumGangs ||
121 ClauseKind == OpenACCClauseKind::NumWorkers ||
122 ClauseKind == OpenACCClauseKind::Async ||
123 ClauseKind == OpenACCClauseKind::VectorLength) &&
124 "Parsed clause kind does not have a int exprs");
125
126 // 'async' and 'wait' have an optional IntExpr, so be tolerant of that.
127 if ((ClauseKind == OpenACCClauseKind::Async ||
128 ClauseKind == OpenACCClauseKind::Wait) &&
129 std::holds_alternative<std::monostate>(Details))
130 return 0;
131 return std::get<IntExprDetails>(Details).IntExprs.size();
132 }
133
135 assert(ClauseKind == OpenACCClauseKind::Wait &&
136 "Parsed clause kind does not have a queues location");
137
138 if (std::holds_alternative<std::monostate>(Details))
139 return SourceLocation{};
140
141 return std::get<WaitDetails>(Details).QueuesLoc;
142 }
143
145 assert(ClauseKind == OpenACCClauseKind::Wait &&
146 "Parsed clause kind does not have a device number expr");
147
148 if (std::holds_alternative<std::monostate>(Details))
149 return nullptr;
150
151 return std::get<WaitDetails>(Details).DevNumExpr;
152 }
153
155 assert(ClauseKind == OpenACCClauseKind::Wait &&
156 "Parsed clause kind does not have a queue id expr list");
157
158 if (std::holds_alternative<std::monostate>(Details))
159 return ArrayRef<Expr *>{std::nullopt};
160
161 return std::get<WaitDetails>(Details).QueueIdExprs;
162 }
163
165 assert((ClauseKind == OpenACCClauseKind::NumGangs ||
166 ClauseKind == OpenACCClauseKind::NumWorkers ||
167 ClauseKind == OpenACCClauseKind::Async ||
168 ClauseKind == OpenACCClauseKind::VectorLength) &&
169 "Parsed clause kind does not have a int exprs");
170
171 return std::get<IntExprDetails>(Details).IntExprs;
172 }
173
175 return const_cast<OpenACCParsedClause *>(this)->getIntExprs();
176 }
177
179 return std::get<ReductionDetails>(Details).Op;
180 }
181
183 assert((ClauseKind == OpenACCClauseKind::Private ||
184 ClauseKind == OpenACCClauseKind::NoCreate ||
185 ClauseKind == OpenACCClauseKind::Present ||
186 ClauseKind == OpenACCClauseKind::Copy ||
187 ClauseKind == OpenACCClauseKind::PCopy ||
188 ClauseKind == OpenACCClauseKind::PresentOrCopy ||
189 ClauseKind == OpenACCClauseKind::CopyIn ||
190 ClauseKind == OpenACCClauseKind::PCopyIn ||
192 ClauseKind == OpenACCClauseKind::CopyOut ||
193 ClauseKind == OpenACCClauseKind::PCopyOut ||
195 ClauseKind == OpenACCClauseKind::Create ||
196 ClauseKind == OpenACCClauseKind::PCreate ||
198 ClauseKind == OpenACCClauseKind::Attach ||
199 ClauseKind == OpenACCClauseKind::DevicePtr ||
200 ClauseKind == OpenACCClauseKind::Reduction ||
201 ClauseKind == OpenACCClauseKind::FirstPrivate) &&
202 "Parsed clause kind does not have a var-list");
203
204 if (ClauseKind == OpenACCClauseKind::Reduction)
205 return std::get<ReductionDetails>(Details).VarList;
206
207 return std::get<VarListDetails>(Details).VarList;
208 }
209
211 return const_cast<OpenACCParsedClause *>(this)->getVarList();
212 }
213
214 bool isReadOnly() const {
215 assert((ClauseKind == OpenACCClauseKind::CopyIn ||
216 ClauseKind == OpenACCClauseKind::PCopyIn ||
217 ClauseKind == OpenACCClauseKind::PresentOrCopyIn) &&
218 "Only copyin accepts 'readonly:' tag");
219 return std::get<VarListDetails>(Details).IsReadOnly;
220 }
221
222 bool isZero() const {
223 assert((ClauseKind == OpenACCClauseKind::CopyOut ||
224 ClauseKind == OpenACCClauseKind::PCopyOut ||
226 ClauseKind == OpenACCClauseKind::Create ||
227 ClauseKind == OpenACCClauseKind::PCreate ||
228 ClauseKind == OpenACCClauseKind::PresentOrCreate) &&
229 "Only copyout/create accepts 'zero' tag");
230 return std::get<VarListDetails>(Details).IsZero;
231 }
232
234 assert((ClauseKind == OpenACCClauseKind::DeviceType ||
235 ClauseKind == OpenACCClauseKind::DType) &&
236 "Only 'device_type'/'dtype' has a device-type-arg list");
237 return std::get<DeviceTypeDetails>(Details).Archs;
238 }
239
240 void setLParenLoc(SourceLocation EndLoc) { LParenLoc = EndLoc; }
241 void setEndLoc(SourceLocation EndLoc) { ClauseRange.setEnd(EndLoc); }
242
244 assert(ClauseKind == OpenACCClauseKind::Default &&
245 "Parsed clause is not a default clause");
246 Details = DefaultDetails{DefKind};
247 }
248
249 void setConditionDetails(Expr *ConditionExpr) {
250 assert((ClauseKind == OpenACCClauseKind::If ||
251 (ClauseKind == OpenACCClauseKind::Self &&
252 DirKind != OpenACCDirectiveKind::Update)) &&
253 "Parsed clause kind does not have a condition expr");
254 // In C++ we can count on this being a 'bool', but in C this gets left as
255 // some sort of scalar that codegen will have to take care of converting.
256 assert((!ConditionExpr || ConditionExpr->isInstantiationDependent() ||
257 ConditionExpr->getType()->isScalarType()) &&
258 "Condition expression type not scalar/dependent");
259
260 Details = ConditionDetails{ConditionExpr};
261 }
262
264 assert((ClauseKind == OpenACCClauseKind::NumGangs ||
265 ClauseKind == OpenACCClauseKind::NumWorkers ||
266 ClauseKind == OpenACCClauseKind::Async ||
267 ClauseKind == OpenACCClauseKind::VectorLength) &&
268 "Parsed clause kind does not have a int exprs");
269 Details = IntExprDetails{{IntExprs.begin(), IntExprs.end()}};
270 }
272 assert((ClauseKind == OpenACCClauseKind::NumGangs ||
273 ClauseKind == OpenACCClauseKind::NumWorkers ||
274 ClauseKind == OpenACCClauseKind::Async ||
275 ClauseKind == OpenACCClauseKind::VectorLength) &&
276 "Parsed clause kind does not have a int exprs");
277 Details = IntExprDetails{std::move(IntExprs)};
278 }
279
280 void setVarListDetails(ArrayRef<Expr *> VarList, bool IsReadOnly,
281 bool IsZero) {
282 assert((ClauseKind == OpenACCClauseKind::Private ||
283 ClauseKind == OpenACCClauseKind::NoCreate ||
284 ClauseKind == OpenACCClauseKind::Present ||
285 ClauseKind == OpenACCClauseKind::Copy ||
286 ClauseKind == OpenACCClauseKind::PCopy ||
287 ClauseKind == OpenACCClauseKind::PresentOrCopy ||
288 ClauseKind == OpenACCClauseKind::CopyIn ||
289 ClauseKind == OpenACCClauseKind::PCopyIn ||
291 ClauseKind == OpenACCClauseKind::CopyOut ||
292 ClauseKind == OpenACCClauseKind::PCopyOut ||
294 ClauseKind == OpenACCClauseKind::Create ||
295 ClauseKind == OpenACCClauseKind::PCreate ||
297 ClauseKind == OpenACCClauseKind::Attach ||
298 ClauseKind == OpenACCClauseKind::DevicePtr ||
299 ClauseKind == OpenACCClauseKind::FirstPrivate) &&
300 "Parsed clause kind does not have a var-list");
301 assert((!IsReadOnly || ClauseKind == OpenACCClauseKind::CopyIn ||
302 ClauseKind == OpenACCClauseKind::PCopyIn ||
303 ClauseKind == OpenACCClauseKind::PresentOrCopyIn) &&
304 "readonly: tag only valid on copyin");
305 assert((!IsZero || ClauseKind == OpenACCClauseKind::CopyOut ||
306 ClauseKind == OpenACCClauseKind::PCopyOut ||
308 ClauseKind == OpenACCClauseKind::Create ||
309 ClauseKind == OpenACCClauseKind::PCreate ||
310 ClauseKind == OpenACCClauseKind::PresentOrCreate) &&
311 "zero: tag only valid on copyout/create");
312 Details =
313 VarListDetails{{VarList.begin(), VarList.end()}, IsReadOnly, IsZero};
314 }
315
316 void setVarListDetails(llvm::SmallVector<Expr *> &&VarList, bool IsReadOnly,
317 bool IsZero) {
318 assert((ClauseKind == OpenACCClauseKind::Private ||
319 ClauseKind == OpenACCClauseKind::NoCreate ||
320 ClauseKind == OpenACCClauseKind::Present ||
321 ClauseKind == OpenACCClauseKind::Copy ||
322 ClauseKind == OpenACCClauseKind::PCopy ||
323 ClauseKind == OpenACCClauseKind::PresentOrCopy ||
324 ClauseKind == OpenACCClauseKind::CopyIn ||
325 ClauseKind == OpenACCClauseKind::PCopyIn ||
327 ClauseKind == OpenACCClauseKind::CopyOut ||
328 ClauseKind == OpenACCClauseKind::PCopyOut ||
330 ClauseKind == OpenACCClauseKind::Create ||
331 ClauseKind == OpenACCClauseKind::PCreate ||
333 ClauseKind == OpenACCClauseKind::Attach ||
334 ClauseKind == OpenACCClauseKind::DevicePtr ||
335 ClauseKind == OpenACCClauseKind::FirstPrivate) &&
336 "Parsed clause kind does not have a var-list");
337 assert((!IsReadOnly || ClauseKind == OpenACCClauseKind::CopyIn ||
338 ClauseKind == OpenACCClauseKind::PCopyIn ||
339 ClauseKind == OpenACCClauseKind::PresentOrCopyIn) &&
340 "readonly: tag only valid on copyin");
341 assert((!IsZero || ClauseKind == OpenACCClauseKind::CopyOut ||
342 ClauseKind == OpenACCClauseKind::PCopyOut ||
344 ClauseKind == OpenACCClauseKind::Create ||
345 ClauseKind == OpenACCClauseKind::PCreate ||
346 ClauseKind == OpenACCClauseKind::PresentOrCreate) &&
347 "zero: tag only valid on copyout/create");
348 Details = VarListDetails{std::move(VarList), IsReadOnly, IsZero};
349 }
350
352 llvm::SmallVector<Expr *> &&VarList) {
353 assert(ClauseKind == OpenACCClauseKind::Reduction &&
354 "reduction details only valid on reduction");
355 Details = ReductionDetails{Op, std::move(VarList)};
356 }
357
358 void setWaitDetails(Expr *DevNum, SourceLocation QueuesLoc,
359 llvm::SmallVector<Expr *> &&IntExprs) {
360 assert(ClauseKind == OpenACCClauseKind::Wait &&
361 "Parsed clause kind does not have a wait-details");
362 Details = WaitDetails{DevNum, QueuesLoc, std::move(IntExprs)};
363 }
364
366 assert((ClauseKind == OpenACCClauseKind::DeviceType ||
367 ClauseKind == OpenACCClauseKind::DType) &&
368 "Only 'device_type'/'dtype' has a device-type-arg list");
369 Details = DeviceTypeDetails{std::move(Archs)};
370 }
371 };
372
373 SemaOpenACC(Sema &S);
374
375 /// Called after parsing an OpenACC Clause so that it can be checked.
377 OpenACCParsedClause &Clause);
378
379 /// Called after the construct has been parsed, but clauses haven't been
380 /// parsed. This allows us to diagnose not-implemented, as well as set up any
381 /// state required for parsing the clauses.
383
384 /// Called after the directive, including its clauses, have been parsed and
385 /// parsing has consumed the 'annot_pragma_openacc_end' token. This DOES
386 /// happen before any associated declarations or statements have been parsed.
387 /// This function is only called when we are parsing a 'statement' context.
389
390 /// Called after the directive, including its clauses, have been parsed and
391 /// parsing has consumed the 'annot_pragma_openacc_end' token. This DOES
392 /// happen before any associated declarations or statements have been parsed.
393 /// This function is only called when we are parsing a 'Decl' context.
395 /// Called when we encounter an associated statement for our construct, this
396 /// should check legality of the statement as it appertains to this Construct.
398
399 /// Called after the directive has been completely parsed, including the
400 /// declaration group or associated statement.
402 SourceLocation StartLoc,
403 SourceLocation EndLoc,
405 StmtResult AssocStmt);
406
407 /// Called after the directive has been completely parsed, including the
408 /// declaration group or associated statement.
410
411 /// Called when encountering an 'int-expr' for OpenACC, and manages
412 /// conversions and diagnostics to 'int'.
414 SourceLocation Loc, Expr *IntExpr);
415
416 /// Called when encountering a 'var' for OpenACC, ensures it is actually a
417 /// declaration reference to a variable of the correct type.
419
420 /// Called while semantically analyzing the reduction clause, ensuring the var
421 /// is the correct kind of reference.
423
424 /// Called to check the 'var' type is a variable of pointer type, necessary
425 /// for 'deviceptr' and 'attach' clauses. Returns true on success.
426 bool CheckVarIsPointerType(OpenACCClauseKind ClauseKind, Expr *VarExpr);
427
428 /// Checks and creates an Array Section used in an OpenACC construct/clause.
430 Expr *LowerBound,
431 SourceLocation ColonLocFirst, Expr *Length,
432 SourceLocation RBLoc);
433};
434
435} // namespace clang
436
437#endif // LLVM_CLANG_SEMA_SEMAOPENACC_H
Defines some OpenACC-specific enums and functions.
SourceLocation Loc
Definition: SemaObjC.cpp:755
Defines the clang::SourceLocation class and associated facilities.
This represents one expression.
Definition: Expr.h:110
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
Definition: Expr.h:221
QualType getType() const
Definition: Expr.h:142
This is the base type for all OpenACC Clauses.
Definition: OpenACCClause.h:24
A type to represent all the data for an OpenACC Clause that has been parsed, but not yet created/sema...
Definition: SemaOpenACC.h:36
ArrayRef< Expr * > getQueueIdExprs() const
Definition: SemaOpenACC.h:154
OpenACCDirectiveKind getDirectiveKind() const
Definition: SemaOpenACC.h:84
OpenACCParsedClause(OpenACCDirectiveKind DirKind, OpenACCClauseKind ClauseKind, SourceLocation BeginLoc)
Definition: SemaOpenACC.h:80
OpenACCReductionOperator getReductionOp() const
Definition: SemaOpenACC.h:178
SourceLocation getEndLoc() const
Definition: SemaOpenACC.h:92
void setLParenLoc(SourceLocation EndLoc)
Definition: SemaOpenACC.h:240
void setConditionDetails(Expr *ConditionExpr)
Definition: SemaOpenACC.h:249
OpenACCClauseKind getClauseKind() const
Definition: SemaOpenACC.h:86
SourceLocation getLParenLoc() const
Definition: SemaOpenACC.h:90
ArrayRef< DeviceTypeArgument > getDeviceTypeArchitectures() const
Definition: SemaOpenACC.h:233
void setIntExprDetails(llvm::SmallVector< Expr * > &&IntExprs)
Definition: SemaOpenACC.h:271
void setReductionDetails(OpenACCReductionOperator Op, llvm::SmallVector< Expr * > &&VarList)
Definition: SemaOpenACC.h:351
ArrayRef< Expr * > getVarList() const
Definition: SemaOpenACC.h:210
SourceLocation getBeginLoc() const
Definition: SemaOpenACC.h:88
void setDefaultDetails(OpenACCDefaultClauseKind DefKind)
Definition: SemaOpenACC.h:243
SourceLocation getQueuesLoc() const
Definition: SemaOpenACC.h:134
void setVarListDetails(llvm::SmallVector< Expr * > &&VarList, bool IsReadOnly, bool IsZero)
Definition: SemaOpenACC.h:316
void setVarListDetails(ArrayRef< Expr * > VarList, bool IsReadOnly, bool IsZero)
Definition: SemaOpenACC.h:280
void setWaitDetails(Expr *DevNum, SourceLocation QueuesLoc, llvm::SmallVector< Expr * > &&IntExprs)
Definition: SemaOpenACC.h:358
void setEndLoc(SourceLocation EndLoc)
Definition: SemaOpenACC.h:241
ArrayRef< Expr * > getIntExprs() const
Definition: SemaOpenACC.h:174
void setIntExprDetails(ArrayRef< Expr * > IntExprs)
Definition: SemaOpenACC.h:263
void setDeviceTypeDetails(llvm::SmallVector< DeviceTypeArgument > &&Archs)
Definition: SemaOpenACC.h:365
OpenACCDefaultClauseKind getDefaultClauseKind() const
Definition: SemaOpenACC.h:94
ExprResult ActOnVar(OpenACCClauseKind CK, Expr *VarExpr)
Called when encountering a 'var' for OpenACC, ensures it is actually a declaration reference to a var...
ExprResult ActOnIntExpr(OpenACCDirectiveKind DK, OpenACCClauseKind CK, SourceLocation Loc, Expr *IntExpr)
Called when encountering an 'int-expr' for OpenACC, and manages conversions and diagnostics to 'int'.
StmtResult ActOnEndStmtDirective(OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OpenACCClause * > Clauses, StmtResult AssocStmt)
Called after the directive has been completely parsed, including the declaration group or associated ...
OpenACCClause * ActOnClause(ArrayRef< const OpenACCClause * > ExistingClauses, OpenACCParsedClause &Clause)
Called after parsing an OpenACC Clause so that it can be checked.
bool ActOnStartDeclDirective(OpenACCDirectiveKind K, SourceLocation StartLoc)
Called after the directive, including its clauses, have been parsed and parsing has consumed the 'ann...
bool CheckVarIsPointerType(OpenACCClauseKind ClauseKind, Expr *VarExpr)
Called to check the 'var' type is a variable of pointer type, necessary for 'deviceptr' and 'attach' ...
bool ActOnStartStmtDirective(OpenACCDirectiveKind K, SourceLocation StartLoc)
Called after the directive, including its clauses, have been parsed and parsing has consumed the 'ann...
DeclGroupRef ActOnEndDeclDirective()
Called after the directive has been completely parsed, including the declaration group or associated ...
void ActOnConstruct(OpenACCDirectiveKind K, SourceLocation StartLoc)
Called after the construct has been parsed, but clauses haven't been parsed.
std::pair< IdentifierInfo *, SourceLocation > DeviceTypeArgument
Definition: SemaOpenACC.h:30
ExprResult CheckReductionVar(Expr *VarExpr)
Called while semantically analyzing the reduction clause, ensuring the var is the correct kind of ref...
StmtResult ActOnAssociatedStmt(OpenACCDirectiveKind K, StmtResult AssocStmt)
Called when we encounter an associated statement for our construct, this should check legality of the...
ExprResult ActOnArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, Expr *Length, SourceLocation RBLoc)
Checks and creates an Array Section used in an OpenACC construct/clause.
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:460
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
void setEnd(SourceLocation e)
bool isScalarType() const
Definition: Type.h:8009
The JSON file list parser is used to communicate input to InstallAPI.
OpenACCClauseKind
Represents the kind of an OpenACC clause.
Definition: OpenACCKinds.h:164
@ 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'.
@ PresentOrCopy
'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
@ Private
'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel loop', and 'serial loop' constru...
@ Copy
'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ 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',...
@ 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.
@ NoCreate
'no_create' clause, allowed on allowed on Compute and Combined constructs, plus 'data'.
@ PresentOrCopyOut
'copyout' clause alias 'present_or_copyout'.
@ 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',...
@ FirstPrivate
'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop', and 'serial loop' constructs...
@ PCopy
'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
@ PCopyIn
'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
@ 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',...
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
@ PresentOrCopyIn
'copyin' clause alias 'present_or_copyin'.
OpenACCDefaultClauseKind
Definition: OpenACCKinds.h:462
OpenACCDirectiveKind
Definition: OpenACCKinds.h:25
OpenACCReductionOperator
Definition: OpenACCKinds.h:495