clang 22.0.0git
OpenACCClause.cpp
Go to the documentation of this file.
1//===---- OpenACCClause.cpp - Classes for OpenACC Clauses ----------------===//
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//
9// This file implements the subclasses of the OpenACCClause class declared in
10// OpenACCClause.h
11//
12//===----------------------------------------------------------------------===//
13
16#include "clang/AST/Expr.h"
17
18using namespace clang;
19
25}
31}
47}
50}
58}
61 SourceLocation BeginLoc,
62 SourceLocation LParenLoc,
63 SourceLocation EndLoc) {
64 void *Mem =
65 C.Allocate(sizeof(OpenACCDefaultClause), alignof(OpenACCDefaultClause));
66
67 return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc);
68}
69
71 SourceLocation BeginLoc,
72 SourceLocation LParenLoc,
73 Expr *ConditionExpr,
74 SourceLocation EndLoc) {
75 void *Mem = C.Allocate(sizeof(OpenACCIfClause), alignof(OpenACCIfClause));
76 return new (Mem) OpenACCIfClause(BeginLoc, LParenLoc, ConditionExpr, EndLoc);
77}
78
80 SourceLocation LParenLoc, Expr *ConditionExpr,
81 SourceLocation EndLoc)
82 : OpenACCClauseWithCondition(OpenACCClauseKind::If, BeginLoc, LParenLoc,
83 ConditionExpr, EndLoc) {
84 assert(ConditionExpr && "if clause requires condition expr");
85 assert((ConditionExpr->isInstantiationDependent() ||
86 ConditionExpr->getType()->isScalarType()) &&
87 "Condition expression type not scalar/dependent");
88}
89
91 SourceLocation BeginLoc,
92 SourceLocation LParenLoc,
93 Expr *ConditionExpr,
94 SourceLocation EndLoc) {
95 void *Mem = C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(1));
96 return new (Mem)
97 OpenACCSelfClause(BeginLoc, LParenLoc, ConditionExpr, EndLoc);
98}
99
101 SourceLocation BeginLoc,
102 SourceLocation LParenLoc,
103 ArrayRef<Expr *> VarList,
104 SourceLocation EndLoc) {
105 void *Mem =
106 C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(VarList.size()));
107 return new (Mem) OpenACCSelfClause(BeginLoc, LParenLoc, VarList, EndLoc);
108}
109
110OpenACCSelfClause::OpenACCSelfClause(SourceLocation BeginLoc,
111 SourceLocation LParenLoc,
112 ArrayRef<Expr *> VarList,
113 SourceLocation EndLoc)
114 : OpenACCClauseWithParams(OpenACCClauseKind::Self, BeginLoc, LParenLoc,
115 EndLoc),
116 HasConditionExpr(std::nullopt), NumExprs(VarList.size()) {
117 llvm::uninitialized_copy(VarList, getTrailingObjects());
118}
119
120OpenACCSelfClause::OpenACCSelfClause(SourceLocation BeginLoc,
121 SourceLocation LParenLoc,
122 Expr *ConditionExpr, SourceLocation EndLoc)
123 : OpenACCClauseWithParams(OpenACCClauseKind::Self, BeginLoc, LParenLoc,
124 EndLoc),
125 HasConditionExpr(ConditionExpr != nullptr), NumExprs(1) {
126 assert((!ConditionExpr || ConditionExpr->isInstantiationDependent() ||
127 ConditionExpr->getType()->isScalarType()) &&
128 "Condition expression type not scalar/dependent");
129 llvm::uninitialized_copy(ArrayRef(ConditionExpr), getTrailingObjects());
130}
131
133 switch (getClauseKind()) {
134 default:
135 assert(false && "Clause children function not implemented");
136 break;
137#define VISIT_CLAUSE(CLAUSE_NAME) \
138 case OpenACCClauseKind::CLAUSE_NAME: \
139 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();
140#define CLAUSE_ALIAS(ALIAS_NAME, CLAUSE_NAME, DEPRECATED) \
141 case OpenACCClauseKind::ALIAS_NAME: \
142 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();
143
144#include "clang/Basic/OpenACCClauses.def"
145 }
147}
148
149OpenACCNumWorkersClause::OpenACCNumWorkersClause(SourceLocation BeginLoc,
150 SourceLocation LParenLoc,
151 Expr *IntExpr,
152 SourceLocation EndLoc)
154 LParenLoc, IntExpr, EndLoc) {
155 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
156 IntExpr->getType()->isIntegerType()) &&
157 "Condition expression type not scalar/dependent");
158}
159
161 SourceLocation LParenLoc,
163 ArrayRef<Expr *> IntExprs,
164 SourceLocation EndLoc)
165 : OpenACCClauseWithExprs(OpenACCClauseKind::Gang, BeginLoc, LParenLoc,
166 EndLoc) {
167 assert(GangKinds.size() == IntExprs.size() && "Mismatch exprs/kind?");
168 setExprs(getTrailingObjects<Expr *>(IntExprs.size()), IntExprs);
169 llvm::uninitialized_copy(GangKinds, getTrailingObjects<OpenACCGangKind>());
170}
171
174 SourceLocation LParenLoc, Expr *IntExpr,
175 SourceLocation EndLoc) {
176 void *Mem = C.Allocate(sizeof(OpenACCNumWorkersClause),
177 alignof(OpenACCNumWorkersClause));
178 return new (Mem)
179 OpenACCNumWorkersClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
180}
181
182OpenACCCollapseClause::OpenACCCollapseClause(SourceLocation BeginLoc,
183 SourceLocation LParenLoc,
184 bool HasForce, Expr *LoopCount,
185 SourceLocation EndLoc)
187 LParenLoc, LoopCount, EndLoc),
188 HasForce(HasForce) {}
189
192 SourceLocation LParenLoc, bool HasForce,
193 Expr *LoopCount, SourceLocation EndLoc) {
194 assert((!LoopCount || (LoopCount->isInstantiationDependent() ||
195 isa<ConstantExpr>(LoopCount))) &&
196 "Loop count not constant expression");
197 void *Mem =
198 C.Allocate(sizeof(OpenACCCollapseClause), alignof(OpenACCCollapseClause));
199 return new (Mem)
200 OpenACCCollapseClause(BeginLoc, LParenLoc, HasForce, LoopCount, EndLoc);
201}
202
203OpenACCVectorLengthClause::OpenACCVectorLengthClause(SourceLocation BeginLoc,
204 SourceLocation LParenLoc,
205 Expr *IntExpr,
206 SourceLocation EndLoc)
208 LParenLoc, IntExpr, EndLoc) {
209 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
210 IntExpr->getType()->isIntegerType()) &&
211 "Condition expression type not scalar/dependent");
212}
213
216 SourceLocation LParenLoc, Expr *IntExpr,
217 SourceLocation EndLoc) {
218 void *Mem = C.Allocate(sizeof(OpenACCVectorLengthClause),
220 return new (Mem)
221 OpenACCVectorLengthClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
222}
223
224OpenACCAsyncClause::OpenACCAsyncClause(SourceLocation BeginLoc,
225 SourceLocation LParenLoc, Expr *IntExpr,
226 SourceLocation EndLoc)
228 LParenLoc, IntExpr, EndLoc) {
229 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
230 IntExpr->getType()->isIntegerType()) &&
231 "Condition expression type not scalar/dependent");
232}
233
235 SourceLocation BeginLoc,
236 SourceLocation LParenLoc,
237 Expr *IntExpr,
238 SourceLocation EndLoc) {
239 void *Mem =
240 C.Allocate(sizeof(OpenACCAsyncClause), alignof(OpenACCAsyncClause));
241 return new (Mem) OpenACCAsyncClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
242}
243
244OpenACCDeviceNumClause::OpenACCDeviceNumClause(SourceLocation BeginLoc,
245 SourceLocation LParenLoc, Expr *IntExpr,
246 SourceLocation EndLoc)
248 LParenLoc, IntExpr, EndLoc) {
249 assert((IntExpr->isInstantiationDependent() ||
250 IntExpr->getType()->isIntegerType()) &&
251 "device_num expression type not scalar/dependent");
252}
253
255 SourceLocation BeginLoc,
256 SourceLocation LParenLoc,
257 Expr *IntExpr,
258 SourceLocation EndLoc) {
259 void *Mem =
260 C.Allocate(sizeof(OpenACCDeviceNumClause), alignof(OpenACCDeviceNumClause));
261 return new (Mem) OpenACCDeviceNumClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
262}
263
264OpenACCDefaultAsyncClause::OpenACCDefaultAsyncClause(SourceLocation BeginLoc,
265 SourceLocation LParenLoc,
266 Expr *IntExpr,
267 SourceLocation EndLoc)
269 LParenLoc, IntExpr, EndLoc) {
270 assert((IntExpr->isInstantiationDependent() ||
271 IntExpr->getType()->isIntegerType()) &&
272 "default_async expression type not scalar/dependent");
273}
274
277 SourceLocation LParenLoc, Expr *IntExpr,
278 SourceLocation EndLoc) {
279 void *Mem = C.Allocate(sizeof(OpenACCDefaultAsyncClause),
281 return new (Mem)
282 OpenACCDefaultAsyncClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
283}
284
286 const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
287 Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef<Expr *> QueueIdExprs,
288 SourceLocation EndLoc) {
289 // Allocates enough room in trailing storage for all the int-exprs, plus a
290 // placeholder for the devnum.
291 void *Mem = C.Allocate(
292 OpenACCWaitClause::totalSizeToAlloc<Expr *>(QueueIdExprs.size() + 1));
293 return new (Mem) OpenACCWaitClause(BeginLoc, LParenLoc, DevNumExpr, QueuesLoc,
294 QueueIdExprs, EndLoc);
295}
296
298 SourceLocation BeginLoc,
299 SourceLocation LParenLoc,
300 ArrayRef<Expr *> IntExprs,
301 SourceLocation EndLoc) {
302 void *Mem = C.Allocate(
303 OpenACCNumGangsClause::totalSizeToAlloc<Expr *>(IntExprs.size()));
304 return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc);
305}
306
308 SourceLocation BeginLoc,
309 SourceLocation LParenLoc,
310 ArrayRef<Expr *> SizeExprs,
311 SourceLocation EndLoc) {
312 void *Mem =
313 C.Allocate(OpenACCTileClause::totalSizeToAlloc<Expr *>(SizeExprs.size()));
314 return new (Mem) OpenACCTileClause(BeginLoc, LParenLoc, SizeExprs, EndLoc);
315}
316
319 SourceLocation LParenLoc, ArrayRef<Expr *> VarList,
320 ArrayRef<VarDecl *> InitRecipes,
321 SourceLocation EndLoc) {
322 assert(VarList.size() == InitRecipes.size());
323 void *Mem =
324 C.Allocate(OpenACCPrivateClause::totalSizeToAlloc<Expr *, VarDecl *>(
325 VarList.size(), InitRecipes.size()));
326 return new (Mem)
327 OpenACCPrivateClause(BeginLoc, LParenLoc, VarList, InitRecipes, EndLoc);
328}
329
331 const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
333 SourceLocation EndLoc) {
334 void *Mem = C.Allocate(
335 OpenACCFirstPrivateClause::totalSizeToAlloc<Expr *,
337 VarList.size(), InitRecipes.size()));
338 return new (Mem) OpenACCFirstPrivateClause(BeginLoc, LParenLoc, VarList,
339 InitRecipes, EndLoc);
340}
341
343 SourceLocation BeginLoc,
344 SourceLocation LParenLoc,
345 ArrayRef<Expr *> VarList,
346 SourceLocation EndLoc) {
347 void *Mem =
348 C.Allocate(OpenACCAttachClause::totalSizeToAlloc<Expr *>(VarList.size()));
349 return new (Mem) OpenACCAttachClause(BeginLoc, LParenLoc, VarList, EndLoc);
350}
351
353 SourceLocation BeginLoc,
354 SourceLocation LParenLoc,
355 ArrayRef<Expr *> VarList,
356 SourceLocation EndLoc) {
357 void *Mem =
358 C.Allocate(OpenACCDetachClause::totalSizeToAlloc<Expr *>(VarList.size()));
359 return new (Mem) OpenACCDetachClause(BeginLoc, LParenLoc, VarList, EndLoc);
360}
361
363 SourceLocation BeginLoc,
364 SourceLocation LParenLoc,
365 ArrayRef<Expr *> VarList,
366 SourceLocation EndLoc) {
367 void *Mem =
368 C.Allocate(OpenACCDeleteClause::totalSizeToAlloc<Expr *>(VarList.size()));
369 return new (Mem) OpenACCDeleteClause(BeginLoc, LParenLoc, VarList, EndLoc);
370}
371
373 SourceLocation BeginLoc,
374 SourceLocation LParenLoc,
375 ArrayRef<Expr *> VarList,
376 SourceLocation EndLoc) {
377 void *Mem = C.Allocate(
378 OpenACCUseDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));
379 return new (Mem) OpenACCUseDeviceClause(BeginLoc, LParenLoc, VarList, EndLoc);
380}
381
383 SourceLocation BeginLoc,
384 SourceLocation LParenLoc,
385 ArrayRef<Expr *> VarList,
386 SourceLocation EndLoc) {
387 void *Mem = C.Allocate(
388 OpenACCDevicePtrClause::totalSizeToAlloc<Expr *>(VarList.size()));
389 return new (Mem) OpenACCDevicePtrClause(BeginLoc, LParenLoc, VarList, EndLoc);
390}
391
393 SourceLocation BeginLoc,
394 SourceLocation LParenLoc,
395 ArrayRef<Expr *> VarList,
396 SourceLocation EndLoc) {
397 void *Mem = C.Allocate(
398 OpenACCNoCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));
399 return new (Mem) OpenACCNoCreateClause(BeginLoc, LParenLoc, VarList, EndLoc);
400}
401
403 SourceLocation BeginLoc,
404 SourceLocation LParenLoc,
405 ArrayRef<Expr *> VarList,
406 SourceLocation EndLoc) {
407 void *Mem = C.Allocate(
408 OpenACCPresentClause::totalSizeToAlloc<Expr *>(VarList.size()));
409 return new (Mem) OpenACCPresentClause(BeginLoc, LParenLoc, VarList, EndLoc);
410}
411
413 SourceLocation BeginLoc,
414 SourceLocation LParenLoc,
415 ArrayRef<Expr *> VarList,
416 SourceLocation EndLoc) {
417 void *Mem =
418 C.Allocate(OpenACCHostClause::totalSizeToAlloc<Expr *>(VarList.size()));
419 return new (Mem) OpenACCHostClause(BeginLoc, LParenLoc, VarList, EndLoc);
420}
421
423 SourceLocation BeginLoc,
424 SourceLocation LParenLoc,
425 ArrayRef<Expr *> VarList,
426 SourceLocation EndLoc) {
427 void *Mem =
428 C.Allocate(OpenACCDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));
429 return new (Mem) OpenACCDeviceClause(BeginLoc, LParenLoc, VarList, EndLoc);
430}
431
434 SourceLocation BeginLoc, SourceLocation LParenLoc,
436 SourceLocation EndLoc) {
437 void *Mem =
438 C.Allocate(OpenACCCopyClause::totalSizeToAlloc<Expr *>(VarList.size()));
439 return new (Mem)
440 OpenACCCopyClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
441}
442
444 SourceLocation BeginLoc,
445 SourceLocation LParenLoc,
446 ArrayRef<Expr *> VarList,
447 SourceLocation EndLoc) {
448 void *Mem =
449 C.Allocate(OpenACCLinkClause::totalSizeToAlloc<Expr *>(VarList.size()));
450 return new (Mem) OpenACCLinkClause(BeginLoc, LParenLoc, VarList, EndLoc);
451}
452
454 const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
455 ArrayRef<Expr *> VarList, SourceLocation EndLoc) {
456 void *Mem = C.Allocate(
457 OpenACCDeviceResidentClause::totalSizeToAlloc<Expr *>(VarList.size()));
458 return new (Mem)
459 OpenACCDeviceResidentClause(BeginLoc, LParenLoc, VarList, EndLoc);
460}
461
464 SourceLocation BeginLoc, SourceLocation LParenLoc,
466 SourceLocation EndLoc) {
467 void *Mem =
468 C.Allocate(OpenACCCopyInClause::totalSizeToAlloc<Expr *>(VarList.size()));
469 return new (Mem)
470 OpenACCCopyInClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
471}
472
475 SourceLocation BeginLoc, SourceLocation LParenLoc,
477 SourceLocation EndLoc) {
478 void *Mem = C.Allocate(
479 OpenACCCopyOutClause::totalSizeToAlloc<Expr *>(VarList.size()));
480 return new (Mem) OpenACCCopyOutClause(Spelling, BeginLoc, LParenLoc, Mods,
481 VarList, EndLoc);
482}
483
486 SourceLocation BeginLoc, SourceLocation LParenLoc,
488 SourceLocation EndLoc) {
489 void *Mem =
490 C.Allocate(OpenACCCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));
491 return new (Mem)
492 OpenACCCreateClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
493}
494
496 const ASTContext &C, OpenACCClauseKind K, SourceLocation BeginLoc,
498 SourceLocation EndLoc) {
499 void *Mem =
500 C.Allocate(OpenACCDeviceTypeClause::totalSizeToAlloc<DeviceTypeArgument>(
501 Archs.size()));
502 return new (Mem)
503 OpenACCDeviceTypeClause(K, BeginLoc, LParenLoc, Archs, EndLoc);
504}
505
507 const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
510 SourceLocation EndLoc) {
511 void *Mem = C.Allocate(
512 OpenACCReductionClause::totalSizeToAlloc<Expr *, OpenACCReductionRecipe>(
513 VarList.size(), Recipes.size()));
514 return new (Mem) OpenACCReductionClause(BeginLoc, LParenLoc, Operator,
515 VarList, Recipes, EndLoc);
516}
517
519 SourceLocation BeginLoc,
520 SourceLocation EndLoc) {
521 void *Mem = C.Allocate(sizeof(OpenACCAutoClause));
522 return new (Mem) OpenACCAutoClause(BeginLoc, EndLoc);
523}
524
527 SourceLocation EndLoc) {
528 void *Mem = C.Allocate(sizeof(OpenACCIndependentClause));
529 return new (Mem) OpenACCIndependentClause(BeginLoc, EndLoc);
530}
531
533 SourceLocation BeginLoc,
534 SourceLocation EndLoc) {
535 void *Mem = C.Allocate(sizeof(OpenACCSeqClause));
536 return new (Mem) OpenACCSeqClause(BeginLoc, EndLoc);
537}
538
540 SourceLocation BeginLoc,
541 SourceLocation EndLoc) {
542 void *Mem = C.Allocate(sizeof(OpenACCNoHostClause));
543 return new (Mem) OpenACCNoHostClause(BeginLoc, EndLoc);
544}
545
548 SourceLocation LParenLoc,
550 ArrayRef<Expr *> IntExprs, SourceLocation EndLoc) {
551 void *Mem =
552 C.Allocate(OpenACCGangClause::totalSizeToAlloc<Expr *, OpenACCGangKind>(
553 IntExprs.size(), GangKinds.size()));
554 return new (Mem)
555 OpenACCGangClause(BeginLoc, LParenLoc, GangKinds, IntExprs, EndLoc);
556}
557
559 SourceLocation LParenLoc,
560 Expr *IntExpr, SourceLocation EndLoc)
562 LParenLoc, IntExpr, EndLoc) {
563 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
564 IntExpr->getType()->isIntegerType()) &&
565 "Int expression type not scalar/dependent");
566}
567
569 SourceLocation BeginLoc,
570 SourceLocation LParenLoc,
571 Expr *IntExpr,
572 SourceLocation EndLoc) {
573 void *Mem =
574 C.Allocate(sizeof(OpenACCWorkerClause), alignof(OpenACCWorkerClause));
575 return new (Mem) OpenACCWorkerClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
576}
577
579 SourceLocation LParenLoc,
580 Expr *IntExpr, SourceLocation EndLoc)
582 LParenLoc, IntExpr, EndLoc) {
583 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
584 IntExpr->getType()->isIntegerType()) &&
585 "Int expression type not scalar/dependent");
586}
587
589 SourceLocation BeginLoc,
590 SourceLocation LParenLoc,
591 Expr *IntExpr,
592 SourceLocation EndLoc) {
593 void *Mem =
594 C.Allocate(sizeof(OpenACCVectorClause), alignof(OpenACCVectorClause));
595 return new (Mem) OpenACCVectorClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
596}
597
599 SourceLocation BeginLoc,
600 SourceLocation EndLoc) {
601 void *Mem =
602 C.Allocate(sizeof(OpenACCFinalizeClause), alignof(OpenACCFinalizeClause));
603 return new (Mem) OpenACCFinalizeClause(BeginLoc, EndLoc);
604}
605
607 SourceLocation BeginLoc,
608 SourceLocation EndLoc) {
609 void *Mem = C.Allocate(sizeof(OpenACCIfPresentClause),
610 alignof(OpenACCIfPresentClause));
611 return new (Mem) OpenACCIfPresentClause(BeginLoc, EndLoc);
612}
613
615 SourceLocation BeginLoc,
616 SourceLocation LParenLoc,
617 const StringLiteral *SL,
618 SourceLocation EndLoc) {
619 void *Mem = C.Allocate(sizeof(OpenACCBindClause), alignof(OpenACCBindClause));
620 return new (Mem) OpenACCBindClause(BeginLoc, LParenLoc, SL, EndLoc);
621}
622
624 SourceLocation BeginLoc,
625 SourceLocation LParenLoc,
626 const IdentifierInfo *ID,
627 SourceLocation EndLoc) {
628 void *Mem = C.Allocate(sizeof(OpenACCBindClause), alignof(OpenACCBindClause));
629 return new (Mem) OpenACCBindClause(BeginLoc, LParenLoc, ID, EndLoc);
630}
631
633 const OpenACCBindClause &RHS) {
634 if (LHS.isStringArgument() != RHS.isStringArgument())
635 return false;
636
637 if (LHS.isStringArgument())
638 return LHS.getStringArgument()->getString() ==
640 return LHS.getIdentifierArgument()->getName() ==
642}
643
644//===----------------------------------------------------------------------===//
645// OpenACC clauses printing methods
646//===----------------------------------------------------------------------===//
647
648void OpenACCClausePrinter::printExpr(const Expr *E) {
649 E->printPretty(OS, nullptr, Policy, 0);
650}
651
652void OpenACCClausePrinter::VisitDefaultClause(const OpenACCDefaultClause &C) {
653 OS << "default(" << C.getDefaultClauseKind() << ")";
654}
655
656void OpenACCClausePrinter::VisitIfClause(const OpenACCIfClause &C) {
657 OS << "if(";
658 printExpr(C.getConditionExpr());
659 OS << ")";
660}
661
662void OpenACCClausePrinter::VisitSelfClause(const OpenACCSelfClause &C) {
663 OS << "self";
664
665 if (C.isConditionExprClause()) {
666 if (const Expr *CondExpr = C.getConditionExpr()) {
667 OS << "(";
668 printExpr(CondExpr);
669 OS << ")";
670 }
671 } else {
672 OS << "(";
673 llvm::interleaveComma(C.getVarList(), OS,
674 [&](const Expr *E) { printExpr(E); });
675 OS << ")";
676 }
677}
678
679void OpenACCClausePrinter::VisitNumGangsClause(const OpenACCNumGangsClause &C) {
680 OS << "num_gangs(";
681 llvm::interleaveComma(C.getIntExprs(), OS,
682 [&](const Expr *E) { printExpr(E); });
683 OS << ")";
684}
685
686void OpenACCClausePrinter::VisitTileClause(const OpenACCTileClause &C) {
687 OS << "tile(";
688 llvm::interleaveComma(C.getSizeExprs(), OS,
689 [&](const Expr *E) { printExpr(E); });
690 OS << ")";
691}
692
693void OpenACCClausePrinter::VisitNumWorkersClause(
694 const OpenACCNumWorkersClause &C) {
695 OS << "num_workers(";
696 printExpr(C.getIntExpr());
697 OS << ")";
698}
699
700void OpenACCClausePrinter::VisitVectorLengthClause(
702 OS << "vector_length(";
703 printExpr(C.getIntExpr());
704 OS << ")";
705}
706
707void OpenACCClausePrinter::VisitDeviceNumClause(
708 const OpenACCDeviceNumClause &C) {
709 OS << "device_num(";
710 printExpr(C.getIntExpr());
711 OS << ")";
712}
713
714void OpenACCClausePrinter::VisitDefaultAsyncClause(
716 OS << "default_async(";
717 printExpr(C.getIntExpr());
718 OS << ")";
719}
720
721void OpenACCClausePrinter::VisitAsyncClause(const OpenACCAsyncClause &C) {
722 OS << "async";
723 if (C.hasIntExpr()) {
724 OS << "(";
725 printExpr(C.getIntExpr());
726 OS << ")";
727 }
728}
729
730void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause &C) {
731 OS << "private(";
732 llvm::interleaveComma(C.getVarList(), OS,
733 [&](const Expr *E) { printExpr(E); });
734 OS << ")";
735}
736
737void OpenACCClausePrinter::VisitFirstPrivateClause(
739 OS << "firstprivate(";
740 llvm::interleaveComma(C.getVarList(), OS,
741 [&](const Expr *E) { printExpr(E); });
742 OS << ")";
743}
744
745void OpenACCClausePrinter::VisitAttachClause(const OpenACCAttachClause &C) {
746 OS << "attach(";
747 llvm::interleaveComma(C.getVarList(), OS,
748 [&](const Expr *E) { printExpr(E); });
749 OS << ")";
750}
751
752void OpenACCClausePrinter::VisitDetachClause(const OpenACCDetachClause &C) {
753 OS << "detach(";
754 llvm::interleaveComma(C.getVarList(), OS,
755 [&](const Expr *E) { printExpr(E); });
756 OS << ")";
757}
758
759void OpenACCClausePrinter::VisitDeleteClause(const OpenACCDeleteClause &C) {
760 OS << "delete(";
761 llvm::interleaveComma(C.getVarList(), OS,
762 [&](const Expr *E) { printExpr(E); });
763 OS << ")";
764}
765
766void OpenACCClausePrinter::VisitUseDeviceClause(
767 const OpenACCUseDeviceClause &C) {
768 OS << "use_device(";
769 llvm::interleaveComma(C.getVarList(), OS,
770 [&](const Expr *E) { printExpr(E); });
771 OS << ")";
772}
773
774void OpenACCClausePrinter::VisitDevicePtrClause(
775 const OpenACCDevicePtrClause &C) {
776 OS << "deviceptr(";
777 llvm::interleaveComma(C.getVarList(), OS,
778 [&](const Expr *E) { printExpr(E); });
779 OS << ")";
780}
781
782void OpenACCClausePrinter::VisitNoCreateClause(const OpenACCNoCreateClause &C) {
783 OS << "no_create(";
784 llvm::interleaveComma(C.getVarList(), OS,
785 [&](const Expr *E) { printExpr(E); });
786 OS << ")";
787}
788
789void OpenACCClausePrinter::VisitPresentClause(const OpenACCPresentClause &C) {
790 OS << "present(";
791 llvm::interleaveComma(C.getVarList(), OS,
792 [&](const Expr *E) { printExpr(E); });
793 OS << ")";
794}
795
796void OpenACCClausePrinter::VisitHostClause(const OpenACCHostClause &C) {
797 OS << "host(";
798 llvm::interleaveComma(C.getVarList(), OS,
799 [&](const Expr *E) { printExpr(E); });
800 OS << ")";
801}
802
803void OpenACCClausePrinter::VisitDeviceClause(const OpenACCDeviceClause &C) {
804 OS << "device(";
805 llvm::interleaveComma(C.getVarList(), OS,
806 [&](const Expr *E) { printExpr(E); });
807 OS << ")";
808}
809
810void OpenACCClausePrinter::VisitCopyClause(const OpenACCCopyClause &C) {
811 OS << C.getClauseKind() << '(';
812 if (C.getModifierList() != OpenACCModifierKind::Invalid)
813 OS << C.getModifierList() << ": ";
814 llvm::interleaveComma(C.getVarList(), OS,
815 [&](const Expr *E) { printExpr(E); });
816 OS << ")";
817}
818
819void OpenACCClausePrinter::VisitLinkClause(const OpenACCLinkClause &C) {
820 OS << "link(";
821 llvm::interleaveComma(C.getVarList(), OS,
822 [&](const Expr *E) { printExpr(E); });
823 OS << ")";
824}
825
826void OpenACCClausePrinter::VisitDeviceResidentClause(
828 OS << "device_resident(";
829 llvm::interleaveComma(C.getVarList(), OS,
830 [&](const Expr *E) { printExpr(E); });
831 OS << ")";
832}
833
834void OpenACCClausePrinter::VisitCopyInClause(const OpenACCCopyInClause &C) {
835 OS << C.getClauseKind() << '(';
836 if (C.getModifierList() != OpenACCModifierKind::Invalid)
837 OS << C.getModifierList() << ": ";
838 llvm::interleaveComma(C.getVarList(), OS,
839 [&](const Expr *E) { printExpr(E); });
840 OS << ")";
841}
842
843void OpenACCClausePrinter::VisitCopyOutClause(const OpenACCCopyOutClause &C) {
844 OS << C.getClauseKind() << '(';
845 if (C.getModifierList() != OpenACCModifierKind::Invalid)
846 OS << C.getModifierList() << ": ";
847 llvm::interleaveComma(C.getVarList(), OS,
848 [&](const Expr *E) { printExpr(E); });
849 OS << ")";
850}
851
852void OpenACCClausePrinter::VisitCreateClause(const OpenACCCreateClause &C) {
853 OS << C.getClauseKind() << '(';
854 if (C.getModifierList() != OpenACCModifierKind::Invalid)
855 OS << C.getModifierList() << ": ";
856 llvm::interleaveComma(C.getVarList(), OS,
857 [&](const Expr *E) { printExpr(E); });
858 OS << ")";
859}
860
861void OpenACCClausePrinter::VisitReductionClause(
862 const OpenACCReductionClause &C) {
863 OS << "reduction(" << C.getReductionOp() << ": ";
864 llvm::interleaveComma(C.getVarList(), OS,
865 [&](const Expr *E) { printExpr(E); });
866 OS << ")";
867}
868
869void OpenACCClausePrinter::VisitWaitClause(const OpenACCWaitClause &C) {
870 OS << "wait";
871 if (C.hasExprs()) {
872 OS << "(";
873 if (C.hasDevNumExpr()) {
874 OS << "devnum: ";
875 printExpr(C.getDevNumExpr());
876 OS << " : ";
877 }
878
879 if (C.hasQueuesTag())
880 OS << "queues: ";
881
882 llvm::interleaveComma(C.getQueueIdExprs(), OS,
883 [&](const Expr *E) { printExpr(E); });
884 OS << ")";
885 }
886}
887
888void OpenACCClausePrinter::VisitDeviceTypeClause(
889 const OpenACCDeviceTypeClause &C) {
890 OS << C.getClauseKind();
891 OS << "(";
892 llvm::interleaveComma(C.getArchitectures(), OS,
893 [&](const DeviceTypeArgument &Arch) {
894 if (Arch.getIdentifierInfo() == nullptr)
895 OS << "*";
896 else
897 OS << Arch.getIdentifierInfo()->getName();
898 });
899 OS << ")";
900}
901
902void OpenACCClausePrinter::VisitAutoClause(const OpenACCAutoClause &C) {
903 OS << "auto";
904}
905
906void OpenACCClausePrinter::VisitIndependentClause(
908 OS << "independent";
909}
910
911void OpenACCClausePrinter::VisitSeqClause(const OpenACCSeqClause &C) {
912 OS << "seq";
913}
914
915void OpenACCClausePrinter::VisitNoHostClause(const OpenACCNoHostClause &C) {
916 OS << "nohost";
917}
918
919void OpenACCClausePrinter::VisitCollapseClause(const OpenACCCollapseClause &C) {
920 OS << "collapse(";
921 if (C.hasForce())
922 OS << "force:";
923 printExpr(C.getLoopCount());
924 OS << ")";
925}
926
927void OpenACCClausePrinter::VisitGangClause(const OpenACCGangClause &C) {
928 OS << "gang";
929
930 if (C.getNumExprs() > 0) {
931 OS << "(";
932 bool first = true;
933 for (unsigned I = 0; I < C.getNumExprs(); ++I) {
934 if (!first)
935 OS << ", ";
936 first = false;
937
938 OS << C.getExpr(I).first << ": ";
939 printExpr(C.getExpr(I).second);
940 }
941 OS << ")";
942 }
943}
944
945void OpenACCClausePrinter::VisitWorkerClause(const OpenACCWorkerClause &C) {
946 OS << "worker";
947
948 if (C.hasIntExpr()) {
949 OS << "(num: ";
950 printExpr(C.getIntExpr());
951 OS << ")";
952 }
953}
954
955void OpenACCClausePrinter::VisitVectorClause(const OpenACCVectorClause &C) {
956 OS << "vector";
957
958 if (C.hasIntExpr()) {
959 OS << "(length: ";
960 printExpr(C.getIntExpr());
961 OS << ")";
962 }
963}
964
965void OpenACCClausePrinter::VisitFinalizeClause(const OpenACCFinalizeClause &C) {
966 OS << "finalize";
967}
968
969void OpenACCClausePrinter::VisitIfPresentClause(
970 const OpenACCIfPresentClause &C) {
971 OS << "if_present";
972}
973
974void OpenACCClausePrinter::VisitBindClause(const OpenACCBindClause &C) {
975 OS << "bind(";
976 if (C.isStringArgument())
977 OS << '"' << C.getStringArgument()->getString() << '"';
978 else
979 OS << C.getIdentifierArgument()->getName();
980 OS << ")";
981}
Defines the clang::ASTContext interface.
Expr * E
OffloadArch Arch
Definition: OffloadArch.cpp:10
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:188
This represents one expression.
Definition: Expr.h:112
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
Definition: Expr.h:223
QualType getType() const
Definition: Expr.h:144
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
A simple pair of identifier info and location.
static bool classof(const OpenACCClause *C)
static OpenACCAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static OpenACCAttachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCAutoClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
const IdentifierInfo * getIdentifierArgument() const
const StringLiteral * getStringArgument() const
static bool classof(const OpenACCClause *C)
static OpenACCBindClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, const IdentifierInfo *ID, SourceLocation EndLoc)
bool isStringArgument() const
Represents one of the handful of classes that has an optional/required 'condition' expression as an a...
static bool classof(const OpenACCClause *C)
Represents a clause that has one or more expressions associated with it.
static bool classof(const OpenACCClause *C)
void setExprs(MutableArrayRef< Expr * > NewExprs)
Used only for initialization, the leaf class can initialize this to trailing storage.
Represents a clause that has a list of parameters.
static bool classof(const OpenACCClause *C)
Represents one of a handful of clauses that have a single integer expression.
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
This is the base type for all OpenACC Clauses.
Definition: OpenACCClause.h:27
child_range children()
StmtIterator child_iterator
Definition: OpenACCClause.h:47
OpenACCClauseKind getClauseKind() const
Definition: OpenACCClause.h:40
llvm::iterator_range< child_iterator > child_range
Definition: OpenACCClause.h:49
Represents a 'collapse' clause on a 'loop' construct.
static OpenACCCollapseClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, bool HasForce, Expr *LoopCount, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCopyClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCCopyInClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCopyOutClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCreateClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDefaultAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
A 'default' clause, has the optional 'none' or 'present' argument.
static OpenACCDefaultClause * Create(const ASTContext &C, OpenACCDefaultClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
static OpenACCDeleteClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDetachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static OpenACCDeviceNumClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDevicePtrClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDeviceResidentClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
A 'device_type' or 'dtype' clause, takes a list of either an 'asterisk' or an identifier.
static OpenACCDeviceTypeClause * Create(const ASTContext &C, OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< DeviceTypeArgument > Archs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCFinalizeClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCFirstPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, ArrayRef< OpenACCFirstPrivateRecipe > InitRecipes, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCGangClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
OpenACCGangClause(SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCHostClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
An 'if' clause, which has a required condition expression.
OpenACCIfClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static OpenACCIfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCIfPresentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCIndependentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCLinkClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCNoCreateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static OpenACCNoHostClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCNumGangsClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCNumWorkersClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCPresentClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, ArrayRef< VarDecl * > InitRecipes, SourceLocation EndLoc)
static OpenACCReductionClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCReductionOperator Operator, ArrayRef< Expr * > VarList, ArrayRef< OpenACCReductionRecipe > Recipes, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
A 'self' clause, which has an optional condition expression, or, in the event of an 'update' directiv...
static bool classof(const OpenACCClause *C)
static OpenACCSelfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static OpenACCSeqClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCTileClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > SizeExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCUseDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCVectorClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
OpenACCVectorClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCVectorLengthClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCWaitClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef< Expr * > QueueIdExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCWorkerClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
OpenACCWorkerClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
Encodes a location in the source.
void printPretty(raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\n", const ASTContext *Context=nullptr) const
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1801
StringRef getString() const
Definition: Expr.h:1869
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
Definition: TypeBase.h:8980
bool isScalarType() const
Definition: TypeBase.h:9038
The JSON file list parser is used to communicate input to InstallAPI.
OpenACCReductionOperator
Definition: OpenACCKinds.h:547
OpenACCModifierKind
Definition: OpenACCKinds.h:641
OpenACCClauseKind
Represents the kind of an OpenACC clause.
Definition: OpenACCKinds.h:207
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
@ 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.
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
Definition: CallGraph.h:204
OpenACCDefaultClauseKind
Definition: OpenACCKinds.h:514