LLVM 23.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// [6.0:372-373]
419template <typename T, typename I, typename E> //
420struct ApplyT {
421 using IncompleteTrait = std::true_type;
422};
423
424// V5.2: [8.1] `at` clause
425template <typename T, typename I, typename E> //
426struct AtT {
427 ENUM(ActionTime, Compilation, Execution);
428 using WrapperTrait = std::true_type;
429 ActionTime v;
430};
431
432// V5.2: [8.2.1] `requirement` clauses
433template <typename T, typename I, typename E> //
435 using MemoryOrder = type::MemoryOrder;
436 using WrapperTrait = std::true_type;
437 MemoryOrder v; // Name not provided in spec
438};
439
440// V5.2: [11.7.1] `bind` clause
441template <typename T, typename I, typename E> //
442struct BindT {
443 ENUM(Binding, Teams, Parallel, Thread);
444 using WrapperTrait = std::true_type;
446};
447
448// V5.2: [15.8.3] `extended-atomic` clauses
449template <typename T, typename I, typename E> //
450struct CaptureT {
451 using EmptyTrait = std::true_type;
452};
453
454// V5.2: [4.4.3] `collapse` clause
455template <typename T, typename I, typename E> //
456struct CollapseT {
457 using N = E;
458 using WrapperTrait = std::true_type;
460};
461
462// [6.0:266]
463template <typename T, typename I, typename E> //
465 using IncompleteTrait = std::true_type;
466};
467
468// [6.0:262]
469template <typename T, typename I, typename E> //
470struct CombinerT {
472 using WrapperTrait = std::true_type;
474};
475
476// V5.2: [15.8.3] `extended-atomic` clauses
477template <typename T, typename I, typename E> //
478struct CompareT {
479 using EmptyTrait = std::true_type;
480};
481
482// V5.2: [8.3.1] `assumption` clauses
483template <typename T, typename I, typename E> //
484struct ContainsT {
486 using WrapperTrait = std::true_type;
488};
489
490// V5.2: [5.7.1] `copyin` clause
491template <typename T, typename I, typename E> //
492struct CopyinT {
494 using WrapperTrait = std::true_type;
496};
497
498// V5.2: [5.7.2] `copyprivate` clause
499template <typename T, typename I, typename E> //
502 using WrapperTrait = std::true_type;
504};
505
506// [6.0:378-379]
507template <typename T, typename I, typename E> //
508struct CountsT {
509 using IncompleteTrait = std::true_type;
510};
511
512// V5.2: [5.4.1] `default` clause
513template <typename T, typename I, typename E> //
514struct DefaultT {
515 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
516 using WrapperTrait = std::true_type;
517 DataSharingAttribute v;
518};
519
520// V5.2: [5.8.7] `defaultmap` clause
521template <typename T, typename I, typename E> //
523 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
524 Present);
525 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
526 using TupleTrait = std::true_type;
527 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
528};
529
530// V5.2: [15.9.5] `depend` clause
531template <typename T, typename I, typename E> //
532struct DependT {
535 using DependenceType = tomp::type::DependenceType;
536 // For the (pre-5.2) doacross spelling of the depend clause on the
537 // ordered directive: depend(source) / depend(sink: vec). Empty Vector
538 // means omp_cur_iteration, matching DoacrossT::Vector. When Vector has a
539 // value, LocatorList must be empty and the dependence type must be Source or
540 // Sink.
542
543 using TupleTrait = std::true_type;
544 // Empty LocatorList means "omp_all_memory".
546};
547
548// [tr14:212-213]
549template <typename T, typename I, typename E> //
550struct DepthT {
551 using DepthExpr = E;
552 using WrapperTrait = std::true_type;
554};
555
556// V5.2: [3.5] `destroy` clause
557template <typename T, typename I, typename E> //
558struct DestroyT {
560 using WrapperTrait = std::true_type;
561 // DestroyVar can be ommitted in "depobj destroy".
563};
564
565// V5.2: [12.5.2] `detach` clause
566template <typename T, typename I, typename E> //
567struct DetachT {
569 using WrapperTrait = std::true_type;
571};
572
573// V5.2: [13.2] `device` clause
574template <typename T, typename I, typename E> //
575struct DeviceT {
577 ENUM(DeviceModifier, Ancestor, DeviceNum);
578 using TupleTrait = std::true_type;
579 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
580};
581
582// [6.0:362]
583template <typename T, typename I, typename E> //
585 using Requires = E;
586 using WrapperTrait = std::true_type;
588};
589
590// V5.2: [13.1] `device_type` clause
591template <typename T, typename I, typename E> //
593 ENUM(DeviceTypeDescription, Any, Host, Nohost);
594 using WrapperTrait = std::true_type;
595 DeviceTypeDescription v;
596};
597
598// V5.2: [11.6.1] `dist_schedule` clause
599template <typename T, typename I, typename E> //
601 ENUM(Kind, Static);
602 using ChunkSize = E;
603 using TupleTrait = std::true_type;
604 std::tuple<Kind, OPT(ChunkSize)> t;
605};
606
607// V5.2: [15.9.6] `doacross` clause
608template <typename T, typename I, typename E> //
609struct DoacrossT {
611 using DependenceType = tomp::type::DependenceType;
612 using TupleTrait = std::true_type;
613 // Empty Vector means "omp_cur_iteration"
614 std::tuple<DependenceType, Vector> t;
615};
616
617// V5.2: [8.2.1] `requirement` clauses
618template <typename T, typename I, typename E> //
620 using Requires = E;
621 using WrapperTrait = std::true_type;
623};
624
625template <typename T, typename I, typename E> //
627 ENUM(AccessGroup, Cgroup);
628 ENUM(Fallback, Abort, Default_Mem, Null);
629 using Size = E;
630 using TupleTrait = std::true_type;
631 std::tuple<OPT(AccessGroup), OPT(Fallback), Size> t;
632};
633
634// V5.2: [5.8.4] `enter` clause
635template <typename T, typename I, typename E> //
636struct EnterT {
638 ENUM(Modifier, Automap);
639 using TupleTrait = std::true_type;
640 std::tuple<OPT(Modifier), List> t;
641};
642
643// V5.2: [5.6.2] `exclusive` clause
644template <typename T, typename I, typename E> //
646 using WrapperTrait = std::true_type;
649};
650
651// V5.2: [15.8.3] `extended-atomic` clauses
652template <typename T, typename I, typename E> //
653struct FailT {
654 using MemoryOrder = type::MemoryOrder;
655 using WrapperTrait = std::true_type;
657};
658
659// V5.2: [10.5.1] `filter` clause
660template <typename T, typename I, typename E> //
661struct FilterT {
662 using ThreadNum = E;
663 using WrapperTrait = std::true_type;
665};
666
667// V5.2: [12.3] `final` clause
668template <typename T, typename I, typename E> //
669struct FinalT {
670 using Finalize = E;
671 using WrapperTrait = std::true_type;
673};
674
675// V5.2: [5.4.4] `firstprivate` clause
676template <typename T, typename I, typename E> //
679 using WrapperTrait = std::true_type;
681};
682
683// V5.2: [5.9.2] `from` clause
684template <typename T, typename I, typename E> //
685struct FromT {
687 using Expectation = type::MotionExpectation;
689 // See note at the definition of the MapperT type.
690 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
691
692 using TupleTrait = std::true_type;
694};
695
696// V5.2: [9.2.1] `full` clause
697template <typename T, typename I, typename E> //
698struct FullT {
699 using EmptyTrait = std::true_type;
700};
701
702// V5.2: [12.6.1] `grainsize` clause
703template <typename T, typename I, typename E> //
705 using Prescriptiveness = type::Prescriptiveness;
706 using GrainSize = E;
707 using TupleTrait = std::true_type;
709};
710
711// [6.0:438] `graph_id` clause
712template <typename T, typename I, typename E> //
713struct GraphIdT {
714 using IncompleteTrait = std::true_type;
715};
716
717// [6.0:438] `graph_reset` clause
718template <typename T, typename I, typename E> //
720 using IncompleteTrait = std::true_type;
721};
722
723// V5.2: [5.4.9] `has_device_addr` clause
724template <typename T, typename I, typename E> //
727 using WrapperTrait = std::true_type;
729};
730
731// V5.2: [15.1.2] `hint` clause
732template <typename T, typename I, typename E> //
733struct HintT {
734 using HintExpr = E;
735 using WrapperTrait = std::true_type;
737};
738
739// V5.2: [8.3.1] Assumption clauses
740template <typename T, typename I, typename E> //
741struct HoldsT {
742 using WrapperTrait = std::true_type;
743 E v; // No argument name in spec 5.2
744};
745
746// V5.2: [3.4] `if` clause
747template <typename T, typename I, typename E> //
748struct IfT {
751 using TupleTrait = std::true_type;
753};
754
755// V5.2: [7.7.1] `branch` clauses
756template <typename T, typename I, typename E> //
757struct InbranchT {
758 using EmptyTrait = std::true_type;
759};
760
761// V5.2: [5.6.1] `exclusive` clause
762template <typename T, typename I, typename E> //
765 using WrapperTrait = std::true_type;
767};
768
769// V5.2: [7.8.3] `indirect` clause
770template <typename T, typename I, typename E> //
771struct IndirectT {
773 using WrapperTrait = std::true_type;
775};
776
777// [6.0:257-261]
778template <typename T, typename I, typename E> //
780 using IncompleteTrait = std::true_type;
781};
782
783// [6.0:265-266]
784template <typename T, typename I, typename E> //
785struct InductorT {
786 using IncompleteTrait = std::true_type;
787};
788
789// V5.2: [14.1.2] `init` clause
790template <typename T, typename I, typename E> //
791struct InitT {
795 ENUM(InteropType, Target, Targetsync); // Repeatable
796 using InteropTypes = ListT<InteropType>; // Not a spec name
797
798 using TupleTrait = std::true_type;
800};
801
802// [6.0:270]
803template <typename T, typename I, typename E> //
805 using IncompleteTrait = std::true_type;
806};
807
808// V5.2: [5.5.4] `initializer` clause
809template <typename T, typename I, typename E> //
812 using WrapperTrait = std::true_type;
814};
815
816// V5.2: [5.5.10] `in_reduction` clause
817template <typename T, typename I, typename E> //
820 // See note at the definition of the ReductionIdentifierT type.
821 // The name ReductionIdentifiers is not a spec name.
823 using TupleTrait = std::true_type;
824 std::tuple<ReductionIdentifiers, List> t;
825};
826
827// [6.0:339-340]
828template <typename T, typename I, typename E> //
829struct InteropT {
830 using IncompleteTrait = std::true_type;
831};
832
833// V5.2: [5.4.7] `is_device_ptr` clause
834template <typename T, typename I, typename E> //
837 using WrapperTrait = std::true_type;
839};
840
841// V5.2: [5.4.5] `lastprivate` clause
842template <typename T, typename I, typename E> //
845 ENUM(LastprivateModifier, Conditional);
846 using TupleTrait = std::true_type;
847 std::tuple<OPT(LastprivateModifier), List> t;
848};
849
850// V5.2: [5.4.6] `linear` clause
851template <typename T, typename I, typename E> //
852struct LinearT {
853 // std::get<type> won't work here due to duplicate types in the tuple.
855 // StepSimpleModifier is same as StepComplexModifier.
857 ENUM(LinearModifier, Ref, Val, Uval);
858
859 using TupleTrait = std::true_type;
860 // Step == nullopt means 1.
861 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
862};
863
864// V5.2: [5.8.5] `link` clause
865template <typename T, typename I, typename E> //
866struct LinkT {
868 using WrapperTrait = std::true_type;
870};
871
872// [6.0:303]
873template <typename T, typename I, typename E> //
874struct LocalT {
875 using IncompleteTrait = std::true_type;
876};
877
878// V6: [6.4.7] Looprange clause
879template <typename T, typename I, typename E> //
881 using Begin = E;
882 using Count = E;
883
884 using TupleTrait = std::true_type;
885 std::tuple<Begin, Count> t;
886};
887
888// V5.2: [5.8.3] `map` clause
889template <typename T, typename I, typename E> //
890struct MapT {
892 ENUM(MapType, To, From, Tofrom, Storage);
893 ENUM(AttachModifier, Always, Auto, Never);
894 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
895 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
896 // See note at the definition of the MapperT type.
897 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
899 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
900
901 using TupleTrait = std::true_type;
902 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
903 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
905};
906
907// V5.2: [7.5.1] `match` clause
908template <typename T, typename I, typename E> //
909struct MatchT {
910 using IncompleteTrait = std::true_type;
911};
912
913// [6.0:493-494]
914template <typename T, typename I, typename E> //
915struct MemscopeT {
916 using IncompleteTrait = std::true_type;
917};
918
919// V5.2: [12.2] `mergeable` clause
920template <typename T, typename I, typename E> //
922 using EmptyTrait = std::true_type;
923};
924
925// V5.2: [8.5.2] `message` clause
926template <typename T, typename I, typename E> //
927struct MessageT {
928 using MsgString = E;
929 using WrapperTrait = std::true_type;
931};
932
933// V5.2: [7.6.2] `nocontext` clause
934template <typename T, typename I, typename E> //
937 using WrapperTrait = std::true_type;
939};
940
941// V5.2: [15.7] `nowait` clause
942template <typename T, typename I, typename E> //
943struct NogroupT {
944 using EmptyTrait = std::true_type;
945};
946
947// V5.2: [10.4.1] `nontemporal` clause
948template <typename T, typename I, typename E> //
951 using WrapperTrait = std::true_type;
953};
954
955// V5.2: [8.3.1] `assumption` clauses
956template <typename T, typename I, typename E> //
957struct NoOpenmpT {
958 using EmptyTrait = std::true_type;
959};
960
961// V6.0: [10.6.1] `assumption` clauses
962template <typename T, typename I, typename E> //
964 using EmptyTrait = std::true_type;
965};
966
967// V5.2: [8.3.1] `assumption` clauses
968template <typename T, typename I, typename E> //
970 using EmptyTrait = std::true_type;
971};
972
973// V5.2: [8.3.1] `assumption` clauses
974template <typename T, typename I, typename E> //
976 using EmptyTrait = std::true_type;
977};
978
979// V5.2: [7.7.1] `branch` clauses
980template <typename T, typename I, typename E> //
982 using EmptyTrait = std::true_type;
983};
984
985// V5.2: [7.6.1] `novariants` clause
986template <typename T, typename I, typename E> //
989 using WrapperTrait = std::true_type;
991};
992
993// V5.2: [15.6] `nowait` clause
994template <typename T, typename I, typename E> //
995struct NowaitT {
996 using EmptyTrait = std::true_type;
997};
998
999// V5.2: [12.6.2] `num_tasks` clause
1000template <typename T, typename I, typename E> //
1002 using Prescriptiveness = type::Prescriptiveness;
1003 using NumTasks = E;
1004 using TupleTrait = std::true_type;
1006};
1007
1008// V5.2: [10.2.1] `num_teams` clause
1009// V6.1: Extended with dims modifier support
1010template <typename T, typename I, typename E> //
1012 using LowerBound = E;
1013 using UpperBound = E;
1015
1016 using TupleTrait = std::true_type;
1017 // Representation: {LB?, [UB]}
1019};
1020
1021// V5.2: [10.1.2] `num_threads` clause
1022// V6.1: Extended with dims modifier support
1023template <typename T, typename I, typename E> //
1025 using Nthreads = E;
1027 using WrapperTrait = std::true_type;
1029};
1030
1031template <typename T, typename I, typename E> //
1033 using EmptyTrait = std::true_type;
1034};
1035
1036template <typename T, typename I, typename E> //
1038 using EmptyTrait = std::true_type;
1039};
1040
1041template <typename T, typename I, typename E> //
1043 using WrapperTrait = std::true_type;
1045};
1046
1047// V5.2: [10.3] `order` clause
1048template <typename T, typename I, typename E> //
1049struct OrderT {
1050 ENUM(OrderModifier, Reproducible, Unconstrained);
1051 ENUM(Ordering, Concurrent);
1052 using TupleTrait = std::true_type;
1053 std::tuple<OPT(OrderModifier), Ordering> t;
1054};
1055
1056// V5.2: [4.4.4] `ordered` clause
1057template <typename T, typename I, typename E> //
1058struct OrderedT {
1059 using N = E;
1060 using WrapperTrait = std::true_type;
1061 OPT(N) v;
1062};
1063
1064// V5.2: [7.4.2] `otherwise` clause
1065template <typename T, typename I, typename E> //
1067 using IncompleteTrait = std::true_type;
1068};
1069
1070// V5.2: [9.2.2] `partial` clause
1071template <typename T, typename I, typename E> //
1072struct PartialT {
1074 using WrapperTrait = std::true_type;
1076};
1077
1078// V6.0: `permutation` clause
1079template <typename T, typename I, typename E> //
1082 using WrapperTrait = std::true_type;
1084};
1085
1086// V5.2: [12.4] `priority` clause
1087template <typename T, typename I, typename E> //
1090 using WrapperTrait = std::true_type;
1092};
1093
1094// V5.2: [5.4.3] `private` clause
1095template <typename T, typename I, typename E> //
1096struct PrivateT {
1098 using WrapperTrait = std::true_type;
1100};
1101
1102// V5.2: [10.1.4] `proc_bind` clause
1103template <typename T, typename I, typename E> //
1105 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1106 using WrapperTrait = std::true_type;
1107 AffinityPolicy v;
1108};
1109
1110// V5.2: [15.8.2] Atomic clauses
1111template <typename T, typename I, typename E> //
1112struct ReadT {
1113 using EmptyTrait = std::true_type;
1114};
1115
1116// V5.2: [5.5.8] `reduction` clause
1117template <typename T, typename I, typename E> //
1120 // See note at the definition of the ReductionIdentifierT type.
1121 // The name ReductionIdentifiers is not a spec name.
1123 ENUM(ReductionModifier, Default, Inscan, Task);
1124 using TupleTrait = std::true_type;
1125 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1126};
1127
1128// V5.2: [15.8.1] `memory-order` clauses
1129template <typename T, typename I, typename E> //
1130struct RelaxedT {
1131 using EmptyTrait = std::true_type;
1132};
1133
1134// V5.2: [15.8.1] `memory-order` clauses
1135template <typename T, typename I, typename E> //
1136struct ReleaseT {
1137 using EmptyTrait = std::true_type;
1138};
1139
1140// [6.0:440-441] `replayable` clause
1141template <typename T, typename I, typename E> //
1143 using IncompleteTrait = std::true_type;
1144};
1145
1146// V5.2: [8.2.1] `requirement` clauses
1147template <typename T, typename I, typename E> //
1149 using Requires = E;
1150 using WrapperTrait = std::true_type;
1152};
1153
1154// V5.2: [10.4.2] `safelen` clause
1155template <typename T, typename I, typename E> //
1156struct SafelenT {
1157 using Length = E;
1158 using WrapperTrait = std::true_type;
1160};
1161
1162// [6.0:393]
1163template <typename T, typename I, typename E> //
1165 using IncompleteTrait = std::true_type;
1166};
1167
1168// V5.2: [11.5.3] `schedule` clause
1169template <typename T, typename I, typename E> //
1171 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1172 using ChunkSize = E;
1173 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1174 ENUM(ChunkModifier, Simd);
1175 using TupleTrait = std::true_type;
1176 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1177};
1178
1179// [6.0:361]
1180template <typename T, typename I, typename E> //
1182 using Requires = E;
1183 using WrapperTrait = std::true_type;
1185};
1186
1187// V5.2: [15.8.1] Memory-order clauses
1188template <typename T, typename I, typename E> //
1189struct SeqCstT {
1190 using EmptyTrait = std::true_type;
1191};
1192
1193// V5.2: [8.5.1] `severity` clause
1194template <typename T, typename I, typename E> //
1196 ENUM(SevLevel, Fatal, Warning);
1197 using WrapperTrait = std::true_type;
1198 SevLevel v;
1199};
1200
1201// V5.2: [5.4.2] `shared` clause
1202template <typename T, typename I, typename E> //
1203struct SharedT {
1205 using WrapperTrait = std::true_type;
1207};
1208
1209// V5.2: [15.10.3] `parallelization-level` clauses
1210template <typename T, typename I, typename E> //
1211struct SimdT {
1212 using EmptyTrait = std::true_type;
1213};
1214
1215// V5.2: [10.4.3] `simdlen` clause
1216template <typename T, typename I, typename E> //
1217struct SimdlenT {
1218 using Length = E;
1219 using WrapperTrait = std::true_type;
1221};
1222
1223// V5.2: [9.1.1] `sizes` clause
1224template <typename T, typename I, typename E> //
1225struct SizesT {
1227 using WrapperTrait = std::true_type;
1229};
1230
1231// V5.2: [5.5.9] `task_reduction` clause
1232template <typename T, typename I, typename E> //
1235 // See note at the definition of the ReductionIdentifierT type.
1236 // The name ReductionIdentifiers is not a spec name.
1238 using TupleTrait = std::true_type;
1239 std::tuple<ReductionIdentifiers, List> t;
1240};
1241
1242// V5.2: [13.3] `thread_limit` clause
1243// V6.1: Extended with dims modifier support
1244template <typename T, typename I, typename E> //
1246 using Threadlim = E;
1248 using WrapperTrait = std::true_type;
1250};
1251
1252// V5.2: [15.10.3] `parallelization-level` clauses
1253template <typename T, typename I, typename E> //
1254struct ThreadsT {
1255 using EmptyTrait = std::true_type;
1256};
1257
1258// V6.0: [14.8] `threadset` clause
1259template <typename T, typename I, typename E> //
1261 ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team);
1262 using WrapperTrait = std::true_type;
1263 ThreadsetPolicy v;
1264};
1265
1266// V5.2: [5.9.1] `to` clause
1267template <typename T, typename I, typename E> //
1268struct ToT {
1270 using Expectation = type::MotionExpectation;
1271 // See note at the definition of the MapperT type.
1272 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1274
1275 using TupleTrait = std::true_type;
1277};
1278
1279// [6.0:510:25] `transparent` clause
1280template <typename T, typename I, typename E> //
1282 using IncompleteTrait = std::true_type;
1283};
1284
1285// V5.2: [8.2.1] `requirement` clauses
1286template <typename T, typename I, typename E> //
1288 using Requires = E;
1289 using WrapperTrait = std::true_type;
1291};
1292
1293// V5.2: [8.2.1] `requirement` clauses
1294template <typename T, typename I, typename E> //
1296 using Requires = E;
1297 using WrapperTrait = std::true_type;
1299};
1300
1301// V5.2: [5.10] `uniform` clause
1302template <typename T, typename I, typename E> //
1303struct UniformT {
1305 using WrapperTrait = std::true_type;
1307};
1308
1309template <typename T, typename I, typename E> //
1310struct UnknownT {
1311 using EmptyTrait = std::true_type;
1312};
1313
1314// V5.2: [12.1] `untied` clause
1315template <typename T, typename I, typename E> //
1316struct UntiedT {
1317 using EmptyTrait = std::true_type;
1318};
1319
1320// Both of the following
1321// V5.2: [15.8.2] `atomic` clauses
1322// V5.2: [15.9.3] `update` clause
1323template <typename T, typename I, typename E> //
1324struct UpdateT {
1325 using DependenceType = tomp::type::DependenceType;
1326 using WrapperTrait = std::true_type;
1328};
1329
1330// V5.2: [14.1.3] `use` clause
1331template <typename T, typename I, typename E> //
1332struct UseT {
1334 using WrapperTrait = std::true_type;
1336};
1337
1338// V5.2: [5.4.10] `use_device_addr` clause
1339template <typename T, typename I, typename E> //
1342 using WrapperTrait = std::true_type;
1344};
1345
1346// V5.2: [5.4.8] `use_device_ptr` clause
1347template <typename T, typename I, typename E> //
1350 using WrapperTrait = std::true_type;
1352};
1353
1354// V5.2: [6.8] `uses_allocators` clause
1355template <typename T, typename I, typename E> //
1357 using MemSpace = E;
1359 using Allocator = E;
1360 struct AllocatorSpec { // Not a spec name
1361 using TupleTrait = std::true_type;
1363 };
1364 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1365 using WrapperTrait = std::true_type;
1367};
1368
1369// V5.2: [15.8.3] `extended-atomic` clauses
1370template <typename T, typename I, typename E> //
1371struct WeakT {
1372 using EmptyTrait = std::true_type;
1373};
1374
1375// V5.2: [7.4.1] `when` clause
1376template <typename T, typename I, typename E> //
1377struct WhenT {
1378 using IncompleteTrait = std::true_type;
1379};
1380
1381// V5.2: [15.8.2] Atomic clauses
1382template <typename T, typename I, typename E> //
1383struct WriteT {
1384 using EmptyTrait = std::true_type;
1385};
1386
1387// ---
1388
1389template <typename T, typename I, typename E>
1391 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1393
1394template <typename T, typename I, typename E>
1395using EmptyClausesT = std::variant<
1403
1404template <typename T, typename I, typename E>
1406 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, ApplyT<T, I, E>,
1413
1414template <typename T, typename I, typename E>
1416 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1424
1425template <typename T, typename I, typename E>
1426using UnionClausesT = std::variant<DependT<T, I, E>>;
1427
1428template <typename T, typename I, typename E>
1429using WrapperClausesT = std::variant<
1449
1450template <typename T, typename I, typename E>
1458 >::type;
1459} // namespace clause
1460
1461using type::operator==;
1462
1463// The variant wrapper that encapsulates all possible specific clauses.
1464// The `Extras` arguments are additional types representing local extensions
1465// to the clause set, e.g.
1466//
1467// using Clause = ClauseT<Type, Id, Expr,
1468// MyClause1, MyClause2>;
1469//
1470// The member Clause::u will be a variant containing all specific clauses
1471// defined above, plus MyClause1 and MyClause2.
1472//
1473// Note: Any derived class must be constructible from the base class
1474// ClauseT<...>.
1475template <typename TypeType, typename IdType, typename ExprType,
1476 typename... Extras>
1477struct ClauseT {
1478 using TypeTy = TypeType;
1479 using IdTy = IdType;
1480 using ExprTy = ExprType;
1481
1482 // Type of "self" to specify this type given a derived class type.
1483 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1484
1485 using VariantTy = typename type::Union<
1487 std::variant<Extras...>>::type;
1488
1489 llvm::omp::Clause id; // The numeric id of the clause
1490 using UnionTrait = std::true_type;
1492};
1493
1494template <typename ClauseType> struct DirectiveWithClauses {
1495 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1497};
1498
1499} // namespace tomp
1500
1501#undef OPT
1502#undef ENUM
1503
1504#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
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:2025
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:861
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:1451
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1390
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 >, DepthT< 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:1429
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:1395
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, ApplyT< T, I, E >, CollectorT< T, I, E >, CountsT< T, I, E >, GraphIdT< T, I, E >, GraphResetT< T, I, E >, InductionT< T, I, E >, InductorT< T, I, E >, InitCompleteT< T, I, E >, InteropT< T, I, E >, LocalT< T, I, E >, MatchT< T, I, E >, MemscopeT< T, I, E >, OtherwiseT< T, I, E >, ReplayableT< T, I, E >, SafesyncT< T, I, E >, TransparentT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition ClauseT.h:1405
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1426
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:1415
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:1479
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1485
ExprType ExprTy
Definition ClauseT.h:1480
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1483
TypeType TypeTy
Definition ClauseT.h:1478
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1496
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
std::true_type IncompleteTrait
Definition ClauseT.h:421
ActionTime v
Definition ClauseT.h:429
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition ClauseT.h:428
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition ClauseT.h:444
std::true_type EmptyTrait
Definition ClauseT.h:451
std::true_type WrapperTrait
Definition ClauseT.h:458
std::true_type IncompleteTrait
Definition ClauseT.h:465
std::true_type WrapperTrait
Definition ClauseT.h:472
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:471
std::true_type EmptyTrait
Definition ClauseT.h:479
ListT< type::DirectiveName > List
Definition ClauseT.h:485
std::true_type WrapperTrait
Definition ClauseT.h:486
std::true_type WrapperTrait
Definition ClauseT.h:494
ObjectListT< I, E > List
Definition ClauseT.h:493
ObjectListT< I, E > List
Definition ClauseT.h:501
std::true_type WrapperTrait
Definition ClauseT.h:502
std::true_type IncompleteTrait
Definition ClauseT.h:509
DataSharingAttribute v
Definition ClauseT.h:517
std::true_type WrapperTrait
Definition ClauseT.h:516
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:527
std::true_type TupleTrait
Definition ClauseT.h:526
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:541
tomp::type::DependenceType DependenceType
Definition ClauseT.h:535
std::tuple< DependenceType, OPT(Iterator), OPT(Vector), LocatorList > t
Definition ClauseT.h:545
ObjectListT< I, E > LocatorList
Definition ClauseT.h:534
std::true_type TupleTrait
Definition ClauseT.h:543
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:533
std::true_type WrapperTrait
Definition ClauseT.h:552
std::true_type WrapperTrait
Definition ClauseT.h:560
ObjectT< I, E > DestroyVar
Definition ClauseT.h:559
ObjectT< I, E > EventHandle
Definition ClauseT.h:568
std::true_type WrapperTrait
Definition ClauseT.h:569
std::true_type WrapperTrait
Definition ClauseT.h:586
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:579
std::true_type TupleTrait
Definition ClauseT.h:578
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:595
std::true_type WrapperTrait
Definition ClauseT.h:594
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:604
std::true_type TupleTrait
Definition ClauseT.h:603
std::true_type TupleTrait
Definition ClauseT.h:612
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:610
tomp::type::DependenceType DependenceType
Definition ClauseT.h:611
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:614
ENUM(AccessGroup, Cgroup)
ENUM(Fallback, Abort, Default_Mem, Null)
std::tuple< OPT(AccessGroup), OPT(Fallback), Size > t
Definition ClauseT.h:631
std::true_type TupleTrait
Definition ClauseT.h:639
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:640
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:637
std::true_type WrapperTrait
Definition ClauseT.h:646
ObjectListT< I, E > List
Definition ClauseT.h:647
MemoryOrder v
Definition ClauseT.h:656
std::true_type WrapperTrait
Definition ClauseT.h:655
type::MemoryOrder MemoryOrder
Definition ClauseT.h:654
std::true_type WrapperTrait
Definition ClauseT.h:663
std::true_type WrapperTrait
Definition ClauseT.h:671
std::true_type WrapperTrait
Definition ClauseT.h:679
ObjectListT< I, E > List
Definition ClauseT.h:678
std::true_type TupleTrait
Definition ClauseT.h:692
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:688
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:693
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:690
type::MotionExpectation Expectation
Definition ClauseT.h:687
ObjectListT< I, E > LocatorList
Definition ClauseT.h:686
std::true_type EmptyTrait
Definition ClauseT.h:699
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:705
std::true_type TupleTrait
Definition ClauseT.h:707
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:708
std::true_type IncompleteTrait
Definition ClauseT.h:714
std::true_type IncompleteTrait
Definition ClauseT.h:720
ObjectListT< I, E > List
Definition ClauseT.h:726
std::true_type WrapperTrait
Definition ClauseT.h:727
std::true_type WrapperTrait
Definition ClauseT.h:735
std::true_type WrapperTrait
Definition ClauseT.h:742
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:752
std::true_type TupleTrait
Definition ClauseT.h:751
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:749
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:824
std::true_type TupleTrait
Definition ClauseT.h:823
ObjectListT< I, E > List
Definition ClauseT.h:819
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:822
std::true_type EmptyTrait
Definition ClauseT.h:758
std::true_type WrapperTrait
Definition ClauseT.h:765
ObjectListT< I, E > List
Definition ClauseT.h:764
std::true_type WrapperTrait
Definition ClauseT.h:773
OPT(InvokedByFptr) v
std::true_type IncompleteTrait
Definition ClauseT.h:780
std::true_type IncompleteTrait
Definition ClauseT.h:786
std::true_type IncompleteTrait
Definition ClauseT.h:805
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:794
ObjectT< I, E > InteropVar
Definition ClauseT.h:793
ListT< InteropType > InteropTypes
Definition ClauseT.h:796
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:799
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:798
std::true_type WrapperTrait
Definition ClauseT.h:812
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:811
std::true_type IncompleteTrait
Definition ClauseT.h:830
ObjectListT< I, E > List
Definition ClauseT.h:836
std::true_type WrapperTrait
Definition ClauseT.h:837
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:847
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:846
ObjectListT< I, E > List
Definition ClauseT.h:844
std::true_type TupleTrait
Definition ClauseT.h:859
ObjectListT< I, E > List
Definition ClauseT.h:854
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:861
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:868
ObjectListT< I, E > List
Definition ClauseT.h:867
std::true_type IncompleteTrait
Definition ClauseT.h:875
std::true_type TupleTrait
Definition ClauseT.h:884
std::tuple< Begin, Count > t
Definition ClauseT.h:885
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:897
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:904
ObjectListT< I, E > LocatorList
Definition ClauseT.h:891
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:898
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:899
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:901
std::true_type IncompleteTrait
Definition ClauseT.h:910
std::true_type IncompleteTrait
Definition ClauseT.h:916
std::true_type EmptyTrait
Definition ClauseT.h:922
std::true_type WrapperTrait
Definition ClauseT.h:929
std::true_type EmptyTrait
Definition ClauseT.h:958
std::true_type EmptyTrait
Definition ClauseT.h:976
std::true_type WrapperTrait
Definition ClauseT.h:937
DoNotUpdateContext v
Definition ClauseT.h:938
std::true_type EmptyTrait
Definition ClauseT.h:944
ObjectListT< I, E > List
Definition ClauseT.h:950
std::true_type WrapperTrait
Definition ClauseT.h:951
std::true_type EmptyTrait
Definition ClauseT.h:982
std::true_type WrapperTrait
Definition ClauseT.h:989
DoNotUseVariant v
Definition ClauseT.h:990
std::true_type EmptyTrait
Definition ClauseT.h:996
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:1005
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:1002
std::true_type TupleTrait
Definition ClauseT.h:1004
ListT< UpperBound > UpperBoundList
Definition ClauseT.h:1014
std::tuple< OPT(LowerBound), UpperBoundList > t
Definition ClauseT.h:1018
std::true_type TupleTrait
Definition ClauseT.h:1016
std::true_type WrapperTrait
Definition ClauseT.h:1027
ListT< Nthreads > List
Definition ClauseT.h:1026
std::true_type EmptyTrait
Definition ClauseT.h:1033
std::true_type EmptyTrait
Definition ClauseT.h:1038
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:1053
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:1052
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:1060
std::true_type IncompleteTrait
Definition ClauseT.h:1067
std::true_type WrapperTrait
Definition ClauseT.h:1074
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1082
std::true_type WrapperTrait
Definition ClauseT.h:1090
std::true_type WrapperTrait
Definition ClauseT.h:1098
ObjectListT< I, E > List
Definition ClauseT.h:1097
AffinityPolicy v
Definition ClauseT.h:1107
std::true_type WrapperTrait
Definition ClauseT.h:1106
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1113
std::true_type TupleTrait
Definition ClauseT.h:1124
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1125
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1119
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1122
std::true_type EmptyTrait
Definition ClauseT.h:1131
std::true_type EmptyTrait
Definition ClauseT.h:1137
std::true_type IncompleteTrait
Definition ClauseT.h:1143
std::true_type WrapperTrait
Definition ClauseT.h:1150
std::true_type WrapperTrait
Definition ClauseT.h:1158
std::true_type IncompleteTrait
Definition ClauseT.h:1165
std::true_type TupleTrait
Definition ClauseT.h:1175
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1176
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1183
std::true_type EmptyTrait
Definition ClauseT.h:1190
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1197
std::true_type WrapperTrait
Definition ClauseT.h:1205
ObjectListT< I, E > List
Definition ClauseT.h:1204
std::true_type EmptyTrait
Definition ClauseT.h:1212
std::true_type WrapperTrait
Definition ClauseT.h:1219
ListT< E > SizeList
Definition ClauseT.h:1226
std::true_type WrapperTrait
Definition ClauseT.h:1227
ObjectListT< I, E > List
Definition ClauseT.h:1234
std::true_type TupleTrait
Definition ClauseT.h:1238
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1237
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1239
ListT< Threadlim > List
Definition ClauseT.h:1247
std::true_type WrapperTrait
Definition ClauseT.h:1248
std::true_type EmptyTrait
Definition ClauseT.h:1255
ThreadsetPolicy v
Definition ClauseT.h:1263
std::true_type WrapperTrait
Definition ClauseT.h:1262
ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team)
std::true_type TupleTrait
Definition ClauseT.h:1275
type::MotionExpectation Expectation
Definition ClauseT.h:1270
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1276
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1273
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1269
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1272
std::true_type IncompleteTrait
Definition ClauseT.h:1282
std::true_type WrapperTrait
Definition ClauseT.h:1289
std::true_type WrapperTrait
Definition ClauseT.h:1305
ParameterList v
Definition ClauseT.h:1306
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1304
std::true_type EmptyTrait
Definition ClauseT.h:1311
std::true_type EmptyTrait
Definition ClauseT.h:1317
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1326
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1325
std::true_type WrapperTrait
Definition ClauseT.h:1342
ObjectListT< I, E > List
Definition ClauseT.h:1341
ObjectListT< I, E > List
Definition ClauseT.h:1349
std::true_type WrapperTrait
Definition ClauseT.h:1350
ObjectT< I, E > InteropVar
Definition ClauseT.h:1333
std::true_type WrapperTrait
Definition ClauseT.h:1334
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1362
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1364
std::true_type WrapperTrait
Definition ClauseT.h:1365
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1358
std::true_type EmptyTrait
Definition ClauseT.h:1372
std::true_type IncompleteTrait
Definition ClauseT.h:1378
std::true_type EmptyTrait
Definition ClauseT.h:1384
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