LLVM 20.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 <algorithm>
54#include <iterator>
55#include <optional>
56#include <tuple>
57#include <type_traits>
58#include <utility>
59#include <variant>
60
61#define ENUM(Name, ...) enum class Name { __VA_ARGS__ }
62#define OPT(x) std::optional<x>
63
64// A number of OpenMP clauses contain values that come from a given set of
65// possibilities. In the IR these are usually represented by enums. Both
66// clang and flang use different types for the enums, and the enum elements
67// representing the same thing may have different values between clang and
68// flang.
69// Since the representation below tries to adhere to the spec, and be source
70// language agnostic, it defines its own enums, independent from any language
71// frontend. As a consequence, when instantiating the templates below,
72// frontend-specific enums need to be translated into the representation
73// used here. The macros below are intended to assist with the conversion.
74
75// Helper macro for enum-class conversion.
76#define CLAUSET_SCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
77 if (v == OtherEnum::Ov) { \
78 return ThisEnum::Tv; \
79 }
80
81// Helper macro for enum (non-class) conversion.
82#define CLAUSET_UNSCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
83 if (v == Ov) { \
84 return ThisEnum::Tv; \
85 }
86
87#define CLAUSET_ENUM_CONVERT(func, OtherE, ThisE, Maps) \
88 auto func = [](OtherE v) -> ThisE { \
89 using ThisEnum = ThisE; \
90 using OtherEnum = OtherE; \
91 (void)sizeof(OtherEnum); /*Avoid "unused local typedef" warning*/ \
92 Maps; \
93 llvm_unreachable("Unexpected value in " #OtherE); \
94 }
95
96// Usage:
97//
98// Given two enums,
99// enum class Other { o1, o2 };
100// enum class This { t1, t2 };
101// generate conversion function "Func : Other -> This" with
102// CLAUSET_ENUM_CONVERT(
103// Func, Other, This,
104// CLAUSET_ENUM_MEMBER_CONVERT(o1, t1) // <- No comma
105// CLAUSET_ENUM_MEMBER_CONVERT(o2, t2)
106// ...
107// )
108//
109// Note that the sequence of M(other-value, this-value) is separated
110// with _spaces_, not commas.
111
112namespace detail {
113// Type trait to determine whether T is a specialization of std::variant.
114template <typename T> struct is_variant {
115 static constexpr bool value = false;
116};
117
118template <typename... Ts> struct is_variant<std::variant<Ts...>> {
119 static constexpr bool value = true;
120};
121
122template <typename T> constexpr bool is_variant_v = is_variant<T>::value;
123
124// Helper utility to create a type which is a union of two given variants.
125template <typename...> struct UnionOfTwo;
126
127template <typename... Types1, typename... Types2>
128struct UnionOfTwo<std::variant<Types1...>, std::variant<Types2...>> {
129 using type = std::variant<Types1..., Types2...>;
130};
131} // namespace detail
132
133namespace tomp {
134namespace type {
135
136// Helper utility to create a type which is a union of an arbitrary number
137// of variants.
138template <typename...> struct Union;
139
140template <> struct Union<> {
141 // Legal to define, illegal to instantiate.
142 using type = std::variant<>;
143};
144
145template <typename T, typename... Ts> struct Union<T, Ts...> {
146 static_assert(detail::is_variant_v<T>);
147 using type =
148 typename detail::UnionOfTwo<T, typename Union<Ts...>::type>::type;
149};
150
151template <typename T> using ListT = llvm::SmallVector<T, 0>;
152
153// The ObjectT class represents a variable or a locator (as defined in
154// the OpenMP spec).
155// Note: the ObjectT template is not defined. Any user of it is expected to
156// provide their own specialization that conforms to the requirements listed
157// below.
158//
159// Let ObjectS be any specialization of ObjectT:
160//
161// ObjectS must provide the following definitions:
162// {
163// using IdTy = Id;
164// using ExprTy = Expr;
165//
166// auto id() const -> IdTy {
167// // Return a value such that a.id() == b.id() if and only if:
168// // (1) both `a` and `b` represent the same variable or location, or
169// // (2) bool(a.id()) == false and bool(b.id()) == false
170// }
171// }
172//
173// The type IdTy should be hashable (usable as key in unordered containers).
174//
175// Values of type IdTy should be contextually convertible to `bool`.
176//
177// If S is an object of type ObjectS, then `bool(S.id())` is `false` if
178// and only if S does not represent any variable or location.
179//
180// ObjectS should be copyable, movable, and default-constructible.
181template <typename IdType, typename ExprType> struct ObjectT;
182
183// By default, object equality is only determined by its identity.
184template <typename I, typename E>
185bool operator==(const ObjectT<I, E> &o1, const ObjectT<I, E> &o2) {
186 return o1.id() == o2.id();
187}
188
189template <typename I, typename E> using ObjectListT = ListT<ObjectT<I, E>>;
190
191using DirectiveName = llvm::omp::Directive;
192
193template <typename I, typename E> //
196 using WrapperTrait = std::true_type;
198 };
199 ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT,
200 LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max);
201 using UnionTrait = std::true_type;
202 std::variant<DefinedOpName, IntrinsicOperator> u;
203};
204
205// V5.2: [3.2.6] `iterator` modifier
206template <typename E> //
207struct RangeT {
208 // range-specification: begin : end[: step]
209 using TupleTrait = std::true_type;
210 std::tuple<E, E, OPT(E)> t;
211};
212
213// V5.2: [3.2.6] `iterator` modifier
214template <typename TypeType, typename IdType, typename ExprType> //
216 // iterators-specifier: [ iterator-type ] identifier = range-specification
217 using TupleTrait = std::true_type;
219};
220
221// Note:
222// For motion or map clauses the OpenMP spec allows a unique mapper modifier.
223// In practice, since these clauses apply to multiple objects, there can be
224// multiple effective mappers applicable to these objects (due to overloads,
225// etc.). Because of that store a list of mappers every time a mapper modifier
226// is allowed. If the mapper list contains a single element, it applies to
227// all objects in the clause, otherwise there should be as many mappers as
228// there are objects.
229// V5.2: [5.8.2] Mapper identifiers and `mapper` modifiers
230template <typename I, typename E> //
231struct MapperT {
233 using WrapperTrait = std::true_type;
235};
236
237// V5.2: [15.8.1] `memory-order` clauses
238// When used as arguments for other clauses, e.g. `fail`.
239ENUM(MemoryOrder, AcqRel, Acquire, Relaxed, Release, SeqCst);
240ENUM(MotionExpectation, Present);
241// V5.2: [15.9.1] `task-dependence-type` modifier
242ENUM(TaskDependenceType, In, Out, Inout, Mutexinoutset, Inoutset, Depobj);
243
244template <typename I, typename E> //
246 struct Distance {
247 using TupleTrait = std::true_type;
248 std::tuple<DefinedOperatorT<I, E>, E> t;
249 };
250 using TupleTrait = std::true_type;
251 std::tuple<ObjectT<I, E>, OPT(Distance)> t;
252};
253
254template <typename I, typename E> //
256 using WrapperTrait = std::true_type;
258};
259
260// Note:
261// For reduction clauses the OpenMP spec allows a unique reduction identifier.
262// For reasons analogous to those listed for the MapperT type, clauses that
263// according to the spec contain a reduction identifier will contain a list of
264// reduction identifiers. The same constraints apply: there is either a single
265// identifier that applies to all objects, or there are as many identifiers
266// as there are objects.
267template <typename I, typename E> //
269 using UnionTrait = std::true_type;
270 std::variant<DefinedOperatorT<I, E>, ProcedureDesignatorT<I, E>> u;
271};
272
273template <typename T, typename I, typename E> //
275
276template <typename T>
277std::enable_if_t<T::EmptyTrait::value, bool> operator==(const T &a,
278 const T &b) {
279 return true;
280}
281template <typename T>
282std::enable_if_t<T::IncompleteTrait::value, bool> operator==(const T &a,
283 const T &b) {
284 return true;
285}
286template <typename T>
287std::enable_if_t<T::WrapperTrait::value, bool> operator==(const T &a,
288 const T &b) {
289 return a.v == b.v;
290}
291template <typename T>
292std::enable_if_t<T::TupleTrait::value, bool> operator==(const T &a,
293 const T &b) {
294 return a.t == b.t;
295}
296template <typename T>
297std::enable_if_t<T::UnionTrait::value, bool> operator==(const T &a,
298 const T &b) {
299 return a.u == b.u;
300}
301} // namespace type
302
303template <typename T> using ListT = type::ListT<T>;
304
305template <typename I, typename E> using ObjectT = type::ObjectT<I, E>;
306template <typename I, typename E> using ObjectListT = type::ObjectListT<I, E>;
307
308template <typename T, typename I, typename E>
310
311template <
312 typename ContainerTy, typename FunctionTy,
313 typename ElemTy = typename llvm::remove_cvref_t<ContainerTy>::value_type,
314 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
315ListT<ResultTy> makeList(ContainerTy &&container, FunctionTy &&func) {
317 llvm::transform(container, std::back_inserter(v), func);
318 return v;
319}
320
321namespace clause {
322using type::operator==;
323
324// V5.2: [8.3.1] `assumption` clauses
325template <typename T, typename I, typename E> //
326struct AbsentT {
328 using WrapperTrait = std::true_type;
330};
331
332// V5.2: [15.8.1] `memory-order` clauses
333template <typename T, typename I, typename E> //
334struct AcqRelT {
335 using EmptyTrait = std::true_type;
336};
337
338// V5.2: [15.8.1] `memory-order` clauses
339template <typename T, typename I, typename E> //
340struct AcquireT {
341 using EmptyTrait = std::true_type;
342};
343
344// V5.2: [7.5.2] `adjust_args` clause
345template <typename T, typename I, typename E> //
347 using IncompleteTrait = std::true_type;
348};
349
350// V5.2: [12.5.1] `affinity` clause
351template <typename T, typename I, typename E> //
352struct AffinityT {
355
356 using TupleTrait = std::true_type;
357 std::tuple<OPT(Iterator), LocatorList> t;
358};
359
360// V5.2: [6.3] `align` clause
361template <typename T, typename I, typename E> //
362struct AlignT {
363 using Alignment = E;
364
365 using WrapperTrait = std::true_type;
367};
368
369// V5.2: [5.11] `aligned` clause
370template <typename T, typename I, typename E> //
371struct AlignedT {
372 using Alignment = E;
374
375 using TupleTrait = std::true_type;
376 std::tuple<OPT(Alignment), List> t;
377};
378
379template <typename T, typename I, typename E> //
380struct AllocatorT;
381
382// V5.2: [6.6] `allocate` clause
383template <typename T, typename I, typename E> //
384struct AllocateT {
389
390 using TupleTrait = std::true_type;
394};
395
396// V5.2: [6.4] `allocator` clause
397template <typename T, typename I, typename E> //
399 using Allocator = E;
400 using WrapperTrait = std::true_type;
402};
403
404// V5.2: [7.5.3] `append_args` clause
405template <typename T, typename I, typename E> //
407 using IncompleteTrait = std::true_type;
408};
409
410// V5.2: [8.1] `at` clause
411template <typename T, typename I, typename E> //
412struct AtT {
413 ENUM(ActionTime, Compilation, Execution);
414 using WrapperTrait = std::true_type;
415 ActionTime v;
416};
417
418// V5.2: [8.2.1] `requirement` clauses
419template <typename T, typename I, typename E> //
421 using MemoryOrder = type::MemoryOrder;
422 using WrapperTrait = std::true_type;
423 MemoryOrder v; // Name not provided in spec
424};
425
426// V5.2: [11.7.1] `bind` clause
427template <typename T, typename I, typename E> //
428struct BindT {
429 ENUM(Binding, Teams, Parallel, Thread);
430 using WrapperTrait = std::true_type;
431 Binding v;
432};
433
434// V5.2: [15.8.3] `extended-atomic` clauses
435template <typename T, typename I, typename E> //
436struct CaptureT {
437 using EmptyTrait = std::true_type;
438};
439
440// V5.2: [4.4.3] `collapse` clause
441template <typename T, typename I, typename E> //
442struct CollapseT {
443 using N = E;
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 CompareT {
451 using EmptyTrait = std::true_type;
452};
453
454// V5.2: [8.3.1] `assumption` clauses
455template <typename T, typename I, typename E> //
456struct ContainsT {
458 using WrapperTrait = std::true_type;
460};
461
462// V5.2: [5.7.1] `copyin` clause
463template <typename T, typename I, typename E> //
464struct CopyinT {
466 using WrapperTrait = std::true_type;
468};
469
470// V5.2: [5.7.2] `copyprivate` clause
471template <typename T, typename I, typename E> //
474 using WrapperTrait = std::true_type;
476};
477
478// V5.2: [5.4.1] `default` clause
479template <typename T, typename I, typename E> //
480struct DefaultT {
481 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
482 using WrapperTrait = std::true_type;
483 DataSharingAttribute v;
484};
485
486// V5.2: [5.8.7] `defaultmap` clause
487template <typename T, typename I, typename E> //
489 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
490 Present);
491 ENUM(VariableCategory, Scalar, Aggregate, Pointer, Allocatable);
492 using TupleTrait = std::true_type;
493 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
494};
495
496template <typename T, typename I, typename E> //
497struct DoacrossT;
498
499// V5.2: [15.9.5] `depend` clause
500template <typename T, typename I, typename E> //
501struct DependT {
504 using TaskDependenceType = tomp::type::TaskDependenceType;
505
506 struct WithLocators { // Modern form
507 using TupleTrait = std::true_type;
508 // Empty LocatorList means "omp_all_memory".
510 };
511
513 using UnionTrait = std::true_type;
514 std::variant<Doacross, WithLocators> u; // Doacross form is legacy
515};
516
517// V5.2: [3.5] `destroy` clause
518template <typename T, typename I, typename E> //
519struct DestroyT {
521 using WrapperTrait = std::true_type;
522 // DestroyVar can be ommitted in "depobj destroy".
524};
525
526// V5.2: [12.5.2] `detach` clause
527template <typename T, typename I, typename E> //
528struct DetachT {
530 using WrapperTrait = std::true_type;
532};
533
534// V5.2: [13.2] `device` clause
535template <typename T, typename I, typename E> //
536struct DeviceT {
538 ENUM(DeviceModifier, Ancestor, DeviceNum);
539 using TupleTrait = std::true_type;
540 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
541};
542
543// V5.2: [13.1] `device_type` clause
544template <typename T, typename I, typename E> //
546 ENUM(DeviceTypeDescription, Any, Host, Nohost);
547 using WrapperTrait = std::true_type;
548 DeviceTypeDescription v;
549};
550
551// V5.2: [11.6.1] `dist_schedule` clause
552template <typename T, typename I, typename E> //
554 ENUM(Kind, Static);
555 using ChunkSize = E;
556 using TupleTrait = std::true_type;
557 std::tuple<Kind, OPT(ChunkSize)> t;
558};
559
560// V5.2: [15.9.6] `doacross` clause
561template <typename T, typename I, typename E> //
562struct DoacrossT {
564 ENUM(DependenceType, Source, Sink);
565 using TupleTrait = std::true_type;
566 // Empty Vector means "omp_cur_iteration"
567 std::tuple<DependenceType, Vector> t;
568};
569
570// V5.2: [8.2.1] `requirement` clauses
571template <typename T, typename I, typename E> //
573 using EmptyTrait = std::true_type;
574};
575
576// V5.2: [5.8.4] `enter` clause
577template <typename T, typename I, typename E> //
578struct EnterT {
580 using WrapperTrait = std::true_type;
582};
583
584// V5.2: [5.6.2] `exclusive` clause
585template <typename T, typename I, typename E> //
587 using WrapperTrait = std::true_type;
590};
591
592// V5.2: [15.8.3] `extended-atomic` clauses
593template <typename T, typename I, typename E> //
594struct FailT {
595 using MemoryOrder = type::MemoryOrder;
596 using WrapperTrait = std::true_type;
598};
599
600// V5.2: [10.5.1] `filter` clause
601template <typename T, typename I, typename E> //
602struct FilterT {
603 using ThreadNum = E;
604 using WrapperTrait = std::true_type;
606};
607
608// V5.2: [12.3] `final` clause
609template <typename T, typename I, typename E> //
610struct FinalT {
611 using Finalize = E;
612 using WrapperTrait = std::true_type;
614};
615
616// V5.2: [5.4.4] `firstprivate` clause
617template <typename T, typename I, typename E> //
620 using WrapperTrait = std::true_type;
622};
623
624// V5.2: [5.9.2] `from` clause
625template <typename T, typename I, typename E> //
626struct FromT {
628 using Expectation = type::MotionExpectation;
630 // See note at the definition of the MapperT type.
631 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
632
633 using TupleTrait = std::true_type;
635};
636
637// V5.2: [9.2.1] `full` clause
638template <typename T, typename I, typename E> //
639struct FullT {
640 using EmptyTrait = std::true_type;
641};
642
643// V5.2: [12.6.1] `grainsize` clause
644template <typename T, typename I, typename E> //
646 ENUM(Prescriptiveness, Strict);
647 using GrainSize = E;
648 using TupleTrait = std::true_type;
649 std::tuple<OPT(Prescriptiveness), GrainSize> t;
650};
651
652// V5.2: [5.4.9] `has_device_addr` clause
653template <typename T, typename I, typename E> //
656 using WrapperTrait = std::true_type;
658};
659
660// V5.2: [15.1.2] `hint` clause
661template <typename T, typename I, typename E> //
662struct HintT {
663 using HintExpr = E;
664 using WrapperTrait = std::true_type;
666};
667
668// V5.2: [8.3.1] Assumption clauses
669template <typename T, typename I, typename E> //
670struct HoldsT {
671 using WrapperTrait = std::true_type;
672 E v; // No argument name in spec 5.2
673};
674
675// V5.2: [3.4] `if` clause
676template <typename T, typename I, typename E> //
677struct IfT {
680 using TupleTrait = std::true_type;
682};
683
684// V5.2: [7.7.1] `branch` clauses
685template <typename T, typename I, typename E> //
686struct InbranchT {
687 using EmptyTrait = std::true_type;
688};
689
690// V5.2: [5.6.1] `exclusive` clause
691template <typename T, typename I, typename E> //
694 using WrapperTrait = std::true_type;
696};
697
698// V5.2: [7.8.3] `indirect` clause
699template <typename T, typename I, typename E> //
700struct IndirectT {
702 using WrapperTrait = std::true_type;
704};
705
706// V5.2: [14.1.2] `init` clause
707template <typename T, typename I, typename E> //
708struct InitT {
712 ENUM(InteropType, Target, Targetsync); // Repeatable
713 using InteropTypes = ListT<InteropType>; // Not a spec name
714
715 using TupleTrait = std::true_type;
717};
718
719// V5.2: [5.5.4] `initializer` clause
720template <typename T, typename I, typename E> //
723 using WrapperTrait = std::true_type;
725};
726
727// V5.2: [5.5.10] `in_reduction` clause
728template <typename T, typename I, typename E> //
731 // See note at the definition of the ReductionIdentifierT type.
732 // The name ReductionIdentifiers is not a spec name.
734 using TupleTrait = std::true_type;
735 std::tuple<ReductionIdentifiers, List> t;
736};
737
738// V5.2: [5.4.7] `is_device_ptr` clause
739template <typename T, typename I, typename E> //
742 using WrapperTrait = std::true_type;
744};
745
746// V5.2: [5.4.5] `lastprivate` clause
747template <typename T, typename I, typename E> //
750 ENUM(LastprivateModifier, Conditional);
751 using TupleTrait = std::true_type;
752 std::tuple<OPT(LastprivateModifier), List> t;
753};
754
755// V5.2: [5.4.6] `linear` clause
756template <typename T, typename I, typename E> //
757struct LinearT {
758 // std::get<type> won't work here due to duplicate types in the tuple.
762 ENUM(LinearModifier, Ref, Val, Uval);
763
764 using TupleTrait = std::true_type;
765 // Step == nullopt means 1.
767 OPT(LinearModifier), List>
769};
770
771// V5.2: [5.8.5] `link` clause
772template <typename T, typename I, typename E> //
773struct LinkT {
775 using WrapperTrait = std::true_type;
777};
778
779// V5.2: [5.8.3] `map` clause
780template <typename T, typename I, typename E> //
781struct MapT {
783 ENUM(MapType, To, From, Tofrom, Alloc, Release, Delete);
784 ENUM(MapTypeModifier, Always, Close, Present, OmpxHold);
785 // See note at the definition of the MapperT type.
786 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
788 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
789
790 using TupleTrait = std::true_type;
791 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator),
794};
795
796// V5.2: [7.5.1] `match` clause
797template <typename T, typename I, typename E> //
798struct MatchT {
799 using IncompleteTrait = std::true_type;
800};
801
802// V5.2: [12.2] `mergeable` clause
803template <typename T, typename I, typename E> //
805 using EmptyTrait = std::true_type;
806};
807
808// V5.2: [8.5.2] `message` clause
809template <typename T, typename I, typename E> //
810struct MessageT {
811 using MsgString = E;
812 using WrapperTrait = std::true_type;
814};
815
816// V5.2: [7.6.2] `nocontext` clause
817template <typename T, typename I, typename E> //
820 using WrapperTrait = std::true_type;
822};
823
824// V5.2: [15.7] `nowait` clause
825template <typename T, typename I, typename E> //
826struct NogroupT {
827 using EmptyTrait = std::true_type;
828};
829
830// V5.2: [10.4.1] `nontemporal` clause
831template <typename T, typename I, typename E> //
834 using WrapperTrait = std::true_type;
836};
837
838// V5.2: [8.3.1] `assumption` clauses
839template <typename T, typename I, typename E> //
840struct NoOpenmpT {
841 using EmptyTrait = std::true_type;
842};
843
844// V5.2: [8.3.1] `assumption` clauses
845template <typename T, typename I, typename E> //
847 using EmptyTrait = std::true_type;
848};
849
850// V5.2: [8.3.1] `assumption` clauses
851template <typename T, typename I, typename E> //
853 using EmptyTrait = std::true_type;
854};
855
856// V5.2: [7.7.1] `branch` clauses
857template <typename T, typename I, typename E> //
859 using EmptyTrait = std::true_type;
860};
861
862// V5.2: [7.6.1] `novariants` clause
863template <typename T, typename I, typename E> //
866 using WrapperTrait = std::true_type;
868};
869
870// V5.2: [15.6] `nowait` clause
871template <typename T, typename I, typename E> //
872struct NowaitT {
873 using EmptyTrait = std::true_type;
874};
875
876// V5.2: [12.6.2] `num_tasks` clause
877template <typename T, typename I, typename E> //
878struct NumTasksT {
879 using NumTasks = E;
880 ENUM(Prescriptiveness, Strict);
881 using TupleTrait = std::true_type;
882 std::tuple<OPT(Prescriptiveness), NumTasks> t;
883};
884
885// V5.2: [10.2.1] `num_teams` clause
886template <typename T, typename I, typename E> //
887struct NumTeamsT {
888 using LowerBound = E;
889 using UpperBound = E;
890
891 // The name Range is not a spec name.
892 struct Range {
893 using TupleTrait = std::true_type;
894 std::tuple<OPT(LowerBound), UpperBound> t;
895 };
896
897 // The name List is not a spec name. The list is an extension to allow
898 // specifying a grid with connection with the ompx_bare clause.
900 using WrapperTrait = std::true_type;
902};
903
904// V5.2: [10.1.2] `num_threads` clause
905template <typename T, typename I, typename E> //
907 using Nthreads = E;
908 using WrapperTrait = std::true_type;
910};
911
912template <typename T, typename I, typename E> //
914 using EmptyTrait = std::true_type;
915};
916
917template <typename T, typename I, typename E> //
918struct OmpxBareT {
919 using EmptyTrait = std::true_type;
920};
921
922template <typename T, typename I, typename E> //
924 using WrapperTrait = std::true_type;
926};
927
928// V5.2: [10.3] `order` clause
929template <typename T, typename I, typename E> //
930struct OrderT {
931 ENUM(OrderModifier, Reproducible, Unconstrained);
932 ENUM(Ordering, Concurrent);
933 using TupleTrait = std::true_type;
934 std::tuple<OPT(OrderModifier), Ordering> t;
935};
936
937// V5.2: [4.4.4] `ordered` clause
938template <typename T, typename I, typename E> //
939struct OrderedT {
940 using N = E;
941 using WrapperTrait = std::true_type;
942 OPT(N) v;
943};
944
945// V5.2: [7.4.2] `otherwise` clause
946template <typename T, typename I, typename E> //
948 using IncompleteTrait = std::true_type;
949};
950
951// V5.2: [9.2.2] `partial` clause
952template <typename T, typename I, typename E> //
953struct PartialT {
955 using WrapperTrait = std::true_type;
957};
958
959// V5.2: [12.4] `priority` clause
960template <typename T, typename I, typename E> //
961struct PriorityT {
963 using WrapperTrait = std::true_type;
965};
966
967// V5.2: [5.4.3] `private` clause
968template <typename T, typename I, typename E> //
969struct PrivateT {
971 using WrapperTrait = std::true_type;
973};
974
975// V5.2: [10.1.4] `proc_bind` clause
976template <typename T, typename I, typename E> //
977struct ProcBindT {
978 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
979 using WrapperTrait = std::true_type;
980 AffinityPolicy v;
981};
982
983// V5.2: [15.8.2] Atomic clauses
984template <typename T, typename I, typename E> //
985struct ReadT {
986 using EmptyTrait = std::true_type;
987};
988
989// V5.2: [5.5.8] `reduction` clause
990template <typename T, typename I, typename E> //
993 // See note at the definition of the ReductionIdentifierT type.
994 // The name ReductionIdentifiers is not a spec name.
996 ENUM(ReductionModifier, Default, Inscan, Task);
997 using TupleTrait = std::true_type;
998 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
999};
1000
1001// V5.2: [15.8.1] `memory-order` clauses
1002template <typename T, typename I, typename E> //
1003struct RelaxedT {
1004 using EmptyTrait = std::true_type;
1005};
1006
1007// V5.2: [15.8.1] `memory-order` clauses
1008template <typename T, typename I, typename E> //
1009struct ReleaseT {
1010 using EmptyTrait = std::true_type;
1011};
1012
1013// V5.2: [8.2.1] `requirement` clauses
1014template <typename T, typename I, typename E> //
1016 using EmptyTrait = std::true_type;
1017};
1018
1019// V5.2: [10.4.2] `safelen` clause
1020template <typename T, typename I, typename E> //
1021struct SafelenT {
1022 using Length = E;
1023 using WrapperTrait = std::true_type;
1025};
1026
1027// V5.2: [11.5.3] `schedule` clause
1028template <typename T, typename I, typename E> //
1030 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1031 using ChunkSize = E;
1032 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1033 ENUM(ChunkModifier, Simd);
1034 using TupleTrait = std::true_type;
1035 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1036};
1037
1038// V5.2: [15.8.1] Memory-order clauses
1039template <typename T, typename I, typename E> //
1040struct SeqCstT {
1041 using EmptyTrait = std::true_type;
1042};
1043
1044// V5.2: [8.5.1] `severity` clause
1045template <typename T, typename I, typename E> //
1047 ENUM(SevLevel, Fatal, Warning);
1048 using WrapperTrait = std::true_type;
1049 SevLevel v;
1050};
1051
1052// V5.2: [5.4.2] `shared` clause
1053template <typename T, typename I, typename E> //
1054struct SharedT {
1056 using WrapperTrait = std::true_type;
1058};
1059
1060// V5.2: [15.10.3] `parallelization-level` clauses
1061template <typename T, typename I, typename E> //
1062struct SimdT {
1063 using EmptyTrait = std::true_type;
1064};
1065
1066// V5.2: [10.4.3] `simdlen` clause
1067template <typename T, typename I, typename E> //
1068struct SimdlenT {
1069 using Length = E;
1070 using WrapperTrait = std::true_type;
1072};
1073
1074// V5.2: [9.1.1] `sizes` clause
1075template <typename T, typename I, typename E> //
1076struct SizesT {
1078 using WrapperTrait = std::true_type;
1080};
1081
1082// V5.2: [5.5.9] `task_reduction` clause
1083template <typename T, typename I, typename E> //
1086 // See note at the definition of the ReductionIdentifierT type.
1087 // The name ReductionIdentifiers is not a spec name.
1089 using TupleTrait = std::true_type;
1090 std::tuple<ReductionIdentifiers, List> t;
1091};
1092
1093// V5.2: [13.3] `thread_limit` clause
1094template <typename T, typename I, typename E> //
1096 using Threadlim = E;
1097 using WrapperTrait = std::true_type;
1099};
1100
1101// V5.2: [15.10.3] `parallelization-level` clauses
1102template <typename T, typename I, typename E> //
1103struct ThreadsT {
1104 using EmptyTrait = std::true_type;
1105};
1106
1107// V5.2: [5.9.1] `to` clause
1108template <typename T, typename I, typename E> //
1109struct ToT {
1111 using Expectation = type::MotionExpectation;
1112 // See note at the definition of the MapperT type.
1113 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1115
1116 using TupleTrait = std::true_type;
1118};
1119
1120// V5.2: [8.2.1] `requirement` clauses
1121template <typename T, typename I, typename E> //
1123 using EmptyTrait = std::true_type;
1124};
1125
1126// V5.2: [8.2.1] `requirement` clauses
1127template <typename T, typename I, typename E> //
1129 using EmptyTrait = std::true_type;
1130};
1131
1132// V5.2: [5.10] `uniform` clause
1133template <typename T, typename I, typename E> //
1134struct UniformT {
1136 using WrapperTrait = std::true_type;
1138};
1139
1140template <typename T, typename I, typename E> //
1141struct UnknownT {
1142 using EmptyTrait = std::true_type;
1143};
1144
1145// V5.2: [12.1] `untied` clause
1146template <typename T, typename I, typename E> //
1147struct UntiedT {
1148 using EmptyTrait = std::true_type;
1149};
1150
1151// Both of the following
1152// V5.2: [15.8.2] `atomic` clauses
1153// V5.2: [15.9.3] `update` clause
1154template <typename T, typename I, typename E> //
1155struct UpdateT {
1156 using TaskDependenceType = tomp::type::TaskDependenceType;
1157 using WrapperTrait = std::true_type;
1159};
1160
1161// V5.2: [14.1.3] `use` clause
1162template <typename T, typename I, typename E> //
1163struct UseT {
1165 using WrapperTrait = std::true_type;
1167};
1168
1169// V5.2: [5.4.10] `use_device_addr` clause
1170template <typename T, typename I, typename E> //
1173 using WrapperTrait = std::true_type;
1175};
1176
1177// V5.2: [5.4.8] `use_device_ptr` clause
1178template <typename T, typename I, typename E> //
1181 using WrapperTrait = std::true_type;
1183};
1184
1185// V5.2: [6.8] `uses_allocators` clause
1186template <typename T, typename I, typename E> //
1188 using MemSpace = E;
1190 using Allocator = E;
1191 struct AllocatorSpec { // Not a spec name
1192 using TupleTrait = std::true_type;
1194 };
1195 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1196 using WrapperTrait = std::true_type;
1198};
1199
1200// V5.2: [15.8.3] `extended-atomic` clauses
1201template <typename T, typename I, typename E> //
1202struct WeakT {
1203 using EmptyTrait = std::true_type;
1204};
1205
1206// V5.2: [7.4.1] `when` clause
1207template <typename T, typename I, typename E> //
1208struct WhenT {
1209 using IncompleteTrait = std::true_type;
1210};
1211
1212// V5.2: [15.8.2] Atomic clauses
1213template <typename T, typename I, typename E> //
1214struct WriteT {
1215 using EmptyTrait = std::true_type;
1216};
1217
1218// ---
1219
1220template <typename T, typename I, typename E>
1222 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1224
1225template <typename T, typename I, typename E>
1226using EmptyClausesT = std::variant<
1236
1237template <typename T, typename I, typename E>
1239 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, MatchT<T, I, E>,
1241
1242template <typename T, typename I, typename E>
1244 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1251
1252template <typename T, typename I, typename E>
1253using UnionClausesT = std::variant<DependT<T, I, E>>;
1254
1255template <typename T, typename I, typename E>
1256using WrapperClausesT = std::variant<
1273
1274template <typename T, typename I, typename E>
1282 >::type;
1283} // namespace clause
1284
1285using type::operator==;
1286
1287// The variant wrapper that encapsulates all possible specific clauses.
1288// The `Extras` arguments are additional types representing local extensions
1289// to the clause set, e.g.
1290//
1291// using Clause = ClauseT<Type, Id, Expr,
1292// MyClause1, MyClause2>;
1293//
1294// The member Clause::u will be a variant containing all specific clauses
1295// defined above, plus MyClause1 and MyClause2.
1296//
1297// Note: Any derived class must be constructible from the base class
1298// ClauseT<...>.
1299template <typename TypeType, typename IdType, typename ExprType,
1300 typename... Extras>
1301struct ClauseT {
1302 using TypeTy = TypeType;
1303 using IdTy = IdType;
1304 using ExprTy = ExprType;
1305
1306 // Type of "self" to specify this type given a derived class type.
1307 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1308
1309 using VariantTy = typename type::Union<
1311 std::variant<Extras...>>::type;
1312
1313 llvm::omp::Clause id; // The numeric id of the clause
1314 using UnionTrait = std::true_type;
1316};
1317
1318template <typename ClauseType> struct DirectiveWithClauses {
1319 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1321};
1322
1323} // namespace tomp
1324
1325#undef OPT
1326#undef ENUM
1327
1328#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
BlockVerifier::State From
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define ENUM(Name,...)
Definition: ClauseT.h:61
#define OPT(x)
Definition: ClauseT.h:62
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
@ Default
Definition: DwarfDebug.cpp:87
#define T
uint64_t Thread
Definition: Profile.cpp:48
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[]
constexpr bool is_variant_v
Definition: ClauseT.h:122
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:1935
typename llvm::remove_cvref< T >::type remove_cvref_t
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
std::variant< DependT< T, I, E > > UnionClausesT
Definition: ClauseT.h:1253
std::variant< AcqRelT< T, I, E >, AcquireT< T, I, E >, CaptureT< T, I, E >, CompareT< T, I, E >, DynamicAllocatorsT< T, I, E >, FullT< T, I, E >, InbranchT< T, I, E >, MergeableT< T, I, E >, NogroupT< 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 >, ReverseOffloadT< T, I, E >, SeqCstT< T, I, E >, SimdT< T, I, E >, ThreadsT< T, I, E >, UnifiedAddressT< T, I, E >, UnifiedSharedMemoryT< 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:1235
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:1282
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 >, DeviceTypeT< 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 >, SafelenT< T, I, E >, SeverityT< T, I, E >, SharedT< T, I, E >, SimdlenT< T, I, E >, SizesT< T, I, E >, ThreadLimitT< 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:1272
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition: ClauseT.h:1223
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, MatchT< T, I, E >, OtherwiseT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition: ClauseT.h:1240
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 >, 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 >, 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:1250
llvm::omp::Directive DirectiveName
Definition: ClauseT.h:191
Definition: ClauseT.h:133
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
Definition: ClauseT.h:315
#define EQ(a, b)
Definition: regexec.c:112
static constexpr bool value
Definition: ClauseT.h:115
IdType IdTy
Definition: ClauseT.h:1303
std::true_type UnionTrait
Definition: ClauseT.h:1314
ExprType ExprTy
Definition: ClauseT.h:1304
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition: ClauseT.h:1311
VariantTy u
Definition: ClauseT.h:1315
llvm::omp::Clause id
Definition: ClauseT.h:1313
TypeType TypeTy
Definition: ClauseT.h:1302
tomp::type::ListT< ClauseType > clauses
Definition: ClauseT.h:1320
std::true_type WrapperTrait
Definition: ClauseT.h:328
std::true_type EmptyTrait
Definition: ClauseT.h:335
std::true_type EmptyTrait
Definition: ClauseT.h:341
std::true_type IncompleteTrait
Definition: ClauseT.h:347
std::tuple< OPT(Iterator), LocatorList > t
Definition: ClauseT.h:357
std::true_type TupleTrait
Definition: ClauseT.h:356
std::true_type WrapperTrait
Definition: ClauseT.h:365
std::tuple< OPT(Alignment), List > t
Definition: ClauseT.h:376
std::true_type TupleTrait
Definition: ClauseT.h:375
std::true_type TupleTrait
Definition: ClauseT.h:390
std::tuple< OPT(AllocatorSimpleModifier), OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
Definition: ClauseT.h:393
std::true_type WrapperTrait
Definition: ClauseT.h:400
std::true_type IncompleteTrait
Definition: ClauseT.h:407
ActionTime v
Definition: ClauseT.h:415
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition: ClauseT.h:414
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition: ClauseT.h:430
std::true_type EmptyTrait
Definition: ClauseT.h:437
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 WrapperTrait
Definition: ClauseT.h:466
std::true_type WrapperTrait
Definition: ClauseT.h:474
DataSharingAttribute v
Definition: ClauseT.h:483
std::true_type WrapperTrait
Definition: ClauseT.h:482
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(VariableCategory, Scalar, Aggregate, Pointer, Allocatable)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
Definition: ClauseT.h:493
std::true_type TupleTrait
Definition: ClauseT.h:492
std::tuple< TaskDependenceType, OPT(Iterator), LocatorList > t
Definition: ClauseT.h:509
std::true_type UnionTrait
Definition: ClauseT.h:513
tomp::type::TaskDependenceType TaskDependenceType
Definition: ClauseT.h:504
std::variant< Doacross, WithLocators > u
Definition: ClauseT.h:514
std::true_type WrapperTrait
Definition: ClauseT.h:521
EventHandle v
Definition: ClauseT.h:531
std::true_type WrapperTrait
Definition: ClauseT.h:530
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition: ClauseT.h:540
std::true_type TupleTrait
Definition: ClauseT.h:539
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition: ClauseT.h:548
std::true_type WrapperTrait
Definition: ClauseT.h:547
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition: ClauseT.h:557
std::true_type TupleTrait
Definition: ClauseT.h:556
std::true_type TupleTrait
Definition: ClauseT.h:565
std::tuple< DependenceType, Vector > t
Definition: ClauseT.h:567
ENUM(DependenceType, Source, Sink)
std::true_type WrapperTrait
Definition: ClauseT.h:580
std::true_type WrapperTrait
Definition: ClauseT.h:587
MemoryOrder v
Definition: ClauseT.h:597
std::true_type WrapperTrait
Definition: ClauseT.h:596
type::MemoryOrder MemoryOrder
Definition: ClauseT.h:595
std::true_type WrapperTrait
Definition: ClauseT.h:604
std::true_type WrapperTrait
Definition: ClauseT.h:612
std::true_type WrapperTrait
Definition: ClauseT.h:620
std::true_type TupleTrait
Definition: ClauseT.h:633
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:634
type::MotionExpectation Expectation
Definition: ClauseT.h:628
std::true_type EmptyTrait
Definition: ClauseT.h:640
std::true_type TupleTrait
Definition: ClauseT.h:648
ENUM(Prescriptiveness, Strict)
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition: ClauseT.h:649
std::true_type WrapperTrait
Definition: ClauseT.h:656
std::true_type WrapperTrait
Definition: ClauseT.h:664
std::true_type WrapperTrait
Definition: ClauseT.h:671
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition: ClauseT.h:681
std::true_type TupleTrait
Definition: ClauseT.h:680
type::DirectiveName DirectiveNameModifier
Definition: ClauseT.h:678
std::tuple< ReductionIdentifiers, List > t
Definition: ClauseT.h:735
std::true_type TupleTrait
Definition: ClauseT.h:734
std::true_type EmptyTrait
Definition: ClauseT.h:687
std::true_type WrapperTrait
Definition: ClauseT.h:694
std::true_type WrapperTrait
Definition: ClauseT.h:702
InvokedByFptr v
Definition: ClauseT.h:703
ListT< InteropType > InteropTypes
Definition: ClauseT.h:713
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition: ClauseT.h:716
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition: ClauseT.h:715
InitializerExpr v
Definition: ClauseT.h:724
std::true_type WrapperTrait
Definition: ClauseT.h:723
std::true_type WrapperTrait
Definition: ClauseT.h:742
std::tuple< OPT(LastprivateModifier), List > t
Definition: ClauseT.h:752
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition: ClauseT.h:751
std::true_type TupleTrait
Definition: ClauseT.h:764
ENUM(LinearModifier, Ref, Val, Uval)
std::tuple< OPT(StepSimpleModifier), OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition: ClauseT.h:768
std::true_type WrapperTrait
Definition: ClauseT.h:775
ENUM(MapTypeModifier, Always, Close, Present, OmpxHold)
ENUM(MapType, To, From, Tofrom, Alloc, Release, Delete)
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:793
std::true_type TupleTrait
Definition: ClauseT.h:790
std::true_type IncompleteTrait
Definition: ClauseT.h:799
std::true_type EmptyTrait
Definition: ClauseT.h:805
std::true_type WrapperTrait
Definition: ClauseT.h:812
std::true_type EmptyTrait
Definition: ClauseT.h:841
std::true_type EmptyTrait
Definition: ClauseT.h:853
std::true_type WrapperTrait
Definition: ClauseT.h:820
DoNotUpdateContext v
Definition: ClauseT.h:821
std::true_type EmptyTrait
Definition: ClauseT.h:827
std::true_type WrapperTrait
Definition: ClauseT.h:834
std::true_type EmptyTrait
Definition: ClauseT.h:859
std::true_type WrapperTrait
Definition: ClauseT.h:866
DoNotUseVariant v
Definition: ClauseT.h:867
std::true_type EmptyTrait
Definition: ClauseT.h:873
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition: ClauseT.h:882
ENUM(Prescriptiveness, Strict)
std::true_type TupleTrait
Definition: ClauseT.h:881
std::true_type TupleTrait
Definition: ClauseT.h:893
std::tuple< OPT(LowerBound), UpperBound > t
Definition: ClauseT.h:894
std::true_type WrapperTrait
Definition: ClauseT.h:900
std::true_type WrapperTrait
Definition: ClauseT.h:908
std::true_type EmptyTrait
Definition: ClauseT.h:914
std::true_type EmptyTrait
Definition: ClauseT.h:919
std::true_type WrapperTrait
Definition: ClauseT.h:924
std::tuple< OPT(OrderModifier), Ordering > t
Definition: ClauseT.h:934
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition: ClauseT.h:933
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition: ClauseT.h:941
std::true_type IncompleteTrait
Definition: ClauseT.h:948
std::true_type WrapperTrait
Definition: ClauseT.h:955
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition: ClauseT.h:963
PriorityValue v
Definition: ClauseT.h:964
std::true_type WrapperTrait
Definition: ClauseT.h:971
AffinityPolicy v
Definition: ClauseT.h:980
std::true_type WrapperTrait
Definition: ClauseT.h:979
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition: ClauseT.h:986
std::true_type TupleTrait
Definition: ClauseT.h:997
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition: ClauseT.h:998
ENUM(ReductionModifier, Default, Inscan, Task)
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition: ClauseT.h:995
std::true_type EmptyTrait
Definition: ClauseT.h:1004
std::true_type EmptyTrait
Definition: ClauseT.h:1010
std::true_type EmptyTrait
Definition: ClauseT.h:1016
std::true_type WrapperTrait
Definition: ClauseT.h:1023
std::true_type TupleTrait
Definition: ClauseT.h:1034
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition: ClauseT.h:1035
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type EmptyTrait
Definition: ClauseT.h:1041
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition: ClauseT.h:1048
std::true_type WrapperTrait
Definition: ClauseT.h:1056
std::true_type EmptyTrait
Definition: ClauseT.h:1063
std::true_type WrapperTrait
Definition: ClauseT.h:1070
std::true_type WrapperTrait
Definition: ClauseT.h:1078
std::true_type TupleTrait
Definition: ClauseT.h:1089
std::tuple< ReductionIdentifiers, List > t
Definition: ClauseT.h:1090
std::true_type WrapperTrait
Definition: ClauseT.h:1097
std::true_type EmptyTrait
Definition: ClauseT.h:1104
std::true_type TupleTrait
Definition: ClauseT.h:1116
type::MotionExpectation Expectation
Definition: ClauseT.h:1111
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:1117
std::true_type EmptyTrait
Definition: ClauseT.h:1123
std::true_type WrapperTrait
Definition: ClauseT.h:1136
ParameterList v
Definition: ClauseT.h:1137
std::true_type EmptyTrait
Definition: ClauseT.h:1142
std::true_type EmptyTrait
Definition: ClauseT.h:1148
std::true_type WrapperTrait
Definition: ClauseT.h:1157
OPT(TaskDependenceType) v
tomp::type::TaskDependenceType TaskDependenceType
Definition: ClauseT.h:1156
std::true_type WrapperTrait
Definition: ClauseT.h:1173
std::true_type WrapperTrait
Definition: ClauseT.h:1181
InteropVar v
Definition: ClauseT.h:1166
std::true_type WrapperTrait
Definition: ClauseT.h:1165
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition: ClauseT.h:1193
std::true_type WrapperTrait
Definition: ClauseT.h:1196
std::true_type EmptyTrait
Definition: ClauseT.h:1203
std::true_type IncompleteTrait
Definition: ClauseT.h:1209
std::true_type EmptyTrait
Definition: ClauseT.h:1215
std::true_type UnionTrait
Definition: ClauseT.h:201
std::variant< DefinedOpName, IntrinsicOperator > u
Definition: ClauseT.h:202
ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT, LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max)
std::true_type TupleTrait
Definition: ClauseT.h:217
std::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
Definition: ClauseT.h:218
std::tuple< DefinedOperatorT< I, E >, E > t
Definition: ClauseT.h:248
std::tuple< ObjectT< I, E >, OPT(Distance)> t
Definition: ClauseT.h:251
std::true_type TupleTrait
Definition: ClauseT.h:250
MapperIdentifier v
Definition: ClauseT.h:234
std::true_type WrapperTrait
Definition: ClauseT.h:233
std::true_type TupleTrait
Definition: ClauseT.h:209
std::tuple< E, E, OPT(E)> t
Definition: ClauseT.h:210
std::variant< DefinedOperatorT< I, E >, ProcedureDesignatorT< I, E > > u
Definition: ClauseT.h:270
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type
Definition: ClauseT.h:148
std::variant<> type
Definition: ClauseT.h:142