LLVM 19.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 TupleTrait = std::true_type;
889 using LowerBound = E;
890 using UpperBound = E;
891 std::tuple<OPT(LowerBound), UpperBound> t;
892};
893
894// V5.2: [10.1.2] `num_threads` clause
895template <typename T, typename I, typename E> //
897 using Nthreads = E;
898 using WrapperTrait = std::true_type;
900};
901
902template <typename T, typename I, typename E> //
904 using EmptyTrait = std::true_type;
905};
906
907template <typename T, typename I, typename E> //
908struct OmpxBareT {
909 using EmptyTrait = std::true_type;
910};
911
912template <typename T, typename I, typename E> //
914 using WrapperTrait = std::true_type;
916};
917
918// V5.2: [10.3] `order` clause
919template <typename T, typename I, typename E> //
920struct OrderT {
921 ENUM(OrderModifier, Reproducible, Unconstrained);
922 ENUM(Ordering, Concurrent);
923 using TupleTrait = std::true_type;
924 std::tuple<OPT(OrderModifier), Ordering> t;
925};
926
927// V5.2: [4.4.4] `ordered` clause
928template <typename T, typename I, typename E> //
929struct OrderedT {
930 using N = E;
931 using WrapperTrait = std::true_type;
932 OPT(N) v;
933};
934
935// V5.2: [7.4.2] `otherwise` clause
936template <typename T, typename I, typename E> //
938 using IncompleteTrait = std::true_type;
939};
940
941// V5.2: [9.2.2] `partial` clause
942template <typename T, typename I, typename E> //
943struct PartialT {
945 using WrapperTrait = std::true_type;
947};
948
949// V5.2: [12.4] `priority` clause
950template <typename T, typename I, typename E> //
951struct PriorityT {
953 using WrapperTrait = std::true_type;
955};
956
957// V5.2: [5.4.3] `private` clause
958template <typename T, typename I, typename E> //
959struct PrivateT {
961 using WrapperTrait = std::true_type;
963};
964
965// V5.2: [10.1.4] `proc_bind` clause
966template <typename T, typename I, typename E> //
967struct ProcBindT {
968 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
969 using WrapperTrait = std::true_type;
970 AffinityPolicy v;
971};
972
973// V5.2: [15.8.2] Atomic clauses
974template <typename T, typename I, typename E> //
975struct ReadT {
976 using EmptyTrait = std::true_type;
977};
978
979// V5.2: [5.5.8] `reduction` clause
980template <typename T, typename I, typename E> //
983 // See note at the definition of the ReductionIdentifierT type.
984 // The name ReductionIdentifiers is not a spec name.
986 ENUM(ReductionModifier, Default, Inscan, Task);
987 using TupleTrait = std::true_type;
988 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
989};
990
991// V5.2: [15.8.1] `memory-order` clauses
992template <typename T, typename I, typename E> //
993struct RelaxedT {
994 using EmptyTrait = std::true_type;
995};
996
997// V5.2: [15.8.1] `memory-order` clauses
998template <typename T, typename I, typename E> //
999struct ReleaseT {
1000 using EmptyTrait = std::true_type;
1001};
1002
1003// V5.2: [8.2.1] `requirement` clauses
1004template <typename T, typename I, typename E> //
1006 using EmptyTrait = std::true_type;
1007};
1008
1009// V5.2: [10.4.2] `safelen` clause
1010template <typename T, typename I, typename E> //
1011struct SafelenT {
1012 using Length = E;
1013 using WrapperTrait = std::true_type;
1015};
1016
1017// V5.2: [11.5.3] `schedule` clause
1018template <typename T, typename I, typename E> //
1020 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1021 using ChunkSize = E;
1022 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1023 ENUM(ChunkModifier, Simd);
1024 using TupleTrait = std::true_type;
1025 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1026};
1027
1028// V5.2: [15.8.1] Memory-order clauses
1029template <typename T, typename I, typename E> //
1030struct SeqCstT {
1031 using EmptyTrait = std::true_type;
1032};
1033
1034// V5.2: [8.5.1] `severity` clause
1035template <typename T, typename I, typename E> //
1037 ENUM(SevLevel, Fatal, Warning);
1038 using WrapperTrait = std::true_type;
1039 SevLevel v;
1040};
1041
1042// V5.2: [5.4.2] `shared` clause
1043template <typename T, typename I, typename E> //
1044struct SharedT {
1046 using WrapperTrait = std::true_type;
1048};
1049
1050// V5.2: [15.10.3] `parallelization-level` clauses
1051template <typename T, typename I, typename E> //
1052struct SimdT {
1053 using EmptyTrait = std::true_type;
1054};
1055
1056// V5.2: [10.4.3] `simdlen` clause
1057template <typename T, typename I, typename E> //
1058struct SimdlenT {
1059 using Length = E;
1060 using WrapperTrait = std::true_type;
1062};
1063
1064// V5.2: [9.1.1] `sizes` clause
1065template <typename T, typename I, typename E> //
1066struct SizesT {
1068 using WrapperTrait = std::true_type;
1070};
1071
1072// V5.2: [5.5.9] `task_reduction` clause
1073template <typename T, typename I, typename E> //
1076 // See note at the definition of the ReductionIdentifierT type.
1077 // The name ReductionIdentifiers is not a spec name.
1079 using TupleTrait = std::true_type;
1080 std::tuple<ReductionIdentifiers, List> t;
1081};
1082
1083// V5.2: [13.3] `thread_limit` clause
1084template <typename T, typename I, typename E> //
1086 using Threadlim = E;
1087 using WrapperTrait = std::true_type;
1089};
1090
1091// V5.2: [15.10.3] `parallelization-level` clauses
1092template <typename T, typename I, typename E> //
1093struct ThreadsT {
1094 using EmptyTrait = std::true_type;
1095};
1096
1097// V5.2: [5.9.1] `to` clause
1098template <typename T, typename I, typename E> //
1099struct ToT {
1101 using Expectation = type::MotionExpectation;
1102 // See note at the definition of the MapperT type.
1103 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1105
1106 using TupleTrait = std::true_type;
1108};
1109
1110// V5.2: [8.2.1] `requirement` clauses
1111template <typename T, typename I, typename E> //
1113 using EmptyTrait = std::true_type;
1114};
1115
1116// V5.2: [8.2.1] `requirement` clauses
1117template <typename T, typename I, typename E> //
1119 using EmptyTrait = std::true_type;
1120};
1121
1122// V5.2: [5.10] `uniform` clause
1123template <typename T, typename I, typename E> //
1124struct UniformT {
1126 using WrapperTrait = std::true_type;
1128};
1129
1130template <typename T, typename I, typename E> //
1131struct UnknownT {
1132 using EmptyTrait = std::true_type;
1133};
1134
1135// V5.2: [12.1] `untied` clause
1136template <typename T, typename I, typename E> //
1137struct UntiedT {
1138 using EmptyTrait = std::true_type;
1139};
1140
1141// Both of the following
1142// V5.2: [15.8.2] `atomic` clauses
1143// V5.2: [15.9.3] `update` clause
1144template <typename T, typename I, typename E> //
1145struct UpdateT {
1146 using TaskDependenceType = tomp::type::TaskDependenceType;
1147 using WrapperTrait = std::true_type;
1149};
1150
1151// V5.2: [14.1.3] `use` clause
1152template <typename T, typename I, typename E> //
1153struct UseT {
1155 using WrapperTrait = std::true_type;
1157};
1158
1159// V5.2: [5.4.10] `use_device_addr` clause
1160template <typename T, typename I, typename E> //
1163 using WrapperTrait = std::true_type;
1165};
1166
1167// V5.2: [5.4.8] `use_device_ptr` clause
1168template <typename T, typename I, typename E> //
1171 using WrapperTrait = std::true_type;
1173};
1174
1175// V5.2: [6.8] `uses_allocators` clause
1176template <typename T, typename I, typename E> //
1178 using MemSpace = E;
1180 using Allocator = E;
1181 struct AllocatorSpec { // Not a spec name
1182 using TupleTrait = std::true_type;
1184 };
1185 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1186 using WrapperTrait = std::true_type;
1188};
1189
1190// V5.2: [15.8.3] `extended-atomic` clauses
1191template <typename T, typename I, typename E> //
1192struct WeakT {
1193 using EmptyTrait = std::true_type;
1194};
1195
1196// V5.2: [7.4.1] `when` clause
1197template <typename T, typename I, typename E> //
1198struct WhenT {
1199 using IncompleteTrait = std::true_type;
1200};
1201
1202// V5.2: [15.8.2] Atomic clauses
1203template <typename T, typename I, typename E> //
1204struct WriteT {
1205 using EmptyTrait = std::true_type;
1206};
1207
1208// ---
1209
1210template <typename T, typename I, typename E>
1212 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1214
1215template <typename T, typename I, typename E>
1216using EmptyClausesT = std::variant<
1226
1227template <typename T, typename I, typename E>
1229 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, MatchT<T, I, E>,
1231
1232template <typename T, typename I, typename E>
1234 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1241
1242template <typename T, typename I, typename E>
1243using UnionClausesT = std::variant<DependT<T, I, E>>;
1244
1245template <typename T, typename I, typename E>
1246using WrapperClausesT = std::variant<
1263
1264template <typename T, typename I, typename E>
1272 >::type;
1273} // namespace clause
1274
1275using type::operator==;
1276
1277// The variant wrapper that encapsulates all possible specific clauses.
1278// The `Extras` arguments are additional types representing local extensions
1279// to the clause set, e.g.
1280//
1281// using Clause = ClauseT<Type, Id, Expr,
1282// MyClause1, MyClause2>;
1283//
1284// The member Clause::u will be a variant containing all specific clauses
1285// defined above, plus MyClause1 and MyClause2.
1286//
1287// Note: Any derived class must be constructible from the base class
1288// ClauseT<...>.
1289template <typename TypeType, typename IdType, typename ExprType,
1290 typename... Extras>
1291struct ClauseT {
1292 using TypeTy = TypeType;
1293 using IdTy = IdType;
1294 using ExprTy = ExprType;
1295
1296 // Type of "self" to specify this type given a derived class type.
1297 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1298
1299 using VariantTy = typename type::Union<
1301 std::variant<Extras...>>::type;
1302
1303 llvm::omp::Clause id; // The numeric id of the clause
1304 using UnionTrait = std::true_type;
1306};
1307
1308template <typename ClauseType> struct DirectiveWithClauses {
1309 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1311};
1312
1313} // namespace tomp
1314
1315#undef OPT
1316#undef ENUM
1317
1318#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:1928
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:1243
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:1225
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:1272
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:1262
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition: ClauseT.h:1213
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:1230
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:1240
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:1293
std::true_type UnionTrait
Definition: ClauseT.h:1304
ExprType ExprTy
Definition: ClauseT.h:1294
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition: ClauseT.h:1301
VariantTy u
Definition: ClauseT.h:1305
llvm::omp::Clause id
Definition: ClauseT.h:1303
TypeType TypeTy
Definition: ClauseT.h:1292
tomp::type::ListT< ClauseType > clauses
Definition: ClauseT.h:1310
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:888
std::tuple< OPT(LowerBound), UpperBound > t
Definition: ClauseT.h:891
std::true_type WrapperTrait
Definition: ClauseT.h:898
std::true_type EmptyTrait
Definition: ClauseT.h:904
std::true_type EmptyTrait
Definition: ClauseT.h:909
std::true_type WrapperTrait
Definition: ClauseT.h:914
std::tuple< OPT(OrderModifier), Ordering > t
Definition: ClauseT.h:924
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition: ClauseT.h:923
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition: ClauseT.h:931
std::true_type IncompleteTrait
Definition: ClauseT.h:938
std::true_type WrapperTrait
Definition: ClauseT.h:945
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition: ClauseT.h:953
PriorityValue v
Definition: ClauseT.h:954
std::true_type WrapperTrait
Definition: ClauseT.h:961
AffinityPolicy v
Definition: ClauseT.h:970
std::true_type WrapperTrait
Definition: ClauseT.h:969
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition: ClauseT.h:976
std::true_type TupleTrait
Definition: ClauseT.h:987
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition: ClauseT.h:988
ENUM(ReductionModifier, Default, Inscan, Task)
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition: ClauseT.h:985
std::true_type EmptyTrait
Definition: ClauseT.h:994
std::true_type EmptyTrait
Definition: ClauseT.h:1000
std::true_type EmptyTrait
Definition: ClauseT.h:1006
std::true_type WrapperTrait
Definition: ClauseT.h:1013
std::true_type TupleTrait
Definition: ClauseT.h:1024
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition: ClauseT.h:1025
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type EmptyTrait
Definition: ClauseT.h:1031
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition: ClauseT.h:1038
std::true_type WrapperTrait
Definition: ClauseT.h:1046
std::true_type EmptyTrait
Definition: ClauseT.h:1053
std::true_type WrapperTrait
Definition: ClauseT.h:1060
std::true_type WrapperTrait
Definition: ClauseT.h:1068
std::true_type TupleTrait
Definition: ClauseT.h:1079
std::tuple< ReductionIdentifiers, List > t
Definition: ClauseT.h:1080
std::true_type WrapperTrait
Definition: ClauseT.h:1087
std::true_type EmptyTrait
Definition: ClauseT.h:1094
std::true_type TupleTrait
Definition: ClauseT.h:1106
type::MotionExpectation Expectation
Definition: ClauseT.h:1101
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:1107
std::true_type EmptyTrait
Definition: ClauseT.h:1113
std::true_type WrapperTrait
Definition: ClauseT.h:1126
ParameterList v
Definition: ClauseT.h:1127
std::true_type EmptyTrait
Definition: ClauseT.h:1132
std::true_type EmptyTrait
Definition: ClauseT.h:1138
std::true_type WrapperTrait
Definition: ClauseT.h:1147
OPT(TaskDependenceType) v
tomp::type::TaskDependenceType TaskDependenceType
Definition: ClauseT.h:1146
std::true_type WrapperTrait
Definition: ClauseT.h:1163
std::true_type WrapperTrait
Definition: ClauseT.h:1171
InteropVar v
Definition: ClauseT.h:1156
std::true_type WrapperTrait
Definition: ClauseT.h:1155
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition: ClauseT.h:1183
std::true_type WrapperTrait
Definition: ClauseT.h:1186
std::true_type EmptyTrait
Definition: ClauseT.h:1193
std::true_type IncompleteTrait
Definition: ClauseT.h:1199
std::true_type EmptyTrait
Definition: ClauseT.h:1205
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