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
462template <typename T, typename I, typename E> //
463struct CompareT {
464 using EmptyTrait = std::true_type;
465};
466
467// V5.2: [8.3.1] `assumption` clauses
468template <typename T, typename I, typename E> //
469struct ContainsT {
471 using WrapperTrait = std::true_type;
473};
474
475// V5.2: [5.7.1] `copyin` clause
476template <typename T, typename I, typename E> //
477struct CopyinT {
479 using WrapperTrait = std::true_type;
481};
482
483// V5.2: [5.7.2] `copyprivate` clause
484template <typename T, typename I, typename E> //
487 using WrapperTrait = std::true_type;
489};
490
491// V5.2: [5.4.1] `default` clause
492template <typename T, typename I, typename E> //
493struct DefaultT {
494 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
495 using WrapperTrait = std::true_type;
496 DataSharingAttribute v;
497};
498
499// V5.2: [5.8.7] `defaultmap` clause
500template <typename T, typename I, typename E> //
502 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
503 Present);
504 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
505 using TupleTrait = std::true_type;
506 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
507};
508
509template <typename T, typename I, typename E> //
510struct DoacrossT;
511
512// V5.2: [15.9.5] `depend` clause
513template <typename T, typename I, typename E> //
514struct DependT {
517 using DependenceType = tomp::type::DependenceType;
518
519 struct TaskDep { // The form with task dependence type.
520 using TupleTrait = std::true_type;
521 // Empty LocatorList means "omp_all_memory".
523 };
524
526 using UnionTrait = std::true_type;
527 std::variant<Doacross, TaskDep> u; // Doacross form is legacy
528};
529
530// V5.2: [3.5] `destroy` clause
531template <typename T, typename I, typename E> //
532struct DestroyT {
534 using WrapperTrait = std::true_type;
535 // DestroyVar can be ommitted in "depobj destroy".
537};
538
539// V5.2: [12.5.2] `detach` clause
540template <typename T, typename I, typename E> //
541struct DetachT {
543 using WrapperTrait = std::true_type;
545};
546
547// V5.2: [13.2] `device` clause
548template <typename T, typename I, typename E> //
549struct DeviceT {
551 ENUM(DeviceModifier, Ancestor, DeviceNum);
552 using TupleTrait = std::true_type;
553 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
554};
555
556// [6.0:362]
557template <typename T, typename I, typename E> //
559 using Requires = E;
560 using WrapperTrait = std::true_type;
562};
563
564// V5.2: [13.1] `device_type` clause
565template <typename T, typename I, typename E> //
567 ENUM(DeviceTypeDescription, Any, Host, Nohost);
568 using WrapperTrait = std::true_type;
569 DeviceTypeDescription v;
570};
571
572// V5.2: [11.6.1] `dist_schedule` clause
573template <typename T, typename I, typename E> //
575 ENUM(Kind, Static);
576 using ChunkSize = E;
577 using TupleTrait = std::true_type;
578 std::tuple<Kind, OPT(ChunkSize)> t;
579};
580
581// V5.2: [15.9.6] `doacross` clause
582template <typename T, typename I, typename E> //
583struct DoacrossT {
585 using DependenceType = tomp::type::DependenceType;
586 using TupleTrait = std::true_type;
587 // Empty Vector means "omp_cur_iteration"
588 std::tuple<DependenceType, Vector> t;
589};
590
591// V5.2: [8.2.1] `requirement` clauses
592template <typename T, typename I, typename E> //
594 using Requires = E;
595 using WrapperTrait = std::true_type;
597};
598
599template <typename T, typename I, typename E> //
601 ENUM(AccessGroup, Cgroup);
602 ENUM(Fallback, Abort, Default_Mem, Null);
603 using Size = E;
604 using TupleTrait = std::true_type;
605 std::tuple<OPT(AccessGroup), OPT(Fallback), Size> t;
606};
607
608// V5.2: [5.8.4] `enter` clause
609template <typename T, typename I, typename E> //
610struct EnterT {
612 ENUM(Modifier, Automap);
613 using TupleTrait = std::true_type;
614 std::tuple<OPT(Modifier), List> t;
615};
616
617// V5.2: [5.6.2] `exclusive` clause
618template <typename T, typename I, typename E> //
620 using WrapperTrait = std::true_type;
623};
624
625// V5.2: [15.8.3] `extended-atomic` clauses
626template <typename T, typename I, typename E> //
627struct FailT {
628 using MemoryOrder = type::MemoryOrder;
629 using WrapperTrait = std::true_type;
631};
632
633// V5.2: [10.5.1] `filter` clause
634template <typename T, typename I, typename E> //
635struct FilterT {
636 using ThreadNum = E;
637 using WrapperTrait = std::true_type;
639};
640
641// V5.2: [12.3] `final` clause
642template <typename T, typename I, typename E> //
643struct FinalT {
644 using Finalize = E;
645 using WrapperTrait = std::true_type;
647};
648
649// V5.2: [5.4.4] `firstprivate` clause
650template <typename T, typename I, typename E> //
653 using WrapperTrait = std::true_type;
655};
656
657// V5.2: [5.9.2] `from` clause
658template <typename T, typename I, typename E> //
659struct FromT {
661 using Expectation = type::MotionExpectation;
663 // See note at the definition of the MapperT type.
664 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
665
666 using TupleTrait = std::true_type;
668};
669
670// V5.2: [9.2.1] `full` clause
671template <typename T, typename I, typename E> //
672struct FullT {
673 using EmptyTrait = std::true_type;
674};
675
676// V5.2: [12.6.1] `grainsize` clause
677template <typename T, typename I, typename E> //
679 using Prescriptiveness = type::Prescriptiveness;
680 using GrainSize = E;
681 using TupleTrait = std::true_type;
683};
684
685// [6.0:438] `graph_id` clause
686template <typename T, typename I, typename E> //
687struct GraphIdT {
688 using IncompleteTrait = std::true_type;
689};
690
691// [6.0:438] `graph_reset` clause
692template <typename T, typename I, typename E> //
694 using IncompleteTrait = std::true_type;
695};
696
697// V5.2: [5.4.9] `has_device_addr` clause
698template <typename T, typename I, typename E> //
701 using WrapperTrait = std::true_type;
703};
704
705// V5.2: [15.1.2] `hint` clause
706template <typename T, typename I, typename E> //
707struct HintT {
708 using HintExpr = E;
709 using WrapperTrait = std::true_type;
711};
712
713// V5.2: [8.3.1] Assumption clauses
714template <typename T, typename I, typename E> //
715struct HoldsT {
716 using WrapperTrait = std::true_type;
717 E v; // No argument name in spec 5.2
718};
719
720// V5.2: [3.4] `if` clause
721template <typename T, typename I, typename E> //
722struct IfT {
725 using TupleTrait = std::true_type;
727};
728
729// V5.2: [7.7.1] `branch` clauses
730template <typename T, typename I, typename E> //
731struct InbranchT {
732 using EmptyTrait = std::true_type;
733};
734
735// V5.2: [5.6.1] `exclusive` clause
736template <typename T, typename I, typename E> //
739 using WrapperTrait = std::true_type;
741};
742
743// V5.2: [7.8.3] `indirect` clause
744template <typename T, typename I, typename E> //
745struct IndirectT {
747 using WrapperTrait = std::true_type;
749};
750
751// [6.0:265-266]
752template <typename T, typename I, typename E> //
753struct InductorT {
754 using IncompleteTrait = std::true_type;
755};
756
757// V5.2: [14.1.2] `init` clause
758template <typename T, typename I, typename E> //
759struct InitT {
763 ENUM(InteropType, Target, Targetsync); // Repeatable
764 using InteropTypes = ListT<InteropType>; // Not a spec name
765
766 using TupleTrait = std::true_type;
768};
769
770// V5.2: [5.5.4] `initializer` clause
771template <typename T, typename I, typename E> //
774 using WrapperTrait = std::true_type;
776};
777
778// V5.2: [5.5.10] `in_reduction` clause
779template <typename T, typename I, typename E> //
782 // See note at the definition of the ReductionIdentifierT type.
783 // The name ReductionIdentifiers is not a spec name.
785 using TupleTrait = std::true_type;
786 std::tuple<ReductionIdentifiers, List> t;
787};
788
789// V5.2: [5.4.7] `is_device_ptr` clause
790template <typename T, typename I, typename E> //
793 using WrapperTrait = std::true_type;
795};
796
797// V5.2: [5.4.5] `lastprivate` clause
798template <typename T, typename I, typename E> //
801 ENUM(LastprivateModifier, Conditional);
802 using TupleTrait = std::true_type;
803 std::tuple<OPT(LastprivateModifier), List> t;
804};
805
806// V5.2: [5.4.6] `linear` clause
807template <typename T, typename I, typename E> //
808struct LinearT {
809 // std::get<type> won't work here due to duplicate types in the tuple.
811 // StepSimpleModifier is same as StepComplexModifier.
813 ENUM(LinearModifier, Ref, Val, Uval);
814
815 using TupleTrait = std::true_type;
816 // Step == nullopt means 1.
817 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
818};
819
820// V5.2: [5.8.5] `link` clause
821template <typename T, typename I, typename E> //
822struct LinkT {
824 using WrapperTrait = std::true_type;
826};
827
828// V5.2: [5.8.3] `map` clause
829template <typename T, typename I, typename E> //
830struct MapT {
832 ENUM(MapType, To, From, Tofrom, Storage);
833 ENUM(AttachModifier, Always, Auto, Never);
834 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
835 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
836 // See note at the definition of the MapperT type.
837 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
839 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
840
841 using TupleTrait = std::true_type;
842 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
843 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
845};
846
847// V5.2: [7.5.1] `match` clause
848template <typename T, typename I, typename E> //
849struct MatchT {
850 using IncompleteTrait = std::true_type;
851};
852
853// V5.2: [12.2] `mergeable` clause
854template <typename T, typename I, typename E> //
856 using EmptyTrait = std::true_type;
857};
858
859// V5.2: [8.5.2] `message` clause
860template <typename T, typename I, typename E> //
861struct MessageT {
862 using MsgString = E;
863 using WrapperTrait = std::true_type;
865};
866
867// V5.2: [7.6.2] `nocontext` clause
868template <typename T, typename I, typename E> //
871 using WrapperTrait = std::true_type;
873};
874
875// V5.2: [15.7] `nowait` clause
876template <typename T, typename I, typename E> //
877struct NogroupT {
878 using EmptyTrait = std::true_type;
879};
880
881// V5.2: [10.4.1] `nontemporal` clause
882template <typename T, typename I, typename E> //
885 using WrapperTrait = std::true_type;
887};
888
889// V5.2: [8.3.1] `assumption` clauses
890template <typename T, typename I, typename E> //
891struct NoOpenmpT {
892 using EmptyTrait = std::true_type;
893};
894
895// V5.2: [8.3.1] `assumption` clauses
896template <typename T, typename I, typename E> //
898 using EmptyTrait = std::true_type;
899};
900
901// V6.0: [10.6.1] `assumption` clauses
902template <typename T, typename I, typename E> //
904 using EmptyTrait = std::true_type;
905};
906
907// V5.2: [8.3.1] `assumption` clauses
908template <typename T, typename I, typename E> //
910 using EmptyTrait = std::true_type;
911};
912
913// V5.2: [7.7.1] `branch` clauses
914template <typename T, typename I, typename E> //
916 using EmptyTrait = std::true_type;
917};
918
919// V5.2: [7.6.1] `novariants` clause
920template <typename T, typename I, typename E> //
923 using WrapperTrait = std::true_type;
925};
926
927// V5.2: [15.6] `nowait` clause
928template <typename T, typename I, typename E> //
929struct NowaitT {
930 using EmptyTrait = std::true_type;
931};
932
933// V5.2: [12.6.2] `num_tasks` clause
934template <typename T, typename I, typename E> //
935struct NumTasksT {
936 using Prescriptiveness = type::Prescriptiveness;
937 using NumTasks = E;
938 using TupleTrait = std::true_type;
940};
941
942// V5.2: [10.2.1] `num_teams` clause
943template <typename T, typename I, typename E> //
944struct NumTeamsT {
945 using LowerBound = E;
946 using UpperBound = E;
947
948 // The name Range is not a spec name.
949 struct Range {
950 using TupleTrait = std::true_type;
951 std::tuple<OPT(LowerBound), UpperBound> t;
952 };
953
954 // The name List is not a spec name. The list is an extension to allow
955 // specifying a grid with connection with the ompx_bare clause.
957 using WrapperTrait = std::true_type;
959};
960
961// V5.2: [10.1.2] `num_threads` clause
962template <typename T, typename I, typename E> //
964 using Nthreads = E;
965 using WrapperTrait = std::true_type;
967};
968
969template <typename T, typename I, typename E> //
971 using EmptyTrait = std::true_type;
972};
973
974template <typename T, typename I, typename E> //
975struct OmpxBareT {
976 using EmptyTrait = std::true_type;
977};
978
979template <typename T, typename I, typename E> //
981 using WrapperTrait = std::true_type;
983};
984
985// V5.2: [10.3] `order` clause
986template <typename T, typename I, typename E> //
987struct OrderT {
988 ENUM(OrderModifier, Reproducible, Unconstrained);
989 ENUM(Ordering, Concurrent);
990 using TupleTrait = std::true_type;
991 std::tuple<OPT(OrderModifier), Ordering> t;
992};
993
994// V5.2: [4.4.4] `ordered` clause
995template <typename T, typename I, typename E> //
996struct OrderedT {
997 using N = E;
998 using WrapperTrait = std::true_type;
999 OPT(N) v;
1000};
1001
1002// V5.2: [7.4.2] `otherwise` clause
1003template <typename T, typename I, typename E> //
1005 using IncompleteTrait = std::true_type;
1006};
1007
1008// V5.2: [9.2.2] `partial` clause
1009template <typename T, typename I, typename E> //
1010struct PartialT {
1012 using WrapperTrait = std::true_type;
1014};
1015
1016// V6.0: `permutation` clause
1017template <typename T, typename I, typename E> //
1020 using WrapperTrait = std::true_type;
1022};
1023
1024// V5.2: [12.4] `priority` clause
1025template <typename T, typename I, typename E> //
1028 using WrapperTrait = std::true_type;
1030};
1031
1032// V5.2: [5.4.3] `private` clause
1033template <typename T, typename I, typename E> //
1034struct PrivateT {
1036 using WrapperTrait = std::true_type;
1038};
1039
1040// V5.2: [10.1.4] `proc_bind` clause
1041template <typename T, typename I, typename E> //
1043 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1044 using WrapperTrait = std::true_type;
1045 AffinityPolicy v;
1046};
1047
1048// V5.2: [15.8.2] Atomic clauses
1049template <typename T, typename I, typename E> //
1050struct ReadT {
1051 using EmptyTrait = std::true_type;
1052};
1053
1054// V5.2: [5.5.8] `reduction` clause
1055template <typename T, typename I, typename E> //
1058 // See note at the definition of the ReductionIdentifierT type.
1059 // The name ReductionIdentifiers is not a spec name.
1061 ENUM(ReductionModifier, Default, Inscan, Task);
1062 using TupleTrait = std::true_type;
1063 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1064};
1065
1066// V5.2: [15.8.1] `memory-order` clauses
1067template <typename T, typename I, typename E> //
1068struct RelaxedT {
1069 using EmptyTrait = std::true_type;
1070};
1071
1072// V5.2: [15.8.1] `memory-order` clauses
1073template <typename T, typename I, typename E> //
1074struct ReleaseT {
1075 using EmptyTrait = std::true_type;
1076};
1077
1078// [6.0:440-441] `replayable` clause
1079template <typename T, typename I, typename E> //
1081 using IncompleteTrait = std::true_type;
1082};
1083
1084// V5.2: [8.2.1] `requirement` clauses
1085template <typename T, typename I, typename E> //
1087 using Requires = E;
1088 using WrapperTrait = std::true_type;
1090};
1091
1092// V5.2: [10.4.2] `safelen` clause
1093template <typename T, typename I, typename E> //
1094struct SafelenT {
1095 using Length = E;
1096 using WrapperTrait = std::true_type;
1098};
1099
1100// V5.2: [11.5.3] `schedule` clause
1101template <typename T, typename I, typename E> //
1103 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1104 using ChunkSize = E;
1105 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1106 ENUM(ChunkModifier, Simd);
1107 using TupleTrait = std::true_type;
1108 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1109};
1110
1111// [6.0:361]
1112template <typename T, typename I, typename E> //
1114 using Requires = E;
1115 using WrapperTrait = std::true_type;
1117};
1118
1119// V5.2: [15.8.1] Memory-order clauses
1120template <typename T, typename I, typename E> //
1121struct SeqCstT {
1122 using EmptyTrait = std::true_type;
1123};
1124
1125// V5.2: [8.5.1] `severity` clause
1126template <typename T, typename I, typename E> //
1128 ENUM(SevLevel, Fatal, Warning);
1129 using WrapperTrait = std::true_type;
1130 SevLevel v;
1131};
1132
1133// V5.2: [5.4.2] `shared` clause
1134template <typename T, typename I, typename E> //
1135struct SharedT {
1137 using WrapperTrait = std::true_type;
1139};
1140
1141// V5.2: [15.10.3] `parallelization-level` clauses
1142template <typename T, typename I, typename E> //
1143struct SimdT {
1144 using EmptyTrait = std::true_type;
1145};
1146
1147// V5.2: [10.4.3] `simdlen` clause
1148template <typename T, typename I, typename E> //
1149struct SimdlenT {
1150 using Length = E;
1151 using WrapperTrait = std::true_type;
1153};
1154
1155// V5.2: [9.1.1] `sizes` clause
1156template <typename T, typename I, typename E> //
1157struct SizesT {
1159 using WrapperTrait = std::true_type;
1161};
1162
1163// V5.2: [5.5.9] `task_reduction` clause
1164template <typename T, typename I, typename E> //
1167 // See note at the definition of the ReductionIdentifierT type.
1168 // The name ReductionIdentifiers is not a spec name.
1170 using TupleTrait = std::true_type;
1171 std::tuple<ReductionIdentifiers, List> t;
1172};
1173
1174// V5.2: [13.3] `thread_limit` clause
1175template <typename T, typename I, typename E> //
1177 using Threadlim = E;
1178 using WrapperTrait = std::true_type;
1180};
1181
1182// V5.2: [15.10.3] `parallelization-level` clauses
1183template <typename T, typename I, typename E> //
1184struct ThreadsT {
1185 using EmptyTrait = std::true_type;
1186};
1187
1188// V6.0: [14.8] `threadset` clause
1189template <typename T, typename I, typename E> //
1191 ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team);
1192 using WrapperTrait = std::true_type;
1193 ThreadsetPolicy v;
1194};
1195
1196// V5.2: [5.9.1] `to` clause
1197template <typename T, typename I, typename E> //
1198struct ToT {
1200 using Expectation = type::MotionExpectation;
1201 // See note at the definition of the MapperT type.
1202 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1204
1205 using TupleTrait = std::true_type;
1207};
1208
1209// [6.0:440-441] `transparent` clause
1210template <typename T, typename I, typename E> //
1212 using IncompleteTrait = std::true_type;
1213};
1214
1215// V5.2: [8.2.1] `requirement` clauses
1216template <typename T, typename I, typename E> //
1218 using Requires = E;
1219 using WrapperTrait = std::true_type;
1221};
1222
1223// V5.2: [8.2.1] `requirement` clauses
1224template <typename T, typename I, typename E> //
1226 using Requires = E;
1227 using WrapperTrait = std::true_type;
1229};
1230
1231// V5.2: [5.10] `uniform` clause
1232template <typename T, typename I, typename E> //
1233struct UniformT {
1235 using WrapperTrait = std::true_type;
1237};
1238
1239template <typename T, typename I, typename E> //
1240struct UnknownT {
1241 using EmptyTrait = std::true_type;
1242};
1243
1244// V5.2: [12.1] `untied` clause
1245template <typename T, typename I, typename E> //
1246struct UntiedT {
1247 using EmptyTrait = std::true_type;
1248};
1249
1250// Both of the following
1251// V5.2: [15.8.2] `atomic` clauses
1252// V5.2: [15.9.3] `update` clause
1253template <typename T, typename I, typename E> //
1254struct UpdateT {
1255 using DependenceType = tomp::type::DependenceType;
1256 using WrapperTrait = std::true_type;
1258};
1259
1260// V5.2: [14.1.3] `use` clause
1261template <typename T, typename I, typename E> //
1262struct UseT {
1264 using WrapperTrait = std::true_type;
1266};
1267
1268// V5.2: [5.4.10] `use_device_addr` clause
1269template <typename T, typename I, typename E> //
1272 using WrapperTrait = std::true_type;
1274};
1275
1276// V5.2: [5.4.8] `use_device_ptr` clause
1277template <typename T, typename I, typename E> //
1280 using WrapperTrait = std::true_type;
1282};
1283
1284// V5.2: [6.8] `uses_allocators` clause
1285template <typename T, typename I, typename E> //
1287 using MemSpace = E;
1289 using Allocator = E;
1290 struct AllocatorSpec { // Not a spec name
1291 using TupleTrait = std::true_type;
1293 };
1294 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1295 using WrapperTrait = std::true_type;
1297};
1298
1299// V5.2: [15.8.3] `extended-atomic` clauses
1300template <typename T, typename I, typename E> //
1301struct WeakT {
1302 using EmptyTrait = std::true_type;
1303};
1304
1305// V5.2: [7.4.1] `when` clause
1306template <typename T, typename I, typename E> //
1307struct WhenT {
1308 using IncompleteTrait = std::true_type;
1309};
1310
1311// V5.2: [15.8.2] Atomic clauses
1312template <typename T, typename I, typename E> //
1313struct WriteT {
1314 using EmptyTrait = std::true_type;
1315};
1316
1317// V6: [6.4.7] Looprange clause
1318template <typename T, typename I, typename E> struct LooprangeT {
1319 using Begin = E;
1320 using End = E;
1321
1322 using TupleTrait = std::true_type;
1323 std::tuple<Begin, End> t;
1324};
1325
1326// ---
1327
1328template <typename T, typename I, typename E>
1330 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1332
1333template <typename T, typename I, typename E>
1334using EmptyClausesT = std::variant<
1342
1343template <typename T, typename I, typename E>
1345 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>,
1349
1350template <typename T, typename I, typename E>
1352 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1360
1361template <typename T, typename I, typename E>
1362using UnionClausesT = std::variant<DependT<T, I, E>>;
1363
1364template <typename T, typename I, typename E>
1365using WrapperClausesT = std::variant<
1385
1386template <typename T, typename I, typename E>
1394 >::type;
1395} // namespace clause
1396
1397using type::operator==;
1398
1399// The variant wrapper that encapsulates all possible specific clauses.
1400// The `Extras` arguments are additional types representing local extensions
1401// to the clause set, e.g.
1402//
1403// using Clause = ClauseT<Type, Id, Expr,
1404// MyClause1, MyClause2>;
1405//
1406// The member Clause::u will be a variant containing all specific clauses
1407// defined above, plus MyClause1 and MyClause2.
1408//
1409// Note: Any derived class must be constructible from the base class
1410// ClauseT<...>.
1411template <typename TypeType, typename IdType, typename ExprType,
1412 typename... Extras>
1413struct ClauseT {
1414 using TypeTy = TypeType;
1415 using IdTy = IdType;
1416 using ExprTy = ExprType;
1417
1418 // Type of "self" to specify this type given a derived class type.
1419 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1420
1421 using VariantTy = typename type::Union<
1423 std::variant<Extras...>>::type;
1424
1425 llvm::omp::Clause id; // The numeric id of the clause
1426 using UnionTrait = std::true_type;
1428};
1429
1430template <typename ClauseType> struct DirectiveWithClauses {
1431 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1433};
1434
1435} // namespace tomp
1436
1437#undef OPT
1438#undef ENUM
1439
1440#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:1980
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:1387
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1329
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:1344
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:1334
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1362
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 >, 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:1365
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:1351
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:1415
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1421
ExprType ExprTy
Definition ClauseT.h:1416
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1419
TypeType TypeTy
Definition ClauseT.h:1414
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1432
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 EmptyTrait
Definition ClauseT.h:464
ListT< type::DirectiveName > List
Definition ClauseT.h:470
std::true_type WrapperTrait
Definition ClauseT.h:471
std::true_type WrapperTrait
Definition ClauseT.h:479
ObjectListT< I, E > List
Definition ClauseT.h:478
ObjectListT< I, E > List
Definition ClauseT.h:486
std::true_type WrapperTrait
Definition ClauseT.h:487
DataSharingAttribute v
Definition ClauseT.h:496
std::true_type WrapperTrait
Definition ClauseT.h:495
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:506
std::true_type TupleTrait
Definition ClauseT.h:505
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
Definition ClauseT.h:522
tomp::type::DependenceType DependenceType
Definition ClauseT.h:517
DoacrossT< T, I, E > Doacross
Definition ClauseT.h:525
std::true_type UnionTrait
Definition ClauseT.h:526
ObjectListT< I, E > LocatorList
Definition ClauseT.h:516
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:515
std::variant< Doacross, TaskDep > u
Definition ClauseT.h:527
std::true_type WrapperTrait
Definition ClauseT.h:534
ObjectT< I, E > DestroyVar
Definition ClauseT.h:533
ObjectT< I, E > EventHandle
Definition ClauseT.h:542
std::true_type WrapperTrait
Definition ClauseT.h:543
std::true_type WrapperTrait
Definition ClauseT.h:560
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:553
std::true_type TupleTrait
Definition ClauseT.h:552
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:569
std::true_type WrapperTrait
Definition ClauseT.h:568
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:578
std::true_type TupleTrait
Definition ClauseT.h:577
std::true_type TupleTrait
Definition ClauseT.h:586
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:584
tomp::type::DependenceType DependenceType
Definition ClauseT.h:585
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:588
ENUM(AccessGroup, Cgroup)
ENUM(Fallback, Abort, Default_Mem, Null)
std::tuple< OPT(AccessGroup), OPT(Fallback), Size > t
Definition ClauseT.h:605
std::true_type TupleTrait
Definition ClauseT.h:613
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:614
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:611
std::true_type WrapperTrait
Definition ClauseT.h:620
ObjectListT< I, E > List
Definition ClauseT.h:621
MemoryOrder v
Definition ClauseT.h:630
std::true_type WrapperTrait
Definition ClauseT.h:629
type::MemoryOrder MemoryOrder
Definition ClauseT.h:628
std::true_type WrapperTrait
Definition ClauseT.h:637
std::true_type WrapperTrait
Definition ClauseT.h:645
std::true_type WrapperTrait
Definition ClauseT.h:653
ObjectListT< I, E > List
Definition ClauseT.h:652
std::true_type TupleTrait
Definition ClauseT.h:666
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:662
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:667
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:664
type::MotionExpectation Expectation
Definition ClauseT.h:661
ObjectListT< I, E > LocatorList
Definition ClauseT.h:660
std::true_type EmptyTrait
Definition ClauseT.h:673
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:679
std::true_type TupleTrait
Definition ClauseT.h:681
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:682
std::true_type IncompleteTrait
Definition ClauseT.h:688
std::true_type IncompleteTrait
Definition ClauseT.h:694
ObjectListT< I, E > List
Definition ClauseT.h:700
std::true_type WrapperTrait
Definition ClauseT.h:701
std::true_type WrapperTrait
Definition ClauseT.h:709
std::true_type WrapperTrait
Definition ClauseT.h:716
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:726
std::true_type TupleTrait
Definition ClauseT.h:725
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:723
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:786
std::true_type TupleTrait
Definition ClauseT.h:785
ObjectListT< I, E > List
Definition ClauseT.h:781
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:784
std::true_type EmptyTrait
Definition ClauseT.h:732
std::true_type WrapperTrait
Definition ClauseT.h:739
ObjectListT< I, E > List
Definition ClauseT.h:738
std::true_type WrapperTrait
Definition ClauseT.h:747
OPT(InvokedByFptr) v
std::true_type IncompleteTrait
Definition ClauseT.h:754
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:762
ObjectT< I, E > InteropVar
Definition ClauseT.h:761
ListT< InteropType > InteropTypes
Definition ClauseT.h:764
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:767
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:766
std::true_type WrapperTrait
Definition ClauseT.h:774
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:773
ObjectListT< I, E > List
Definition ClauseT.h:792
std::true_type WrapperTrait
Definition ClauseT.h:793
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:803
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:802
ObjectListT< I, E > List
Definition ClauseT.h:800
std::true_type TupleTrait
Definition ClauseT.h:815
ObjectListT< I, E > List
Definition ClauseT.h:810
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:817
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:824
ObjectListT< I, E > List
Definition ClauseT.h:823
std::tuple< Begin, End > t
Definition ClauseT.h:1323
std::true_type TupleTrait
Definition ClauseT.h:1322
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:837
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:844
ObjectListT< I, E > LocatorList
Definition ClauseT.h:831
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:838
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:839
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:841
std::true_type IncompleteTrait
Definition ClauseT.h:850
std::true_type EmptyTrait
Definition ClauseT.h:856
std::true_type WrapperTrait
Definition ClauseT.h:863
std::true_type EmptyTrait
Definition ClauseT.h:892
std::true_type EmptyTrait
Definition ClauseT.h:910
std::true_type WrapperTrait
Definition ClauseT.h:871
DoNotUpdateContext v
Definition ClauseT.h:872
std::true_type EmptyTrait
Definition ClauseT.h:878
ObjectListT< I, E > List
Definition ClauseT.h:884
std::true_type WrapperTrait
Definition ClauseT.h:885
std::true_type EmptyTrait
Definition ClauseT.h:916
std::true_type WrapperTrait
Definition ClauseT.h:923
DoNotUseVariant v
Definition ClauseT.h:924
std::true_type EmptyTrait
Definition ClauseT.h:930
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:939
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:936
std::true_type TupleTrait
Definition ClauseT.h:938
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:951
std::true_type WrapperTrait
Definition ClauseT.h:957
ListT< Range > List
Definition ClauseT.h:956
std::true_type WrapperTrait
Definition ClauseT.h:965
std::true_type EmptyTrait
Definition ClauseT.h:971
std::true_type EmptyTrait
Definition ClauseT.h:976
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:991
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:990
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:998
std::true_type IncompleteTrait
Definition ClauseT.h:1005
std::true_type WrapperTrait
Definition ClauseT.h:1012
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1020
std::true_type WrapperTrait
Definition ClauseT.h:1028
std::true_type WrapperTrait
Definition ClauseT.h:1036
ObjectListT< I, E > List
Definition ClauseT.h:1035
AffinityPolicy v
Definition ClauseT.h:1045
std::true_type WrapperTrait
Definition ClauseT.h:1044
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1051
std::true_type TupleTrait
Definition ClauseT.h:1062
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1063
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1057
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1060
std::true_type EmptyTrait
Definition ClauseT.h:1069
std::true_type EmptyTrait
Definition ClauseT.h:1075
std::true_type IncompleteTrait
Definition ClauseT.h:1081
std::true_type WrapperTrait
Definition ClauseT.h:1088
std::true_type WrapperTrait
Definition ClauseT.h:1096
std::true_type TupleTrait
Definition ClauseT.h:1107
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1108
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1115
std::true_type EmptyTrait
Definition ClauseT.h:1122
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1129
std::true_type WrapperTrait
Definition ClauseT.h:1137
ObjectListT< I, E > List
Definition ClauseT.h:1136
std::true_type EmptyTrait
Definition ClauseT.h:1144
std::true_type WrapperTrait
Definition ClauseT.h:1151
ListT< E > SizeList
Definition ClauseT.h:1158
std::true_type WrapperTrait
Definition ClauseT.h:1159
ObjectListT< I, E > List
Definition ClauseT.h:1166
std::true_type TupleTrait
Definition ClauseT.h:1170
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1169
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1171
std::true_type WrapperTrait
Definition ClauseT.h:1178
std::true_type EmptyTrait
Definition ClauseT.h:1185
ThreadsetPolicy v
Definition ClauseT.h:1193
std::true_type WrapperTrait
Definition ClauseT.h:1192
ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team)
std::true_type TupleTrait
Definition ClauseT.h:1205
type::MotionExpectation Expectation
Definition ClauseT.h:1200
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1206
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1203
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1199
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1202
std::true_type IncompleteTrait
Definition ClauseT.h:1212
std::true_type WrapperTrait
Definition ClauseT.h:1219
std::true_type WrapperTrait
Definition ClauseT.h:1235
ParameterList v
Definition ClauseT.h:1236
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1234
std::true_type EmptyTrait
Definition ClauseT.h:1241
std::true_type EmptyTrait
Definition ClauseT.h:1247
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1256
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1255
std::true_type WrapperTrait
Definition ClauseT.h:1272
ObjectListT< I, E > List
Definition ClauseT.h:1271
ObjectListT< I, E > List
Definition ClauseT.h:1279
std::true_type WrapperTrait
Definition ClauseT.h:1280
ObjectT< I, E > InteropVar
Definition ClauseT.h:1263
std::true_type WrapperTrait
Definition ClauseT.h:1264
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1292
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1294
std::true_type WrapperTrait
Definition ClauseT.h:1295
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1288
std::true_type EmptyTrait
Definition ClauseT.h:1302
std::true_type IncompleteTrait
Definition ClauseT.h:1308
std::true_type EmptyTrait
Definition ClauseT.h:1314
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