LLVM 22.0.0git
ClauseT.h
Go to the documentation of this file.
1//===- ClauseT.h -- clause template definitions ---------------------------===//
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// This file contains template classes that represent OpenMP clauses, as
9// described in the OpenMP API specification.
10//
11// The general structure of any specific clause class is that it is either
12// empty, or it consists of a single data member, which can take one of these
13// three forms:
14// - a value member, named `v`, or
15// - a tuple of values, named `t`, or
16// - a variant (i.e. union) of values, named `u`.
17// To assist with generic visit algorithms, classes define one of the following
18// traits:
19// - EmptyTrait: the class has no data members.
20// - WrapperTrait: the class has a single member `v`
21// - TupleTrait: the class has a tuple member `t`
22// - UnionTrait the class has a variant member `u`
23// - IncompleteTrait: the class is a placeholder class that is currently empty,
24// but will be completed at a later time.
25// Note: This structure follows the one used in flang parser.
26//
27// The types used in the class definitions follow the names used in the spec
28// (there are a few exceptions to this). For example, given
29// Clause `foo`
30// - foo-modifier : description...
31// - list : list of variables
32// the corresponding class would be
33// template <...>
34// struct FooT {
35// using FooModifier = type that can represent the modifier
36// using List = ListT<ObjectT<...>>;
37// using TupleTrait = std::true_type;
38// std::tuple<std::optional<FooModifier>, List> t;
39// };
40//===----------------------------------------------------------------------===//
41#ifndef LLVM_FRONTEND_OPENMP_CLAUSET_H
42#define LLVM_FRONTEND_OPENMP_CLAUSET_H
43
44#include "llvm/ADT/ArrayRef.h"
45#include "llvm/ADT/DenseMap.h"
46#include "llvm/ADT/DenseSet.h"
47#include "llvm/ADT/STLExtras.h"
52
53#include <iterator>
54#include <optional>
55#include <tuple>
56#include <type_traits>
57#include <utility>
58#include <variant>
59
60#define ENUM(Name, ...) enum class Name { __VA_ARGS__ }
61#define OPT(x) std::optional<x>
62
63// A number of OpenMP clauses contain values that come from a given set of
64// possibilities. In the IR these are usually represented by enums. Both
65// clang and flang use different types for the enums, and the enum elements
66// representing the same thing may have different values between clang and
67// flang.
68// Since the representation below tries to adhere to the spec, and be source
69// language agnostic, it defines its own enums, independent from any language
70// frontend. As a consequence, when instantiating the templates below,
71// frontend-specific enums need to be translated into the representation
72// used here. The macros below are intended to assist with the conversion.
73
74// Helper macro for enum-class conversion.
75#define CLAUSET_SCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
76 if (v == OtherEnum::Ov) { \
77 return ThisEnum::Tv; \
78 }
79
80// Helper macro for enum (non-class) conversion.
81#define CLAUSET_UNSCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
82 if (v == Ov) { \
83 return ThisEnum::Tv; \
84 }
85
86#define CLAUSET_ENUM_CONVERT(func, OtherE, ThisE, Maps) \
87 auto func = [](OtherE v) -> ThisE { \
88 using ThisEnum = ThisE; \
89 using OtherEnum = OtherE; \
90 (void)sizeof(OtherEnum); /*Avoid "unused local typedef" warning*/ \
91 Maps; \
92 llvm_unreachable("Unexpected value in " #OtherE); \
93 }
94
95// Usage:
96//
97// Given two enums,
98// enum class Other { o1, o2 };
99// enum class This { t1, t2 };
100// generate conversion function "Func : Other -> This" with
101// CLAUSET_ENUM_CONVERT(
102// Func, Other, This,
103// CLAUSET_ENUM_MEMBER_CONVERT(o1, t1) // <- No comma
104// CLAUSET_ENUM_MEMBER_CONVERT(o2, t2)
105// ...
106// )
107//
108// Note that the sequence of M(other-value, this-value) is separated
109// with _spaces_, not commas.
110
111namespace detail {
112// Type trait to determine whether T is a specialization of std::variant.
113template <typename T> struct is_variant {
114 static constexpr bool value = false;
115};
116
117template <typename... Ts> struct is_variant<std::variant<Ts...>> {
118 static constexpr bool value = true;
119};
120
121template <typename T> constexpr bool is_variant_v = is_variant<T>::value;
122
123// Helper utility to create a type which is a union of two given variants.
124template <typename...> struct UnionOfTwo;
125
126template <typename... Types1, typename... Types2>
127struct UnionOfTwo<std::variant<Types1...>, std::variant<Types2...>> {
128 using type = std::variant<Types1..., Types2...>;
129};
130} // namespace detail
131
132namespace tomp {
133namespace type {
134
135// Helper utility to create a type which is a union of an arbitrary number
136// of variants.
137template <typename...> struct Union;
138
139template <> struct Union<> {
140 // Legal to define, illegal to instantiate.
141 using type = std::variant<>;
142};
143
144template <typename T, typename... Ts> struct Union<T, Ts...> {
145 static_assert(detail::is_variant_v<T>);
146 using type =
147 typename detail::UnionOfTwo<T, typename Union<Ts...>::type>::type;
148};
149
150template <typename T> using ListT = llvm::SmallVector<T, 0>;
151
152// The ObjectT class represents a variable or a locator (as defined in
153// the OpenMP spec).
154// Note: the ObjectT template is not defined. Any user of it is expected to
155// provide their own specialization that conforms to the requirements listed
156// below.
157//
158// Let ObjectS be any specialization of ObjectT:
159//
160// ObjectS must provide the following definitions:
161// {
162// using IdTy = Id;
163// using ExprTy = Expr;
164//
165// auto id() const -> IdTy {
166// // Return a value such that a.id() == b.id() if and only if:
167// // (1) both `a` and `b` represent the same variable or location, or
168// // (2) bool(a.id()) == false and bool(b.id()) == false
169// }
170// }
171//
172// The type IdTy should be hashable (usable as key in unordered containers).
173//
174// Values of type IdTy should be contextually convertible to `bool`.
175//
176// If S is an object of type ObjectS, then `bool(S.id())` is `false` if
177// and only if S does not represent any variable or location.
178//
179// ObjectS should be copyable, movable, and default-constructible.
180template <typename IdType, typename ExprType> struct ObjectT;
181
182// By default, object equality is only determined by its identity.
183template <typename I, typename E>
184bool operator==(const ObjectT<I, E> &o1, const ObjectT<I, E> &o2) {
185 return o1.id() == o2.id();
186}
187
188template <typename I, typename E> using ObjectListT = ListT<ObjectT<I, E>>;
189
190using DirectiveName = llvm::omp::Directive;
191
192template <typename I, typename E> //
195 using Instance = E;
196 using TupleTrait = std::true_type;
197 std::tuple<Variables, Instance> t;
198};
199
200template <typename I, typename E> //
203 using WrapperTrait = std::true_type;
205 };
206 ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT,
207 LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max);
208 using UnionTrait = std::true_type;
209 std::variant<DefinedOpName, IntrinsicOperator> u;
210};
211
212// V5.2: [3.2.6] `iterator` modifier
213template <typename E> //
214struct RangeT {
215 // range-specification: begin : end[: step]
216 using TupleTrait = std::true_type;
217 std::tuple<E, E, OPT(E)> t;
218};
219
220// V5.2: [3.2.6] `iterator` modifier
221template <typename TypeType, typename IdType, typename ExprType> //
223 // iterators-specifier: [ iterator-type ] identifier = range-specification
224 using TupleTrait = std::true_type;
226};
227
228// Note:
229// For motion or map clauses the OpenMP spec allows a unique mapper modifier.
230// In practice, since these clauses apply to multiple objects, there can be
231// multiple effective mappers applicable to these objects (due to overloads,
232// etc.). Because of that store a list of mappers every time a mapper modifier
233// is allowed. If the mapper list contains a single element, it applies to
234// all objects in the clause, otherwise there should be as many mappers as
235// there are objects.
236// V5.2: [5.8.2] Mapper identifiers and `mapper` modifiers
237template <typename I, typename E> //
238struct MapperT {
240 using WrapperTrait = std::true_type;
242};
243
244// V5.2: [15.8.1] `memory-order` clauses
245// When used as arguments for other clauses, e.g. `fail`.
246ENUM(MemoryOrder, AcqRel, Acquire, Relaxed, Release, SeqCst);
247ENUM(MotionExpectation, Present);
248// Union of `dependence-type` and `task-depenence-type`.
249// V5.2: [15.9.1] `task-dependence-type` modifier
250ENUM(DependenceType, Depobj, In, Inout, Inoutset, Mutexinoutset, Out, Sink,
251 Source);
252ENUM(Prescriptiveness, Strict);
253
254template <typename I, typename E> //
256 struct Distance {
257 using TupleTrait = std::true_type;
258 std::tuple<DefinedOperatorT<I, E>, E> t;
259 };
260 using TupleTrait = std::true_type;
261 std::tuple<ObjectT<I, E>, OPT(Distance)> t;
262};
263
264template <typename I, typename E> //
266 using WrapperTrait = std::true_type;
268};
269
270// Note:
271// For reduction clauses the OpenMP spec allows a unique reduction identifier.
272// For reasons analogous to those listed for the MapperT type, clauses that
273// according to the spec contain a reduction identifier will contain a list of
274// reduction identifiers. The same constraints apply: there is either a single
275// identifier that applies to all objects, or there are as many identifiers
276// as there are objects.
277template <typename I, typename E> //
279 using UnionTrait = std::true_type;
280 std::variant<DefinedOperatorT<I, E>, ProcedureDesignatorT<I, E>> u;
281};
282
283template <typename T, typename I, typename E> //
285
286template <typename T>
287std::enable_if_t<T::EmptyTrait::value, bool> operator==(const T &a,
288 const T &b) {
289 return true;
290}
291template <typename T>
292std::enable_if_t<T::IncompleteTrait::value, bool> operator==(const T &a,
293 const T &b) {
294 return true;
295}
296template <typename T>
297std::enable_if_t<T::WrapperTrait::value, bool> operator==(const T &a,
298 const T &b) {
299 return a.v == b.v;
300}
301template <typename T>
302std::enable_if_t<T::TupleTrait::value, bool> operator==(const T &a,
303 const T &b) {
304 return a.t == b.t;
305}
306template <typename T>
307std::enable_if_t<T::UnionTrait::value, bool> operator==(const T &a,
308 const T &b) {
309 return a.u == b.u;
310}
311} // namespace type
312
313template <typename T> using ListT = type::ListT<T>;
314
315template <typename I, typename E> using ObjectT = type::ObjectT<I, E>;
316template <typename I, typename E> using ObjectListT = type::ObjectListT<I, E>;
317
318template <typename T, typename I, typename E>
320
321template <
322 typename ContainerTy, typename FunctionTy,
323 typename ElemTy = typename llvm::remove_cvref_t<ContainerTy>::value_type,
324 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
325ListT<ResultTy> makeList(ContainerTy &&container, FunctionTy &&func) {
327 llvm::transform(container, std::back_inserter(v), func);
328 return v;
329}
330
331namespace clause {
332using type::operator==;
333
334// V5.2: [8.3.1] `assumption` clauses
335template <typename T, typename I, typename E> //
336struct AbsentT {
338 using WrapperTrait = std::true_type;
340};
341
342// V5.2: [15.8.1] `memory-order` clauses
343template <typename T, typename I, typename E> //
344struct AcqRelT {
345 using EmptyTrait = std::true_type;
346};
347
348// V5.2: [15.8.1] `memory-order` clauses
349template <typename T, typename I, typename E> //
350struct AcquireT {
351 using EmptyTrait = std::true_type;
352};
353
354// V5.2: [7.5.2] `adjust_args` clause
355template <typename T, typename I, typename E> //
357 using IncompleteTrait = std::true_type;
358};
359
360// V5.2: [12.5.1] `affinity` clause
361template <typename T, typename I, typename E> //
362struct AffinityT {
365
366 using TupleTrait = std::true_type;
367 std::tuple<OPT(Iterator), LocatorList> t;
368};
369
370// V5.2: [6.3] `align` clause
371template <typename T, typename I, typename E> //
372struct AlignT {
373 using Alignment = E;
374
375 using WrapperTrait = std::true_type;
377};
378
379// V5.2: [5.11] `aligned` clause
380template <typename T, typename I, typename E> //
381struct AlignedT {
382 using Alignment = E;
384
385 using TupleTrait = std::true_type;
386 std::tuple<OPT(Alignment), List> t;
387};
388
389template <typename T, typename I, typename E> //
390struct AllocatorT;
391
392// V5.2: [6.6] `allocate` clause
393template <typename T, typename I, typename E> //
394struct AllocateT {
395 // AllocatorSimpleModifier is same as AllocatorComplexModifier.
399
400 using TupleTrait = std::true_type;
402};
403
404// V5.2: [6.4] `allocator` clause
405template <typename T, typename I, typename E> //
407 using Allocator = E;
408 using WrapperTrait = std::true_type;
410};
411
412// V5.2: [7.5.3] `append_args` clause
413template <typename T, typename I, typename E> //
415 using IncompleteTrait = std::true_type;
416};
417
418// V5.2: [8.1] `at` clause
419template <typename T, typename I, typename E> //
420struct AtT {
421 ENUM(ActionTime, Compilation, Execution);
422 using WrapperTrait = std::true_type;
423 ActionTime v;
424};
425
426// V5.2: [8.2.1] `requirement` clauses
427template <typename T, typename I, typename E> //
429 using MemoryOrder = type::MemoryOrder;
430 using WrapperTrait = std::true_type;
431 MemoryOrder v; // Name not provided in spec
432};
433
434// V5.2: [11.7.1] `bind` clause
435template <typename T, typename I, typename E> //
436struct BindT {
437 ENUM(Binding, Teams, Parallel, Thread);
438 using WrapperTrait = std::true_type;
440};
441
442// V5.2: [15.8.3] `extended-atomic` clauses
443template <typename T, typename I, typename E> //
444struct CaptureT {
445 using EmptyTrait = std::true_type;
446};
447
448// V5.2: [4.4.3] `collapse` clause
449template <typename T, typename I, typename E> //
450struct CollapseT {
451 using N = E;
452 using WrapperTrait = std::true_type;
454};
455
456// [6.0:266]
457template <typename T, typename I, typename E> //
459 using IncompleteTrait = std::true_type;
460};
461
462// [6.0:262]
463template <typename T, typename I, typename E> //
464struct CombinerT {
466 using WrapperTrait = std::true_type;
468};
469
470// V5.2: [15.8.3] `extended-atomic` clauses
471template <typename T, typename I, typename E> //
472struct CompareT {
473 using EmptyTrait = std::true_type;
474};
475
476// V5.2: [8.3.1] `assumption` clauses
477template <typename T, typename I, typename E> //
478struct ContainsT {
480 using WrapperTrait = std::true_type;
482};
483
484// V5.2: [5.7.1] `copyin` clause
485template <typename T, typename I, typename E> //
486struct CopyinT {
488 using WrapperTrait = std::true_type;
490};
491
492// V5.2: [5.7.2] `copyprivate` clause
493template <typename T, typename I, typename E> //
496 using WrapperTrait = std::true_type;
498};
499
500// V5.2: [5.4.1] `default` clause
501template <typename T, typename I, typename E> //
502struct DefaultT {
503 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
504 using WrapperTrait = std::true_type;
505 DataSharingAttribute v;
506};
507
508// V5.2: [5.8.7] `defaultmap` clause
509template <typename T, typename I, typename E> //
511 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
512 Present);
513 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
514 using TupleTrait = std::true_type;
515 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
516};
517
518template <typename T, typename I, typename E> //
519struct DoacrossT;
520
521// V5.2: [15.9.5] `depend` clause
522template <typename T, typename I, typename E> //
523struct DependT {
526 using DependenceType = tomp::type::DependenceType;
527
528 struct TaskDep { // The form with task dependence type.
529 using TupleTrait = std::true_type;
530 // Empty LocatorList means "omp_all_memory".
532 };
533
535 using UnionTrait = std::true_type;
536 std::variant<Doacross, TaskDep> u; // Doacross form is legacy
537};
538
539// V5.2: [3.5] `destroy` clause
540template <typename T, typename I, typename E> //
541struct DestroyT {
543 using WrapperTrait = std::true_type;
544 // DestroyVar can be ommitted in "depobj destroy".
546};
547
548// V5.2: [12.5.2] `detach` clause
549template <typename T, typename I, typename E> //
550struct DetachT {
552 using WrapperTrait = std::true_type;
554};
555
556// V5.2: [13.2] `device` clause
557template <typename T, typename I, typename E> //
558struct DeviceT {
560 ENUM(DeviceModifier, Ancestor, DeviceNum);
561 using TupleTrait = std::true_type;
562 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
563};
564
565// [6.0:362]
566template <typename T, typename I, typename E> //
568 using Requires = E;
569 using WrapperTrait = std::true_type;
571};
572
573// V5.2: [13.1] `device_type` clause
574template <typename T, typename I, typename E> //
576 ENUM(DeviceTypeDescription, Any, Host, Nohost);
577 using WrapperTrait = std::true_type;
578 DeviceTypeDescription v;
579};
580
581// V5.2: [11.6.1] `dist_schedule` clause
582template <typename T, typename I, typename E> //
584 ENUM(Kind, Static);
585 using ChunkSize = E;
586 using TupleTrait = std::true_type;
587 std::tuple<Kind, OPT(ChunkSize)> t;
588};
589
590// V5.2: [15.9.6] `doacross` clause
591template <typename T, typename I, typename E> //
592struct DoacrossT {
594 using DependenceType = tomp::type::DependenceType;
595 using TupleTrait = std::true_type;
596 // Empty Vector means "omp_cur_iteration"
597 std::tuple<DependenceType, Vector> t;
598};
599
600// V5.2: [8.2.1] `requirement` clauses
601template <typename T, typename I, typename E> //
603 using Requires = E;
604 using WrapperTrait = std::true_type;
606};
607
608template <typename T, typename I, typename E> //
610 ENUM(AccessGroup, Cgroup);
611 ENUM(Fallback, Abort, Default_Mem, Null);
612 using Size = E;
613 using TupleTrait = std::true_type;
614 std::tuple<OPT(AccessGroup), OPT(Fallback), Size> t;
615};
616
617// V5.2: [5.8.4] `enter` clause
618template <typename T, typename I, typename E> //
619struct EnterT {
621 ENUM(Modifier, Automap);
622 using TupleTrait = std::true_type;
623 std::tuple<OPT(Modifier), List> t;
624};
625
626// V5.2: [5.6.2] `exclusive` clause
627template <typename T, typename I, typename E> //
629 using WrapperTrait = std::true_type;
632};
633
634// V5.2: [15.8.3] `extended-atomic` clauses
635template <typename T, typename I, typename E> //
636struct FailT {
637 using MemoryOrder = type::MemoryOrder;
638 using WrapperTrait = std::true_type;
640};
641
642// V5.2: [10.5.1] `filter` clause
643template <typename T, typename I, typename E> //
644struct FilterT {
645 using ThreadNum = E;
646 using WrapperTrait = std::true_type;
648};
649
650// V5.2: [12.3] `final` clause
651template <typename T, typename I, typename E> //
652struct FinalT {
653 using Finalize = E;
654 using WrapperTrait = std::true_type;
656};
657
658// V5.2: [5.4.4] `firstprivate` clause
659template <typename T, typename I, typename E> //
662 using WrapperTrait = std::true_type;
664};
665
666// V5.2: [5.9.2] `from` clause
667template <typename T, typename I, typename E> //
668struct FromT {
670 using Expectation = type::MotionExpectation;
672 // See note at the definition of the MapperT type.
673 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
674
675 using TupleTrait = std::true_type;
677};
678
679// V5.2: [9.2.1] `full` clause
680template <typename T, typename I, typename E> //
681struct FullT {
682 using EmptyTrait = std::true_type;
683};
684
685// V5.2: [12.6.1] `grainsize` clause
686template <typename T, typename I, typename E> //
688 using Prescriptiveness = type::Prescriptiveness;
689 using GrainSize = E;
690 using TupleTrait = std::true_type;
692};
693
694// [6.0:438] `graph_id` clause
695template <typename T, typename I, typename E> //
696struct GraphIdT {
697 using IncompleteTrait = std::true_type;
698};
699
700// [6.0:438] `graph_reset` clause
701template <typename T, typename I, typename E> //
703 using IncompleteTrait = std::true_type;
704};
705
706// V5.2: [5.4.9] `has_device_addr` clause
707template <typename T, typename I, typename E> //
710 using WrapperTrait = std::true_type;
712};
713
714// V5.2: [15.1.2] `hint` clause
715template <typename T, typename I, typename E> //
716struct HintT {
717 using HintExpr = E;
718 using WrapperTrait = std::true_type;
720};
721
722// V5.2: [8.3.1] Assumption clauses
723template <typename T, typename I, typename E> //
724struct HoldsT {
725 using WrapperTrait = std::true_type;
726 E v; // No argument name in spec 5.2
727};
728
729// V5.2: [3.4] `if` clause
730template <typename T, typename I, typename E> //
731struct IfT {
734 using TupleTrait = std::true_type;
736};
737
738// V5.2: [7.7.1] `branch` clauses
739template <typename T, typename I, typename E> //
740struct InbranchT {
741 using EmptyTrait = std::true_type;
742};
743
744// V5.2: [5.6.1] `exclusive` clause
745template <typename T, typename I, typename E> //
748 using WrapperTrait = std::true_type;
750};
751
752// V5.2: [7.8.3] `indirect` clause
753template <typename T, typename I, typename E> //
754struct IndirectT {
756 using WrapperTrait = std::true_type;
758};
759
760// [6.0:265-266]
761template <typename T, typename I, typename E> //
762struct InductorT {
763 using IncompleteTrait = std::true_type;
764};
765
766// V5.2: [14.1.2] `init` clause
767template <typename T, typename I, typename E> //
768struct InitT {
772 ENUM(InteropType, Target, Targetsync); // Repeatable
773 using InteropTypes = ListT<InteropType>; // Not a spec name
774
775 using TupleTrait = std::true_type;
777};
778
779// V5.2: [5.5.4] `initializer` clause
780template <typename T, typename I, typename E> //
783 using WrapperTrait = std::true_type;
785};
786
787// V5.2: [5.5.10] `in_reduction` clause
788template <typename T, typename I, typename E> //
791 // See note at the definition of the ReductionIdentifierT type.
792 // The name ReductionIdentifiers is not a spec name.
794 using TupleTrait = std::true_type;
795 std::tuple<ReductionIdentifiers, List> t;
796};
797
798// V5.2: [5.4.7] `is_device_ptr` clause
799template <typename T, typename I, typename E> //
802 using WrapperTrait = std::true_type;
804};
805
806// V5.2: [5.4.5] `lastprivate` clause
807template <typename T, typename I, typename E> //
810 ENUM(LastprivateModifier, Conditional);
811 using TupleTrait = std::true_type;
812 std::tuple<OPT(LastprivateModifier), List> t;
813};
814
815// V5.2: [5.4.6] `linear` clause
816template <typename T, typename I, typename E> //
817struct LinearT {
818 // std::get<type> won't work here due to duplicate types in the tuple.
820 // StepSimpleModifier is same as StepComplexModifier.
822 ENUM(LinearModifier, Ref, Val, Uval);
823
824 using TupleTrait = std::true_type;
825 // Step == nullopt means 1.
826 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
827};
828
829// V5.2: [5.8.5] `link` clause
830template <typename T, typename I, typename E> //
831struct LinkT {
833 using WrapperTrait = std::true_type;
835};
836
837// V5.2: [5.8.3] `map` clause
838template <typename T, typename I, typename E> //
839struct MapT {
841 ENUM(MapType, To, From, Tofrom, Storage);
842 ENUM(AttachModifier, Always, Auto, Never);
843 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
844 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
845 // See note at the definition of the MapperT type.
846 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
848 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
849
850 using TupleTrait = std::true_type;
851 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
852 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
854};
855
856// V5.2: [7.5.1] `match` clause
857template <typename T, typename I, typename E> //
858struct MatchT {
859 using IncompleteTrait = std::true_type;
860};
861
862// V5.2: [12.2] `mergeable` clause
863template <typename T, typename I, typename E> //
865 using EmptyTrait = std::true_type;
866};
867
868// V5.2: [8.5.2] `message` clause
869template <typename T, typename I, typename E> //
870struct MessageT {
871 using MsgString = E;
872 using WrapperTrait = std::true_type;
874};
875
876// V5.2: [7.6.2] `nocontext` clause
877template <typename T, typename I, typename E> //
880 using WrapperTrait = std::true_type;
882};
883
884// V5.2: [15.7] `nowait` clause
885template <typename T, typename I, typename E> //
886struct NogroupT {
887 using EmptyTrait = std::true_type;
888};
889
890// V5.2: [10.4.1] `nontemporal` clause
891template <typename T, typename I, typename E> //
894 using WrapperTrait = std::true_type;
896};
897
898// V5.2: [8.3.1] `assumption` clauses
899template <typename T, typename I, typename E> //
900struct NoOpenmpT {
901 using EmptyTrait = std::true_type;
902};
903
904// V5.2: [8.3.1] `assumption` clauses
905template <typename T, typename I, typename E> //
907 using EmptyTrait = std::true_type;
908};
909
910// V6.0: [10.6.1] `assumption` clauses
911template <typename T, typename I, typename E> //
913 using EmptyTrait = std::true_type;
914};
915
916// V5.2: [8.3.1] `assumption` clauses
917template <typename T, typename I, typename E> //
919 using EmptyTrait = std::true_type;
920};
921
922// V5.2: [7.7.1] `branch` clauses
923template <typename T, typename I, typename E> //
925 using EmptyTrait = std::true_type;
926};
927
928// V5.2: [7.6.1] `novariants` clause
929template <typename T, typename I, typename E> //
932 using WrapperTrait = std::true_type;
934};
935
936// V5.2: [15.6] `nowait` clause
937template <typename T, typename I, typename E> //
938struct NowaitT {
939 using EmptyTrait = std::true_type;
940};
941
942// V5.2: [12.6.2] `num_tasks` clause
943template <typename T, typename I, typename E> //
944struct NumTasksT {
945 using Prescriptiveness = type::Prescriptiveness;
946 using NumTasks = E;
947 using TupleTrait = std::true_type;
949};
950
951// V5.2: [10.2.1] `num_teams` clause
952template <typename T, typename I, typename E> //
953struct NumTeamsT {
954 using LowerBound = E;
955 using UpperBound = E;
956
957 // The name Range is not a spec name.
958 struct Range {
959 using TupleTrait = std::true_type;
960 std::tuple<OPT(LowerBound), UpperBound> t;
961 };
962
963 // The name List is not a spec name. The list is an extension to allow
964 // specifying a grid with connection with the ompx_bare clause.
966 using WrapperTrait = std::true_type;
968};
969
970// V5.2: [10.1.2] `num_threads` clause
971template <typename T, typename I, typename E> //
973 using Nthreads = E;
974 using WrapperTrait = std::true_type;
976};
977
978template <typename T, typename I, typename E> //
980 using EmptyTrait = std::true_type;
981};
982
983template <typename T, typename I, typename E> //
984struct OmpxBareT {
985 using EmptyTrait = std::true_type;
986};
987
988template <typename T, typename I, typename E> //
990 using WrapperTrait = std::true_type;
992};
993
994// V5.2: [10.3] `order` clause
995template <typename T, typename I, typename E> //
996struct OrderT {
997 ENUM(OrderModifier, Reproducible, Unconstrained);
998 ENUM(Ordering, Concurrent);
999 using TupleTrait = std::true_type;
1000 std::tuple<OPT(OrderModifier), Ordering> t;
1001};
1002
1003// V5.2: [4.4.4] `ordered` clause
1004template <typename T, typename I, typename E> //
1005struct OrderedT {
1006 using N = E;
1007 using WrapperTrait = std::true_type;
1008 OPT(N) v;
1009};
1010
1011// V5.2: [7.4.2] `otherwise` clause
1012template <typename T, typename I, typename E> //
1014 using IncompleteTrait = std::true_type;
1015};
1016
1017// V5.2: [9.2.2] `partial` clause
1018template <typename T, typename I, typename E> //
1019struct PartialT {
1021 using WrapperTrait = std::true_type;
1023};
1024
1025// V6.0: `permutation` clause
1026template <typename T, typename I, typename E> //
1029 using WrapperTrait = std::true_type;
1031};
1032
1033// V5.2: [12.4] `priority` clause
1034template <typename T, typename I, typename E> //
1037 using WrapperTrait = std::true_type;
1039};
1040
1041// V5.2: [5.4.3] `private` clause
1042template <typename T, typename I, typename E> //
1043struct PrivateT {
1045 using WrapperTrait = std::true_type;
1047};
1048
1049// V5.2: [10.1.4] `proc_bind` clause
1050template <typename T, typename I, typename E> //
1052 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1053 using WrapperTrait = std::true_type;
1054 AffinityPolicy v;
1055};
1056
1057// V5.2: [15.8.2] Atomic clauses
1058template <typename T, typename I, typename E> //
1059struct ReadT {
1060 using EmptyTrait = std::true_type;
1061};
1062
1063// V5.2: [5.5.8] `reduction` clause
1064template <typename T, typename I, typename E> //
1067 // See note at the definition of the ReductionIdentifierT type.
1068 // The name ReductionIdentifiers is not a spec name.
1070 ENUM(ReductionModifier, Default, Inscan, Task);
1071 using TupleTrait = std::true_type;
1072 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1073};
1074
1075// V5.2: [15.8.1] `memory-order` clauses
1076template <typename T, typename I, typename E> //
1077struct RelaxedT {
1078 using EmptyTrait = std::true_type;
1079};
1080
1081// V5.2: [15.8.1] `memory-order` clauses
1082template <typename T, typename I, typename E> //
1083struct ReleaseT {
1084 using EmptyTrait = std::true_type;
1085};
1086
1087// [6.0:440-441] `replayable` clause
1088template <typename T, typename I, typename E> //
1090 using IncompleteTrait = std::true_type;
1091};
1092
1093// V5.2: [8.2.1] `requirement` clauses
1094template <typename T, typename I, typename E> //
1096 using Requires = E;
1097 using WrapperTrait = std::true_type;
1099};
1100
1101// V5.2: [10.4.2] `safelen` clause
1102template <typename T, typename I, typename E> //
1103struct SafelenT {
1104 using Length = E;
1105 using WrapperTrait = std::true_type;
1107};
1108
1109// V5.2: [11.5.3] `schedule` clause
1110template <typename T, typename I, typename E> //
1112 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1113 using ChunkSize = E;
1114 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1115 ENUM(ChunkModifier, Simd);
1116 using TupleTrait = std::true_type;
1117 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1118};
1119
1120// [6.0:361]
1121template <typename T, typename I, typename E> //
1123 using Requires = E;
1124 using WrapperTrait = std::true_type;
1126};
1127
1128// V5.2: [15.8.1] Memory-order clauses
1129template <typename T, typename I, typename E> //
1130struct SeqCstT {
1131 using EmptyTrait = std::true_type;
1132};
1133
1134// V5.2: [8.5.1] `severity` clause
1135template <typename T, typename I, typename E> //
1137 ENUM(SevLevel, Fatal, Warning);
1138 using WrapperTrait = std::true_type;
1139 SevLevel v;
1140};
1141
1142// V5.2: [5.4.2] `shared` clause
1143template <typename T, typename I, typename E> //
1144struct SharedT {
1146 using WrapperTrait = std::true_type;
1148};
1149
1150// V5.2: [15.10.3] `parallelization-level` clauses
1151template <typename T, typename I, typename E> //
1152struct SimdT {
1153 using EmptyTrait = std::true_type;
1154};
1155
1156// V5.2: [10.4.3] `simdlen` clause
1157template <typename T, typename I, typename E> //
1158struct SimdlenT {
1159 using Length = E;
1160 using WrapperTrait = std::true_type;
1162};
1163
1164// V5.2: [9.1.1] `sizes` clause
1165template <typename T, typename I, typename E> //
1166struct SizesT {
1168 using WrapperTrait = std::true_type;
1170};
1171
1172// V5.2: [5.5.9] `task_reduction` clause
1173template <typename T, typename I, typename E> //
1176 // See note at the definition of the ReductionIdentifierT type.
1177 // The name ReductionIdentifiers is not a spec name.
1179 using TupleTrait = std::true_type;
1180 std::tuple<ReductionIdentifiers, List> t;
1181};
1182
1183// V5.2: [13.3] `thread_limit` clause
1184template <typename T, typename I, typename E> //
1186 using Threadlim = E;
1187 using WrapperTrait = std::true_type;
1189};
1190
1191// V5.2: [15.10.3] `parallelization-level` clauses
1192template <typename T, typename I, typename E> //
1193struct ThreadsT {
1194 using EmptyTrait = std::true_type;
1195};
1196
1197// V6.0: [14.8] `threadset` clause
1198template <typename T, typename I, typename E> //
1200 ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team);
1201 using WrapperTrait = std::true_type;
1202 ThreadsetPolicy v;
1203};
1204
1205// V5.2: [5.9.1] `to` clause
1206template <typename T, typename I, typename E> //
1207struct ToT {
1209 using Expectation = type::MotionExpectation;
1210 // See note at the definition of the MapperT type.
1211 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1213
1214 using TupleTrait = std::true_type;
1216};
1217
1218// [6.0:440-441] `transparent` clause
1219template <typename T, typename I, typename E> //
1221 using IncompleteTrait = std::true_type;
1222};
1223
1224// V5.2: [8.2.1] `requirement` clauses
1225template <typename T, typename I, typename E> //
1227 using Requires = E;
1228 using WrapperTrait = std::true_type;
1230};
1231
1232// V5.2: [8.2.1] `requirement` clauses
1233template <typename T, typename I, typename E> //
1235 using Requires = E;
1236 using WrapperTrait = std::true_type;
1238};
1239
1240// V5.2: [5.10] `uniform` clause
1241template <typename T, typename I, typename E> //
1242struct UniformT {
1244 using WrapperTrait = std::true_type;
1246};
1247
1248template <typename T, typename I, typename E> //
1249struct UnknownT {
1250 using EmptyTrait = std::true_type;
1251};
1252
1253// V5.2: [12.1] `untied` clause
1254template <typename T, typename I, typename E> //
1255struct UntiedT {
1256 using EmptyTrait = std::true_type;
1257};
1258
1259// Both of the following
1260// V5.2: [15.8.2] `atomic` clauses
1261// V5.2: [15.9.3] `update` clause
1262template <typename T, typename I, typename E> //
1263struct UpdateT {
1264 using DependenceType = tomp::type::DependenceType;
1265 using WrapperTrait = std::true_type;
1267};
1268
1269// V5.2: [14.1.3] `use` clause
1270template <typename T, typename I, typename E> //
1271struct UseT {
1273 using WrapperTrait = std::true_type;
1275};
1276
1277// V5.2: [5.4.10] `use_device_addr` clause
1278template <typename T, typename I, typename E> //
1281 using WrapperTrait = std::true_type;
1283};
1284
1285// V5.2: [5.4.8] `use_device_ptr` clause
1286template <typename T, typename I, typename E> //
1289 using WrapperTrait = std::true_type;
1291};
1292
1293// V5.2: [6.8] `uses_allocators` clause
1294template <typename T, typename I, typename E> //
1296 using MemSpace = E;
1298 using Allocator = E;
1299 struct AllocatorSpec { // Not a spec name
1300 using TupleTrait = std::true_type;
1302 };
1303 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1304 using WrapperTrait = std::true_type;
1306};
1307
1308// V5.2: [15.8.3] `extended-atomic` clauses
1309template <typename T, typename I, typename E> //
1310struct WeakT {
1311 using EmptyTrait = std::true_type;
1312};
1313
1314// V5.2: [7.4.1] `when` clause
1315template <typename T, typename I, typename E> //
1316struct WhenT {
1317 using IncompleteTrait = std::true_type;
1318};
1319
1320// V5.2: [15.8.2] Atomic clauses
1321template <typename T, typename I, typename E> //
1322struct WriteT {
1323 using EmptyTrait = std::true_type;
1324};
1325
1326// V6: [6.4.7] Looprange clause
1327template <typename T, typename I, typename E> struct LooprangeT {
1328 using Begin = E;
1329 using End = E;
1330
1331 using TupleTrait = std::true_type;
1332 std::tuple<Begin, End> t;
1333};
1334
1335// ---
1336
1337template <typename T, typename I, typename E>
1339 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1341
1342template <typename T, typename I, typename E>
1343using EmptyClausesT = std::variant<
1351
1352template <typename T, typename I, typename E>
1354 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>,
1358
1359template <typename T, typename I, typename E>
1361 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1369
1370template <typename T, typename I, typename E>
1371using UnionClausesT = std::variant<DependT<T, I, E>>;
1372
1373template <typename T, typename I, typename E>
1374using WrapperClausesT = std::variant<
1394
1395template <typename T, typename I, typename E>
1403 >::type;
1404} // namespace clause
1405
1406using type::operator==;
1407
1408// The variant wrapper that encapsulates all possible specific clauses.
1409// The `Extras` arguments are additional types representing local extensions
1410// to the clause set, e.g.
1411//
1412// using Clause = ClauseT<Type, Id, Expr,
1413// MyClause1, MyClause2>;
1414//
1415// The member Clause::u will be a variant containing all specific clauses
1416// defined above, plus MyClause1 and MyClause2.
1417//
1418// Note: Any derived class must be constructible from the base class
1419// ClauseT<...>.
1420template <typename TypeType, typename IdType, typename ExprType,
1421 typename... Extras>
1422struct ClauseT {
1423 using TypeTy = TypeType;
1424 using IdTy = IdType;
1425 using ExprTy = ExprType;
1426
1427 // Type of "self" to specify this type given a derived class type.
1428 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1429
1430 using VariantTy = typename type::Union<
1432 std::variant<Extras...>>::type;
1433
1434 llvm::omp::Clause id; // The numeric id of the clause
1435 using UnionTrait = std::true_type;
1437};
1438
1439template <typename ClauseType> struct DirectiveWithClauses {
1440 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1442};
1443
1444} // namespace tomp
1445
1446#undef OPT
1447#undef ENUM
1448
1449#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
AMDGPU Prepare AGPR Alloc
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define ENUM(Name,...)
Definition ClauseT.h:60
#define OPT(x)
Definition ClauseT.h:61
DXIL Resource Implicit Binding
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
@ Default
#define T
This file contains some templates that are useful if you are working with the STL at all.
This file defines the SmallVector class.
@ None
static constexpr int Concat[]
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
constexpr bool is_variant_v
Definition ClauseT.h:121
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
Definition STLExtras.h:1989
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:870
typename type::Union< EmptyClausesT< T, I, E >, ExtensionClausesT< T, I, E >, IncompleteClausesT< T, I, E >, TupleClausesT< T, I, E >, UnionClausesT< T, I, E >, WrapperClausesT< T, I, E > >::type UnionOfAllClausesT
Definition ClauseT.h:1396
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1338
std::variant< AbsentT< T, I, E >, AlignT< T, I, E >, AllocatorT< T, I, E >, AtomicDefaultMemOrderT< T, I, E >, AtT< T, I, E >, BindT< T, I, E >, CollapseT< T, I, E >, CombinerT< T, I, E >, ContainsT< T, I, E >, CopyinT< T, I, E >, CopyprivateT< T, I, E >, DefaultT< T, I, E >, DestroyT< T, I, E >, DetachT< T, I, E >, DeviceSafesyncT< T, I, E >, DeviceTypeT< T, I, E >, DynamicAllocatorsT< T, I, E >, EnterT< T, I, E >, ExclusiveT< T, I, E >, FailT< T, I, E >, FilterT< T, I, E >, FinalT< T, I, E >, FirstprivateT< T, I, E >, HasDeviceAddrT< T, I, E >, HintT< T, I, E >, HoldsT< T, I, E >, InclusiveT< T, I, E >, IndirectT< T, I, E >, InitializerT< T, I, E >, IsDevicePtrT< T, I, E >, LinkT< T, I, E >, MessageT< T, I, E >, NocontextT< T, I, E >, NontemporalT< T, I, E >, NovariantsT< T, I, E >, NumTeamsT< T, I, E >, NumThreadsT< T, I, E >, OrderedT< T, I, E >, PartialT< T, I, E >, PriorityT< T, I, E >, PrivateT< T, I, E >, ProcBindT< T, I, E >, ReverseOffloadT< T, I, E >, SafelenT< T, I, E >, SelfMapsT< T, I, E >, SeverityT< T, I, E >, SharedT< T, I, E >, SimdlenT< T, I, E >, SizesT< T, I, E >, PermutationT< T, I, E >, ThreadLimitT< T, I, E >, ThreadsetT< T, I, E >, UnifiedAddressT< T, I, E >, UnifiedSharedMemoryT< T, I, E >, UniformT< T, I, E >, UpdateT< T, I, E >, UseDeviceAddrT< T, I, E >, UseDevicePtrT< T, I, E >, UsesAllocatorsT< T, I, E > > WrapperClausesT
Definition ClauseT.h:1374
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, CollectorT< T, I, E >, GraphIdT< T, I, E >, GraphResetT< T, I, E >, InductorT< T, I, E >, MatchT< T, I, E >, OtherwiseT< T, I, E >, ReplayableT< T, I, E >, TransparentT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition ClauseT.h:1353
std::variant< AcqRelT< T, I, E >, AcquireT< T, I, E >, CaptureT< T, I, E >, CompareT< T, I, E >, FullT< T, I, E >, InbranchT< T, I, E >, MergeableT< T, I, E >, NogroupT< T, I, E >, NoOpenmpConstructsT< T, I, E >, NoOpenmpRoutinesT< T, I, E >, NoOpenmpT< T, I, E >, NoParallelismT< T, I, E >, NotinbranchT< T, I, E >, NowaitT< T, I, E >, ReadT< T, I, E >, RelaxedT< T, I, E >, ReleaseT< T, I, E >, SeqCstT< T, I, E >, SimdT< T, I, E >, ThreadsT< T, I, E >, UnknownT< T, I, E >, UntiedT< T, I, E >, UseT< T, I, E >, WeakT< T, I, E >, WriteT< T, I, E > > EmptyClausesT
Definition ClauseT.h:1343
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1371
std::variant< AffinityT< T, I, E >, AlignedT< T, I, E >, AllocateT< T, I, E >, DefaultmapT< T, I, E >, DeviceT< T, I, E >, DistScheduleT< T, I, E >, DoacrossT< T, I, E >, DynGroupprivateT< T, I, E >, FromT< T, I, E >, GrainsizeT< T, I, E >, IfT< T, I, E >, InitT< T, I, E >, InReductionT< T, I, E >, LastprivateT< T, I, E >, LinearT< T, I, E >, LooprangeT< T, I, E >, MapT< T, I, E >, NumTasksT< T, I, E >, OrderT< T, I, E >, ReductionT< T, I, E >, ScheduleT< T, I, E >, TaskReductionT< T, I, E >, ToT< T, I, E > > TupleClausesT
Definition ClauseT.h:1360
llvm::omp::Directive DirectiveName
Definition ClauseT.h:190
ListT< IteratorSpecifierT< T, I, E > > IteratorT
Definition ClauseT.h:284
bool operator==(const ObjectT< I, E > &o1, const ObjectT< I, E > &o2)
Definition ClauseT.h:184
ListT< ObjectT< I, E > > ObjectListT
Definition ClauseT.h:188
llvm::SmallVector< T, 0 > ListT
Definition ClauseT.h:150
type::ObjectListT< I, E > ObjectListT
Definition ClauseT.h:316
type::IteratorT< T, I, E > IteratorT
Definition ClauseT.h:319
type::ListT< T > ListT
Definition ClauseT.h:313
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
Definition ClauseT.h:325
type::ObjectT< I, E > ObjectT
Definition ClauseT.h:315
#define EQ(a, b)
Definition regexec.c:65
static constexpr bool value
Definition ClauseT.h:114
IdType IdTy
Definition ClauseT.h:1424
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1430
ExprType ExprTy
Definition ClauseT.h:1425
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1428
TypeType TypeTy
Definition ClauseT.h:1423
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1441
std::true_type WrapperTrait
Definition ClauseT.h:338
ListT< type::DirectiveName > List
Definition ClauseT.h:337
std::true_type EmptyTrait
Definition ClauseT.h:345
std::true_type EmptyTrait
Definition ClauseT.h:351
std::true_type IncompleteTrait
Definition ClauseT.h:357
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:363
std::tuple< OPT(Iterator), LocatorList > t
Definition ClauseT.h:367
std::true_type TupleTrait
Definition ClauseT.h:366
ObjectListT< I, E > LocatorList
Definition ClauseT.h:364
std::true_type WrapperTrait
Definition ClauseT.h:375
std::tuple< OPT(Alignment), List > t
Definition ClauseT.h:386
ObjectListT< I, E > List
Definition ClauseT.h:383
std::true_type TupleTrait
Definition ClauseT.h:385
std::true_type TupleTrait
Definition ClauseT.h:400
ObjectListT< I, E > List
Definition ClauseT.h:398
std::tuple< OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
Definition ClauseT.h:401
AllocatorT< T, I, E > AllocatorComplexModifier
Definition ClauseT.h:396
AlignT< T, I, E > AlignModifier
Definition ClauseT.h:397
std::true_type WrapperTrait
Definition ClauseT.h:408
std::true_type IncompleteTrait
Definition ClauseT.h:415
ActionTime v
Definition ClauseT.h:423
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition ClauseT.h:422
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition ClauseT.h:438
std::true_type EmptyTrait
Definition ClauseT.h:445
std::true_type WrapperTrait
Definition ClauseT.h:452
std::true_type IncompleteTrait
Definition ClauseT.h:459
std::true_type WrapperTrait
Definition ClauseT.h:466
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:465
std::true_type EmptyTrait
Definition ClauseT.h:473
ListT< type::DirectiveName > List
Definition ClauseT.h:479
std::true_type WrapperTrait
Definition ClauseT.h:480
std::true_type WrapperTrait
Definition ClauseT.h:488
ObjectListT< I, E > List
Definition ClauseT.h:487
ObjectListT< I, E > List
Definition ClauseT.h:495
std::true_type WrapperTrait
Definition ClauseT.h:496
DataSharingAttribute v
Definition ClauseT.h:505
std::true_type WrapperTrait
Definition ClauseT.h:504
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
Definition ClauseT.h:515
std::true_type TupleTrait
Definition ClauseT.h:514
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
Definition ClauseT.h:531
tomp::type::DependenceType DependenceType
Definition ClauseT.h:526
DoacrossT< T, I, E > Doacross
Definition ClauseT.h:534
std::true_type UnionTrait
Definition ClauseT.h:535
ObjectListT< I, E > LocatorList
Definition ClauseT.h:525
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:524
std::variant< Doacross, TaskDep > u
Definition ClauseT.h:536
std::true_type WrapperTrait
Definition ClauseT.h:543
ObjectT< I, E > DestroyVar
Definition ClauseT.h:542
ObjectT< I, E > EventHandle
Definition ClauseT.h:551
std::true_type WrapperTrait
Definition ClauseT.h:552
std::true_type WrapperTrait
Definition ClauseT.h:569
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:562
std::true_type TupleTrait
Definition ClauseT.h:561
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:578
std::true_type WrapperTrait
Definition ClauseT.h:577
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:587
std::true_type TupleTrait
Definition ClauseT.h:586
std::true_type TupleTrait
Definition ClauseT.h:595
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:593
tomp::type::DependenceType DependenceType
Definition ClauseT.h:594
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:597
ENUM(AccessGroup, Cgroup)
ENUM(Fallback, Abort, Default_Mem, Null)
std::tuple< OPT(AccessGroup), OPT(Fallback), Size > t
Definition ClauseT.h:614
std::true_type TupleTrait
Definition ClauseT.h:622
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:623
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:620
std::true_type WrapperTrait
Definition ClauseT.h:629
ObjectListT< I, E > List
Definition ClauseT.h:630
MemoryOrder v
Definition ClauseT.h:639
std::true_type WrapperTrait
Definition ClauseT.h:638
type::MemoryOrder MemoryOrder
Definition ClauseT.h:637
std::true_type WrapperTrait
Definition ClauseT.h:646
std::true_type WrapperTrait
Definition ClauseT.h:654
std::true_type WrapperTrait
Definition ClauseT.h:662
ObjectListT< I, E > List
Definition ClauseT.h:661
std::true_type TupleTrait
Definition ClauseT.h:675
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:671
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:676
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:673
type::MotionExpectation Expectation
Definition ClauseT.h:670
ObjectListT< I, E > LocatorList
Definition ClauseT.h:669
std::true_type EmptyTrait
Definition ClauseT.h:682
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:688
std::true_type TupleTrait
Definition ClauseT.h:690
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:691
std::true_type IncompleteTrait
Definition ClauseT.h:697
std::true_type IncompleteTrait
Definition ClauseT.h:703
ObjectListT< I, E > List
Definition ClauseT.h:709
std::true_type WrapperTrait
Definition ClauseT.h:710
std::true_type WrapperTrait
Definition ClauseT.h:718
std::true_type WrapperTrait
Definition ClauseT.h:725
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:735
std::true_type TupleTrait
Definition ClauseT.h:734
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:732
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:795
std::true_type TupleTrait
Definition ClauseT.h:794
ObjectListT< I, E > List
Definition ClauseT.h:790
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:793
std::true_type EmptyTrait
Definition ClauseT.h:741
std::true_type WrapperTrait
Definition ClauseT.h:748
ObjectListT< I, E > List
Definition ClauseT.h:747
std::true_type WrapperTrait
Definition ClauseT.h:756
OPT(InvokedByFptr) v
std::true_type IncompleteTrait
Definition ClauseT.h:763
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:771
ObjectT< I, E > InteropVar
Definition ClauseT.h:770
ListT< InteropType > InteropTypes
Definition ClauseT.h:773
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:776
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:775
std::true_type WrapperTrait
Definition ClauseT.h:783
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:782
ObjectListT< I, E > List
Definition ClauseT.h:801
std::true_type WrapperTrait
Definition ClauseT.h:802
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:812
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:811
ObjectListT< I, E > List
Definition ClauseT.h:809
std::true_type TupleTrait
Definition ClauseT.h:824
ObjectListT< I, E > List
Definition ClauseT.h:819
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:826
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:833
ObjectListT< I, E > List
Definition ClauseT.h:832
std::tuple< Begin, End > t
Definition ClauseT.h:1332
std::true_type TupleTrait
Definition ClauseT.h:1331
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:846
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:853
ObjectListT< I, E > LocatorList
Definition ClauseT.h:840
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:847
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:848
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:850
std::true_type IncompleteTrait
Definition ClauseT.h:859
std::true_type EmptyTrait
Definition ClauseT.h:865
std::true_type WrapperTrait
Definition ClauseT.h:872
std::true_type EmptyTrait
Definition ClauseT.h:901
std::true_type EmptyTrait
Definition ClauseT.h:919
std::true_type WrapperTrait
Definition ClauseT.h:880
DoNotUpdateContext v
Definition ClauseT.h:881
std::true_type EmptyTrait
Definition ClauseT.h:887
ObjectListT< I, E > List
Definition ClauseT.h:893
std::true_type WrapperTrait
Definition ClauseT.h:894
std::true_type EmptyTrait
Definition ClauseT.h:925
std::true_type WrapperTrait
Definition ClauseT.h:932
DoNotUseVariant v
Definition ClauseT.h:933
std::true_type EmptyTrait
Definition ClauseT.h:939
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:948
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:945
std::true_type TupleTrait
Definition ClauseT.h:947
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:960
std::true_type WrapperTrait
Definition ClauseT.h:966
ListT< Range > List
Definition ClauseT.h:965
std::true_type WrapperTrait
Definition ClauseT.h:974
std::true_type EmptyTrait
Definition ClauseT.h:980
std::true_type EmptyTrait
Definition ClauseT.h:985
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:1000
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:999
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:1007
std::true_type IncompleteTrait
Definition ClauseT.h:1014
std::true_type WrapperTrait
Definition ClauseT.h:1021
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1029
std::true_type WrapperTrait
Definition ClauseT.h:1037
std::true_type WrapperTrait
Definition ClauseT.h:1045
ObjectListT< I, E > List
Definition ClauseT.h:1044
AffinityPolicy v
Definition ClauseT.h:1054
std::true_type WrapperTrait
Definition ClauseT.h:1053
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1060
std::true_type TupleTrait
Definition ClauseT.h:1071
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1072
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1066
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1069
std::true_type EmptyTrait
Definition ClauseT.h:1078
std::true_type EmptyTrait
Definition ClauseT.h:1084
std::true_type IncompleteTrait
Definition ClauseT.h:1090
std::true_type WrapperTrait
Definition ClauseT.h:1097
std::true_type WrapperTrait
Definition ClauseT.h:1105
std::true_type TupleTrait
Definition ClauseT.h:1116
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1117
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1124
std::true_type EmptyTrait
Definition ClauseT.h:1131
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1138
std::true_type WrapperTrait
Definition ClauseT.h:1146
ObjectListT< I, E > List
Definition ClauseT.h:1145
std::true_type EmptyTrait
Definition ClauseT.h:1153
std::true_type WrapperTrait
Definition ClauseT.h:1160
ListT< E > SizeList
Definition ClauseT.h:1167
std::true_type WrapperTrait
Definition ClauseT.h:1168
ObjectListT< I, E > List
Definition ClauseT.h:1175
std::true_type TupleTrait
Definition ClauseT.h:1179
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1178
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1180
std::true_type WrapperTrait
Definition ClauseT.h:1187
std::true_type EmptyTrait
Definition ClauseT.h:1194
ThreadsetPolicy v
Definition ClauseT.h:1202
std::true_type WrapperTrait
Definition ClauseT.h:1201
ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team)
std::true_type TupleTrait
Definition ClauseT.h:1214
type::MotionExpectation Expectation
Definition ClauseT.h:1209
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1215
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1212
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1208
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1211
std::true_type IncompleteTrait
Definition ClauseT.h:1221
std::true_type WrapperTrait
Definition ClauseT.h:1228
std::true_type WrapperTrait
Definition ClauseT.h:1244
ParameterList v
Definition ClauseT.h:1245
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1243
std::true_type EmptyTrait
Definition ClauseT.h:1250
std::true_type EmptyTrait
Definition ClauseT.h:1256
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1265
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1264
std::true_type WrapperTrait
Definition ClauseT.h:1281
ObjectListT< I, E > List
Definition ClauseT.h:1280
ObjectListT< I, E > List
Definition ClauseT.h:1288
std::true_type WrapperTrait
Definition ClauseT.h:1289
ObjectT< I, E > InteropVar
Definition ClauseT.h:1272
std::true_type WrapperTrait
Definition ClauseT.h:1273
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1301
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1303
std::true_type WrapperTrait
Definition ClauseT.h:1304
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1297
std::true_type EmptyTrait
Definition ClauseT.h:1311
std::true_type IncompleteTrait
Definition ClauseT.h:1317
std::true_type EmptyTrait
Definition ClauseT.h:1323
std::true_type UnionTrait
Definition ClauseT.h:208
std::variant< DefinedOpName, IntrinsicOperator > u
Definition ClauseT.h:209
ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT, LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max)
std::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
Definition ClauseT.h:225
std::tuple< DefinedOperatorT< I, E >, E > t
Definition ClauseT.h:258
std::tuple< ObjectT< I, E >, OPT(Distance)> t
Definition ClauseT.h:261
std::true_type TupleTrait
Definition ClauseT.h:260
MapperIdentifier v
Definition ClauseT.h:241
ObjectT< I, E > MapperIdentifier
Definition ClauseT.h:239
std::true_type WrapperTrait
Definition ClauseT.h:240
std::true_type TupleTrait
Definition ClauseT.h:216
std::tuple< E, E, OPT(E)> t
Definition ClauseT.h:217
std::variant< DefinedOperatorT< I, E >, ProcedureDesignatorT< I, E > > u
Definition ClauseT.h:280
ObjectListT< I, E > Variables
Definition ClauseT.h:194
std::true_type TupleTrait
Definition ClauseT.h:196
std::tuple< Variables, Instance > t
Definition ClauseT.h:197
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type
Definition ClauseT.h:146
std::variant<> type
Definition ClauseT.h:141