LLVM 22.0.0git
ClauseT.h
Go to the documentation of this file.
1//===- ClauseT.h -- clause template definitions ---------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8// This file contains template classes that represent OpenMP clauses, as
9// described in the OpenMP API specification.
10//
11// The general structure of any specific clause class is that it is either
12// empty, or it consists of a single data member, which can take one of these
13// three forms:
14// - a value member, named `v`, or
15// - a tuple of values, named `t`, or
16// - a variant (i.e. union) of values, named `u`.
17// To assist with generic visit algorithms, classes define one of the following
18// traits:
19// - EmptyTrait: the class has no data members.
20// - WrapperTrait: the class has a single member `v`
21// - TupleTrait: the class has a tuple member `t`
22// - UnionTrait the class has a variant member `u`
23// - IncompleteTrait: the class is a placeholder class that is currently empty,
24// but will be completed at a later time.
25// Note: This structure follows the one used in flang parser.
26//
27// The types used in the class definitions follow the names used in the spec
28// (there are a few exceptions to this). For example, given
29// Clause `foo`
30// - foo-modifier : description...
31// - list : list of variables
32// the corresponding class would be
33// template <...>
34// struct FooT {
35// using FooModifier = type that can represent the modifier
36// using List = ListT<ObjectT<...>>;
37// using TupleTrait = std::true_type;
38// std::tuple<std::optional<FooModifier>, List> t;
39// };
40//===----------------------------------------------------------------------===//
41#ifndef LLVM_FRONTEND_OPENMP_CLAUSET_H
42#define LLVM_FRONTEND_OPENMP_CLAUSET_H
43
44#include "llvm/ADT/ArrayRef.h"
45#include "llvm/ADT/DenseMap.h"
46#include "llvm/ADT/DenseSet.h"
47#include "llvm/ADT/STLExtras.h"
52
53#include <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// Union of `dependence-type` and `task-depenence-type`.
242// V5.2: [15.9.1] `task-dependence-type` modifier
243ENUM(DependenceType, Depobj, In, Inout, Inoutset, Mutexinoutset, Out, Sink,
244 Source);
245ENUM(Prescriptiveness, Strict, Fallback);
246
247template <typename I, typename E> //
249 struct Distance {
250 using TupleTrait = std::true_type;
251 std::tuple<DefinedOperatorT<I, E>, E> t;
252 };
253 using TupleTrait = std::true_type;
254 std::tuple<ObjectT<I, E>, OPT(Distance)> t;
255};
256
257template <typename I, typename E> //
259 using WrapperTrait = std::true_type;
261};
262
263// Note:
264// For reduction clauses the OpenMP spec allows a unique reduction identifier.
265// For reasons analogous to those listed for the MapperT type, clauses that
266// according to the spec contain a reduction identifier will contain a list of
267// reduction identifiers. The same constraints apply: there is either a single
268// identifier that applies to all objects, or there are as many identifiers
269// as there are objects.
270template <typename I, typename E> //
272 using UnionTrait = std::true_type;
273 std::variant<DefinedOperatorT<I, E>, ProcedureDesignatorT<I, E>> u;
274};
275
276template <typename T, typename I, typename E> //
278
279template <typename T>
280std::enable_if_t<T::EmptyTrait::value, bool> operator==(const T &a,
281 const T &b) {
282 return true;
283}
284template <typename T>
285std::enable_if_t<T::IncompleteTrait::value, bool> operator==(const T &a,
286 const T &b) {
287 return true;
288}
289template <typename T>
290std::enable_if_t<T::WrapperTrait::value, bool> operator==(const T &a,
291 const T &b) {
292 return a.v == b.v;
293}
294template <typename T>
295std::enable_if_t<T::TupleTrait::value, bool> operator==(const T &a,
296 const T &b) {
297 return a.t == b.t;
298}
299template <typename T>
300std::enable_if_t<T::UnionTrait::value, bool> operator==(const T &a,
301 const T &b) {
302 return a.u == b.u;
303}
304} // namespace type
305
306template <typename T> using ListT = type::ListT<T>;
307
308template <typename I, typename E> using ObjectT = type::ObjectT<I, E>;
309template <typename I, typename E> using ObjectListT = type::ObjectListT<I, E>;
310
311template <typename T, typename I, typename E>
313
314template <
315 typename ContainerTy, typename FunctionTy,
316 typename ElemTy = typename llvm::remove_cvref_t<ContainerTy>::value_type,
317 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
318ListT<ResultTy> makeList(ContainerTy &&container, FunctionTy &&func) {
320 llvm::transform(container, std::back_inserter(v), func);
321 return v;
322}
323
324namespace clause {
325using type::operator==;
326
327// V5.2: [8.3.1] `assumption` clauses
328template <typename T, typename I, typename E> //
329struct AbsentT {
331 using WrapperTrait = std::true_type;
333};
334
335// V5.2: [15.8.1] `memory-order` clauses
336template <typename T, typename I, typename E> //
337struct AcqRelT {
338 using EmptyTrait = std::true_type;
339};
340
341// V5.2: [15.8.1] `memory-order` clauses
342template <typename T, typename I, typename E> //
343struct AcquireT {
344 using EmptyTrait = std::true_type;
345};
346
347// V5.2: [7.5.2] `adjust_args` clause
348template <typename T, typename I, typename E> //
350 using IncompleteTrait = std::true_type;
351};
352
353// V5.2: [12.5.1] `affinity` clause
354template <typename T, typename I, typename E> //
355struct AffinityT {
358
359 using TupleTrait = std::true_type;
360 std::tuple<OPT(Iterator), LocatorList> t;
361};
362
363// V5.2: [6.3] `align` clause
364template <typename T, typename I, typename E> //
365struct AlignT {
366 using Alignment = E;
367
368 using WrapperTrait = std::true_type;
370};
371
372// V5.2: [5.11] `aligned` clause
373template <typename T, typename I, typename E> //
374struct AlignedT {
375 using Alignment = E;
377
378 using TupleTrait = std::true_type;
379 std::tuple<OPT(Alignment), List> t;
380};
381
382template <typename T, typename I, typename E> //
383struct AllocatorT;
384
385// V5.2: [6.6] `allocate` clause
386template <typename T, typename I, typename E> //
387struct AllocateT {
388 // AllocatorSimpleModifier is same as AllocatorComplexModifier.
392
393 using TupleTrait = std::true_type;
395};
396
397// V5.2: [6.4] `allocator` clause
398template <typename T, typename I, typename E> //
400 using Allocator = E;
401 using WrapperTrait = std::true_type;
403};
404
405// V5.2: [7.5.3] `append_args` clause
406template <typename T, typename I, typename E> //
408 using IncompleteTrait = std::true_type;
409};
410
411// V5.2: [8.1] `at` clause
412template <typename T, typename I, typename E> //
413struct AtT {
414 ENUM(ActionTime, Compilation, Execution);
415 using WrapperTrait = std::true_type;
416 ActionTime v;
417};
418
419// V5.2: [8.2.1] `requirement` clauses
420template <typename T, typename I, typename E> //
422 using MemoryOrder = type::MemoryOrder;
423 using WrapperTrait = std::true_type;
424 MemoryOrder v; // Name not provided in spec
425};
426
427// V5.2: [11.7.1] `bind` clause
428template <typename T, typename I, typename E> //
429struct BindT {
430 ENUM(Binding, Teams, Parallel, Thread);
431 using WrapperTrait = std::true_type;
433};
434
435// V5.2: [15.8.3] `extended-atomic` clauses
436template <typename T, typename I, typename E> //
437struct CaptureT {
438 using EmptyTrait = std::true_type;
439};
440
441// V5.2: [4.4.3] `collapse` clause
442template <typename T, typename I, typename E> //
443struct CollapseT {
444 using N = E;
445 using WrapperTrait = std::true_type;
447};
448
449// V5.2: [15.8.3] `extended-atomic` clauses
450template <typename T, typename I, typename E> //
451struct CompareT {
452 using EmptyTrait = std::true_type;
453};
454
455// V5.2: [8.3.1] `assumption` clauses
456template <typename T, typename I, typename E> //
457struct ContainsT {
459 using WrapperTrait = std::true_type;
461};
462
463// V5.2: [5.7.1] `copyin` clause
464template <typename T, typename I, typename E> //
465struct CopyinT {
467 using WrapperTrait = std::true_type;
469};
470
471// V5.2: [5.7.2] `copyprivate` clause
472template <typename T, typename I, typename E> //
475 using WrapperTrait = std::true_type;
477};
478
479// V5.2: [5.4.1] `default` clause
480template <typename T, typename I, typename E> //
481struct DefaultT {
482 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
483 using WrapperTrait = std::true_type;
484 DataSharingAttribute v;
485};
486
487// V5.2: [5.8.7] `defaultmap` clause
488template <typename T, typename I, typename E> //
490 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
491 Present);
492 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
493 using TupleTrait = std::true_type;
494 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
495};
496
497template <typename T, typename I, typename E> //
498struct DoacrossT;
499
500// V5.2: [15.9.5] `depend` clause
501template <typename T, typename I, typename E> //
502struct DependT {
505 using DependenceType = tomp::type::DependenceType;
506
507 struct TaskDep { // The form with task dependence type.
508 using TupleTrait = std::true_type;
509 // Empty LocatorList means "omp_all_memory".
511 };
512
514 using UnionTrait = std::true_type;
515 std::variant<Doacross, TaskDep> u; // Doacross form is legacy
516};
517
518// V5.2: [3.5] `destroy` clause
519template <typename T, typename I, typename E> //
520struct DestroyT {
522 using WrapperTrait = std::true_type;
523 // DestroyVar can be ommitted in "depobj destroy".
525};
526
527// V5.2: [12.5.2] `detach` clause
528template <typename T, typename I, typename E> //
529struct DetachT {
531 using WrapperTrait = std::true_type;
533};
534
535// V5.2: [13.2] `device` clause
536template <typename T, typename I, typename E> //
537struct DeviceT {
539 ENUM(DeviceModifier, Ancestor, DeviceNum);
540 using TupleTrait = std::true_type;
541 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
542};
543
544// V5.2: [13.1] `device_type` clause
545template <typename T, typename I, typename E> //
547 ENUM(DeviceTypeDescription, Any, Host, Nohost);
548 using WrapperTrait = std::true_type;
549 DeviceTypeDescription v;
550};
551
552// V5.2: [11.6.1] `dist_schedule` clause
553template <typename T, typename I, typename E> //
555 ENUM(Kind, Static);
556 using ChunkSize = E;
557 using TupleTrait = std::true_type;
558 std::tuple<Kind, OPT(ChunkSize)> t;
559};
560
561// V5.2: [15.9.6] `doacross` clause
562template <typename T, typename I, typename E> //
563struct DoacrossT {
565 using DependenceType = tomp::type::DependenceType;
566 using TupleTrait = std::true_type;
567 // Empty Vector means "omp_cur_iteration"
568 std::tuple<DependenceType, Vector> t;
569};
570
571// V5.2: [8.2.1] `requirement` clauses
572template <typename T, typename I, typename E> //
574 using EmptyTrait = std::true_type;
575};
576
577template <typename T, typename I, typename E> //
579 ENUM(AccessGroup, Cgroup);
580 using Prescriptiveness = type::Prescriptiveness;
581 using Size = E;
582 using TupleTrait = std::true_type;
583 std::tuple<OPT(AccessGroup), OPT(Prescriptiveness), Size> t;
584};
585
586// V5.2: [5.8.4] `enter` clause
587template <typename T, typename I, typename E> //
588struct EnterT {
590 ENUM(Modifier, Automap);
591 using TupleTrait = std::true_type;
592 std::tuple<OPT(Modifier), List> t;
593};
594
595// V5.2: [5.6.2] `exclusive` clause
596template <typename T, typename I, typename E> //
598 using WrapperTrait = std::true_type;
601};
602
603// V5.2: [15.8.3] `extended-atomic` clauses
604template <typename T, typename I, typename E> //
605struct FailT {
606 using MemoryOrder = type::MemoryOrder;
607 using WrapperTrait = std::true_type;
609};
610
611// V5.2: [10.5.1] `filter` clause
612template <typename T, typename I, typename E> //
613struct FilterT {
614 using ThreadNum = E;
615 using WrapperTrait = std::true_type;
617};
618
619// V5.2: [12.3] `final` clause
620template <typename T, typename I, typename E> //
621struct FinalT {
622 using Finalize = E;
623 using WrapperTrait = std::true_type;
625};
626
627// V5.2: [5.4.4] `firstprivate` clause
628template <typename T, typename I, typename E> //
631 using WrapperTrait = std::true_type;
633};
634
635// V5.2: [5.9.2] `from` clause
636template <typename T, typename I, typename E> //
637struct FromT {
639 using Expectation = type::MotionExpectation;
641 // See note at the definition of the MapperT type.
642 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
643
644 using TupleTrait = std::true_type;
646};
647
648// V5.2: [9.2.1] `full` clause
649template <typename T, typename I, typename E> //
650struct FullT {
651 using EmptyTrait = std::true_type;
652};
653
654// V5.2: [12.6.1] `grainsize` clause
655template <typename T, typename I, typename E> //
657 using Prescriptiveness = type::Prescriptiveness;
658 using GrainSize = E;
659 using TupleTrait = std::true_type;
661};
662
663// [6.0:438] `graph_id` clause
664template <typename T, typename I, typename E> //
665struct GraphIdT {
666 using EmptyTrait = std::true_type;
667};
668
669// [6.0:438] `graph_reset` clause
670template <typename T, typename I, typename E> //
672 using EmptyTrait = std::true_type;
673};
674
675// V5.2: [5.4.9] `has_device_addr` clause
676template <typename T, typename I, typename E> //
679 using WrapperTrait = std::true_type;
681};
682
683// V5.2: [15.1.2] `hint` clause
684template <typename T, typename I, typename E> //
685struct HintT {
686 using HintExpr = E;
687 using WrapperTrait = std::true_type;
689};
690
691// V5.2: [8.3.1] Assumption clauses
692template <typename T, typename I, typename E> //
693struct HoldsT {
694 using WrapperTrait = std::true_type;
695 E v; // No argument name in spec 5.2
696};
697
698// V5.2: [3.4] `if` clause
699template <typename T, typename I, typename E> //
700struct IfT {
703 using TupleTrait = std::true_type;
705};
706
707// V5.2: [7.7.1] `branch` clauses
708template <typename T, typename I, typename E> //
709struct InbranchT {
710 using EmptyTrait = std::true_type;
711};
712
713// V5.2: [5.6.1] `exclusive` clause
714template <typename T, typename I, typename E> //
717 using WrapperTrait = std::true_type;
719};
720
721// V5.2: [7.8.3] `indirect` clause
722template <typename T, typename I, typename E> //
723struct IndirectT {
725 using WrapperTrait = std::true_type;
727};
728
729// V5.2: [14.1.2] `init` clause
730template <typename T, typename I, typename E> //
731struct InitT {
735 ENUM(InteropType, Target, Targetsync); // Repeatable
736 using InteropTypes = ListT<InteropType>; // Not a spec name
737
738 using TupleTrait = std::true_type;
740};
741
742// V5.2: [5.5.4] `initializer` clause
743template <typename T, typename I, typename E> //
746 using WrapperTrait = std::true_type;
748};
749
750// V5.2: [5.5.10] `in_reduction` clause
751template <typename T, typename I, typename E> //
754 // See note at the definition of the ReductionIdentifierT type.
755 // The name ReductionIdentifiers is not a spec name.
757 using TupleTrait = std::true_type;
758 std::tuple<ReductionIdentifiers, List> t;
759};
760
761// V5.2: [5.4.7] `is_device_ptr` clause
762template <typename T, typename I, typename E> //
765 using WrapperTrait = std::true_type;
767};
768
769// V5.2: [5.4.5] `lastprivate` clause
770template <typename T, typename I, typename E> //
773 ENUM(LastprivateModifier, Conditional);
774 using TupleTrait = std::true_type;
775 std::tuple<OPT(LastprivateModifier), List> t;
776};
777
778// V5.2: [5.4.6] `linear` clause
779template <typename T, typename I, typename E> //
780struct LinearT {
781 // std::get<type> won't work here due to duplicate types in the tuple.
783 // StepSimpleModifier is same as StepComplexModifier.
785 ENUM(LinearModifier, Ref, Val, Uval);
786
787 using TupleTrait = std::true_type;
788 // Step == nullopt means 1.
789 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
790};
791
792// V5.2: [5.8.5] `link` clause
793template <typename T, typename I, typename E> //
794struct LinkT {
796 using WrapperTrait = std::true_type;
798};
799
800// V5.2: [5.8.3] `map` clause
801template <typename T, typename I, typename E> //
802struct MapT {
804 ENUM(MapType, To, From, Tofrom, Storage);
805 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
806 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
807 // See note at the definition of the MapperT type.
808 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
810 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
811
812 using TupleTrait = std::true_type;
813 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(RefModifier),
816};
817
818// V5.2: [7.5.1] `match` clause
819template <typename T, typename I, typename E> //
820struct MatchT {
821 using IncompleteTrait = std::true_type;
822};
823
824// V5.2: [12.2] `mergeable` clause
825template <typename T, typename I, typename E> //
827 using EmptyTrait = std::true_type;
828};
829
830// V5.2: [8.5.2] `message` clause
831template <typename T, typename I, typename E> //
832struct MessageT {
833 using MsgString = E;
834 using WrapperTrait = std::true_type;
836};
837
838// V5.2: [7.6.2] `nocontext` clause
839template <typename T, typename I, typename E> //
842 using WrapperTrait = std::true_type;
844};
845
846// V5.2: [15.7] `nowait` clause
847template <typename T, typename I, typename E> //
848struct NogroupT {
849 using EmptyTrait = std::true_type;
850};
851
852// V5.2: [10.4.1] `nontemporal` clause
853template <typename T, typename I, typename E> //
856 using WrapperTrait = std::true_type;
858};
859
860// V5.2: [8.3.1] `assumption` clauses
861template <typename T, typename I, typename E> //
862struct NoOpenmpT {
863 using EmptyTrait = std::true_type;
864};
865
866// V5.2: [8.3.1] `assumption` clauses
867template <typename T, typename I, typename E> //
869 using EmptyTrait = std::true_type;
870};
871
872// V6.0: [10.6.1] `assumption` clauses
873template <typename T, typename I, typename E> //
875 using EmptyTrait = std::true_type;
876};
877
878// V5.2: [8.3.1] `assumption` clauses
879template <typename T, typename I, typename E> //
881 using EmptyTrait = std::true_type;
882};
883
884// V5.2: [7.7.1] `branch` clauses
885template <typename T, typename I, typename E> //
887 using EmptyTrait = std::true_type;
888};
889
890// V5.2: [7.6.1] `novariants` clause
891template <typename T, typename I, typename E> //
894 using WrapperTrait = std::true_type;
896};
897
898// V5.2: [15.6] `nowait` clause
899template <typename T, typename I, typename E> //
900struct NowaitT {
901 using EmptyTrait = std::true_type;
902};
903
904// V5.2: [12.6.2] `num_tasks` clause
905template <typename T, typename I, typename E> //
906struct NumTasksT {
907 using Prescriptiveness = type::Prescriptiveness;
908 using NumTasks = E;
909 using TupleTrait = std::true_type;
911};
912
913// V5.2: [10.2.1] `num_teams` clause
914template <typename T, typename I, typename E> //
915struct NumTeamsT {
916 using LowerBound = E;
917 using UpperBound = E;
918
919 // The name Range is not a spec name.
920 struct Range {
921 using TupleTrait = std::true_type;
922 std::tuple<OPT(LowerBound), UpperBound> t;
923 };
924
925 // The name List is not a spec name. The list is an extension to allow
926 // specifying a grid with connection with the ompx_bare clause.
928 using WrapperTrait = std::true_type;
930};
931
932// V5.2: [10.1.2] `num_threads` clause
933template <typename T, typename I, typename E> //
935 using Nthreads = E;
936 using WrapperTrait = std::true_type;
938};
939
940template <typename T, typename I, typename E> //
942 using EmptyTrait = std::true_type;
943};
944
945template <typename T, typename I, typename E> //
946struct OmpxBareT {
947 using EmptyTrait = std::true_type;
948};
949
950template <typename T, typename I, typename E> //
952 using WrapperTrait = std::true_type;
954};
955
956// V5.2: [10.3] `order` clause
957template <typename T, typename I, typename E> //
958struct OrderT {
959 ENUM(OrderModifier, Reproducible, Unconstrained);
960 ENUM(Ordering, Concurrent);
961 using TupleTrait = std::true_type;
962 std::tuple<OPT(OrderModifier), Ordering> t;
963};
964
965// V5.2: [4.4.4] `ordered` clause
966template <typename T, typename I, typename E> //
967struct OrderedT {
968 using N = E;
969 using WrapperTrait = std::true_type;
970 OPT(N) v;
971};
972
973// V5.2: [7.4.2] `otherwise` clause
974template <typename T, typename I, typename E> //
976 using IncompleteTrait = std::true_type;
977};
978
979// V5.2: [9.2.2] `partial` clause
980template <typename T, typename I, typename E> //
981struct PartialT {
983 using WrapperTrait = std::true_type;
985};
986
987// V6.0: `permutation` clause
988template <typename T, typename I, typename E> //
991 using WrapperTrait = std::true_type;
993};
994
995// V5.2: [12.4] `priority` clause
996template <typename T, typename I, typename E> //
997struct PriorityT {
999 using WrapperTrait = std::true_type;
1001};
1002
1003// V5.2: [5.4.3] `private` clause
1004template <typename T, typename I, typename E> //
1005struct PrivateT {
1007 using WrapperTrait = std::true_type;
1009};
1010
1011// V5.2: [10.1.4] `proc_bind` clause
1012template <typename T, typename I, typename E> //
1014 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1015 using WrapperTrait = std::true_type;
1016 AffinityPolicy v;
1017};
1018
1019// V5.2: [15.8.2] Atomic clauses
1020template <typename T, typename I, typename E> //
1021struct ReadT {
1022 using EmptyTrait = std::true_type;
1023};
1024
1025// V5.2: [5.5.8] `reduction` clause
1026template <typename T, typename I, typename E> //
1029 // See note at the definition of the ReductionIdentifierT type.
1030 // The name ReductionIdentifiers is not a spec name.
1032 ENUM(ReductionModifier, Default, Inscan, Task);
1033 using TupleTrait = std::true_type;
1034 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1035};
1036
1037// V5.2: [15.8.1] `memory-order` clauses
1038template <typename T, typename I, typename E> //
1039struct RelaxedT {
1040 using EmptyTrait = std::true_type;
1041};
1042
1043// V5.2: [15.8.1] `memory-order` clauses
1044template <typename T, typename I, typename E> //
1045struct ReleaseT {
1046 using EmptyTrait = std::true_type;
1047};
1048
1049// [6.0:440-441] `replayable` clause
1050template <typename T, typename I, typename E> //
1052 using IncompleteTrait = std::true_type;
1053};
1054
1055// V5.2: [8.2.1] `requirement` clauses
1056template <typename T, typename I, typename E> //
1058 using EmptyTrait = std::true_type;
1059};
1060
1061// V5.2: [10.4.2] `safelen` clause
1062template <typename T, typename I, typename E> //
1063struct SafelenT {
1064 using Length = E;
1065 using WrapperTrait = std::true_type;
1067};
1068
1069// V5.2: [11.5.3] `schedule` clause
1070template <typename T, typename I, typename E> //
1072 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1073 using ChunkSize = E;
1074 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1075 ENUM(ChunkModifier, Simd);
1076 using TupleTrait = std::true_type;
1077 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1078};
1079
1080// V5.2: [15.8.1] Memory-order clauses
1081template <typename T, typename I, typename E> //
1082struct SeqCstT {
1083 using EmptyTrait = std::true_type;
1084};
1085
1086// V5.2: [8.5.1] `severity` clause
1087template <typename T, typename I, typename E> //
1089 ENUM(SevLevel, Fatal, Warning);
1090 using WrapperTrait = std::true_type;
1091 SevLevel v;
1092};
1093
1094// V5.2: [5.4.2] `shared` clause
1095template <typename T, typename I, typename E> //
1096struct SharedT {
1098 using WrapperTrait = std::true_type;
1100};
1101
1102// V5.2: [15.10.3] `parallelization-level` clauses
1103template <typename T, typename I, typename E> //
1104struct SimdT {
1105 using EmptyTrait = std::true_type;
1106};
1107
1108// V5.2: [10.4.3] `simdlen` clause
1109template <typename T, typename I, typename E> //
1110struct SimdlenT {
1111 using Length = E;
1112 using WrapperTrait = std::true_type;
1114};
1115
1116// V5.2: [9.1.1] `sizes` clause
1117template <typename T, typename I, typename E> //
1118struct SizesT {
1120 using WrapperTrait = std::true_type;
1122};
1123
1124// V5.2: [5.5.9] `task_reduction` clause
1125template <typename T, typename I, typename E> //
1128 // See note at the definition of the ReductionIdentifierT type.
1129 // The name ReductionIdentifiers is not a spec name.
1131 using TupleTrait = std::true_type;
1132 std::tuple<ReductionIdentifiers, List> t;
1133};
1134
1135// V5.2: [13.3] `thread_limit` clause
1136template <typename T, typename I, typename E> //
1138 using Threadlim = E;
1139 using WrapperTrait = std::true_type;
1141};
1142
1143// V5.2: [15.10.3] `parallelization-level` clauses
1144template <typename T, typename I, typename E> //
1145struct ThreadsT {
1146 using EmptyTrait = std::true_type;
1147};
1148
1149// V5.2: [5.9.1] `to` clause
1150template <typename T, typename I, typename E> //
1151struct ToT {
1153 using Expectation = type::MotionExpectation;
1154 // See note at the definition of the MapperT type.
1155 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1157
1158 using TupleTrait = std::true_type;
1160};
1161
1162// [6.0:440-441] `transparent` clause
1163template <typename T, typename I, typename E> //
1165 using IncompleteTrait = std::true_type;
1166};
1167
1168// V5.2: [8.2.1] `requirement` clauses
1169template <typename T, typename I, typename E> //
1171 using EmptyTrait = std::true_type;
1172};
1173
1174// V5.2: [8.2.1] `requirement` clauses
1175template <typename T, typename I, typename E> //
1177 using EmptyTrait = std::true_type;
1178};
1179
1180template <typename T, typename I, typename E> //
1182 using EmptyTrait = std::true_type;
1183};
1184
1185// V5.2: [5.10] `uniform` clause
1186template <typename T, typename I, typename E> //
1187struct UniformT {
1189 using WrapperTrait = std::true_type;
1191};
1192
1193template <typename T, typename I, typename E> //
1194struct UnknownT {
1195 using EmptyTrait = std::true_type;
1196};
1197
1198// V5.2: [12.1] `untied` clause
1199template <typename T, typename I, typename E> //
1200struct UntiedT {
1201 using EmptyTrait = std::true_type;
1202};
1203
1204// Both of the following
1205// V5.2: [15.8.2] `atomic` clauses
1206// V5.2: [15.9.3] `update` clause
1207template <typename T, typename I, typename E> //
1208struct UpdateT {
1209 using DependenceType = tomp::type::DependenceType;
1210 using WrapperTrait = std::true_type;
1212};
1213
1214// V5.2: [14.1.3] `use` clause
1215template <typename T, typename I, typename E> //
1216struct UseT {
1218 using WrapperTrait = std::true_type;
1220};
1221
1222// V5.2: [5.4.10] `use_device_addr` clause
1223template <typename T, typename I, typename E> //
1226 using WrapperTrait = std::true_type;
1228};
1229
1230// V5.2: [5.4.8] `use_device_ptr` clause
1231template <typename T, typename I, typename E> //
1234 using WrapperTrait = std::true_type;
1236};
1237
1238// V5.2: [6.8] `uses_allocators` clause
1239template <typename T, typename I, typename E> //
1241 using MemSpace = E;
1243 using Allocator = E;
1244 struct AllocatorSpec { // Not a spec name
1245 using TupleTrait = std::true_type;
1247 };
1248 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1249 using WrapperTrait = std::true_type;
1251};
1252
1253// V5.2: [15.8.3] `extended-atomic` clauses
1254template <typename T, typename I, typename E> //
1255struct WeakT {
1256 using EmptyTrait = std::true_type;
1257};
1258
1259// V5.2: [7.4.1] `when` clause
1260template <typename T, typename I, typename E> //
1261struct WhenT {
1262 using IncompleteTrait = std::true_type;
1263};
1264
1265// V5.2: [15.8.2] Atomic clauses
1266template <typename T, typename I, typename E> //
1267struct WriteT {
1268 using EmptyTrait = std::true_type;
1269};
1270
1271// ---
1272
1273template <typename T, typename I, typename E>
1275 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1277
1278template <typename T, typename I, typename E>
1279using EmptyClausesT = std::variant<
1290
1291template <typename T, typename I, typename E>
1293 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, MatchT<T, I, E>,
1296
1297template <typename T, typename I, typename E>
1299 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1307
1308template <typename T, typename I, typename E>
1309using UnionClausesT = std::variant<DependT<T, I, E>>;
1310
1311template <typename T, typename I, typename E>
1312using WrapperClausesT = std::variant<
1329
1330template <typename T, typename I, typename E>
1338 >::type;
1339} // namespace clause
1340
1341using type::operator==;
1342
1343// The variant wrapper that encapsulates all possible specific clauses.
1344// The `Extras` arguments are additional types representing local extensions
1345// to the clause set, e.g.
1346//
1347// using Clause = ClauseT<Type, Id, Expr,
1348// MyClause1, MyClause2>;
1349//
1350// The member Clause::u will be a variant containing all specific clauses
1351// defined above, plus MyClause1 and MyClause2.
1352//
1353// Note: Any derived class must be constructible from the base class
1354// ClauseT<...>.
1355template <typename TypeType, typename IdType, typename ExprType,
1356 typename... Extras>
1357struct ClauseT {
1358 using TypeTy = TypeType;
1359 using IdTy = IdType;
1360 using ExprTy = ExprType;
1361
1362 // Type of "self" to specify this type given a derived class type.
1363 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1364
1365 using VariantTy = typename type::Union<
1367 std::variant<Extras...>>::type;
1368
1369 llvm::omp::Clause id; // The numeric id of the clause
1370 using UnionTrait = std::true_type;
1372};
1373
1374template <typename ClauseType> struct DirectiveWithClauses {
1375 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1377};
1378
1379} // namespace tomp
1380
1381#undef OPT
1382#undef ENUM
1383
1384#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
AMDGPU Prepare AGPR Alloc
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define ENUM(Name,...)
Definition ClauseT.h:61
#define OPT(x)
Definition ClauseT.h:62
DXIL Resource Implicit Binding
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
@ Default
global merge func
#define T
This file contains some templates that are useful if you are working with the STL at all.
This file defines the SmallVector class.
@ None
static constexpr int Concat[]
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
constexpr bool is_variant_v
Definition ClauseT.h: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:1950
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:851
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:1331
std::variant< AffinityT< T, I, E >, AlignedT< T, I, E >, AllocateT< T, I, E >, DefaultmapT< T, I, E >, DeviceT< T, I, E >, DistScheduleT< T, I, E >, DoacrossT< T, I, E >, DynGroupprivateT< T, I, E >, FromT< T, I, E >, GrainsizeT< T, I, E >, IfT< T, I, E >, InitT< T, I, E >, InReductionT< T, I, E >, LastprivateT< T, I, E >, LinearT< T, I, E >, 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:1298
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1274
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 >, PermutationT< 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:1312
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 >, GraphIdT< T, I, E >, GraphResetT< 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 >, NoOpenmpConstructsT< T, I, E >, SelfMapsT< T, I, E > > EmptyClausesT
Definition ClauseT.h:1279
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, MatchT< T, I, E >, OtherwiseT< T, I, E >, ReplayableT< T, I, E >, TransparentT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition ClauseT.h:1292
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1309
llvm::omp::Directive DirectiveName
Definition ClauseT.h:191
ListT< IteratorSpecifierT< T, I, E > > IteratorT
Definition ClauseT.h:277
bool operator==(const ObjectT< I, E > &o1, const ObjectT< I, E > &o2)
Definition ClauseT.h:185
ListT< ObjectT< I, E > > ObjectListT
Definition ClauseT.h:189
llvm::SmallVector< T, 0 > ListT
Definition ClauseT.h:151
type::ObjectListT< I, E > ObjectListT
Definition ClauseT.h:309
type::IteratorT< T, I, E > IteratorT
Definition ClauseT.h:312
type::ListT< T > ListT
Definition ClauseT.h:306
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
Definition ClauseT.h:318
type::ObjectT< I, E > ObjectT
Definition ClauseT.h:308
#define EQ(a, b)
Definition regexec.c:65
static constexpr bool value
Definition ClauseT.h:115
IdType IdTy
Definition ClauseT.h:1359
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1365
ExprType ExprTy
Definition ClauseT.h:1360
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1363
TypeType TypeTy
Definition ClauseT.h:1358
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1376
std::true_type WrapperTrait
Definition ClauseT.h:331
ListT< type::DirectiveName > List
Definition ClauseT.h:330
std::true_type EmptyTrait
Definition ClauseT.h:338
std::true_type EmptyTrait
Definition ClauseT.h:344
std::true_type IncompleteTrait
Definition ClauseT.h:350
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:356
std::tuple< OPT(Iterator), LocatorList > t
Definition ClauseT.h:360
std::true_type TupleTrait
Definition ClauseT.h:359
ObjectListT< I, E > LocatorList
Definition ClauseT.h:357
std::true_type WrapperTrait
Definition ClauseT.h:368
std::tuple< OPT(Alignment), List > t
Definition ClauseT.h:379
ObjectListT< I, E > List
Definition ClauseT.h:376
std::true_type TupleTrait
Definition ClauseT.h:378
std::true_type TupleTrait
Definition ClauseT.h:393
ObjectListT< I, E > List
Definition ClauseT.h:391
std::tuple< OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
Definition ClauseT.h:394
AllocatorT< T, I, E > AllocatorComplexModifier
Definition ClauseT.h:389
AlignT< T, I, E > AlignModifier
Definition ClauseT.h:390
std::true_type WrapperTrait
Definition ClauseT.h:401
std::true_type IncompleteTrait
Definition ClauseT.h:408
ActionTime v
Definition ClauseT.h:416
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition ClauseT.h:415
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition ClauseT.h:431
std::true_type EmptyTrait
Definition ClauseT.h:438
std::true_type WrapperTrait
Definition ClauseT.h:445
std::true_type EmptyTrait
Definition ClauseT.h:452
ListT< type::DirectiveName > List
Definition ClauseT.h:458
std::true_type WrapperTrait
Definition ClauseT.h:459
std::true_type WrapperTrait
Definition ClauseT.h:467
ObjectListT< I, E > List
Definition ClauseT.h:466
ObjectListT< I, E > List
Definition ClauseT.h:474
std::true_type WrapperTrait
Definition ClauseT.h:475
DataSharingAttribute v
Definition ClauseT.h:484
std::true_type WrapperTrait
Definition ClauseT.h:483
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
Definition ClauseT.h:494
std::true_type TupleTrait
Definition ClauseT.h:493
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
Definition ClauseT.h:510
tomp::type::DependenceType DependenceType
Definition ClauseT.h:505
DoacrossT< T, I, E > Doacross
Definition ClauseT.h:513
std::true_type UnionTrait
Definition ClauseT.h:514
ObjectListT< I, E > LocatorList
Definition ClauseT.h:504
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:503
std::variant< Doacross, TaskDep > u
Definition ClauseT.h:515
std::true_type WrapperTrait
Definition ClauseT.h:522
ObjectT< I, E > DestroyVar
Definition ClauseT.h:521
ObjectT< I, E > EventHandle
Definition ClauseT.h:530
std::true_type WrapperTrait
Definition ClauseT.h:531
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:541
std::true_type TupleTrait
Definition ClauseT.h:540
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:549
std::true_type WrapperTrait
Definition ClauseT.h:548
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:558
std::true_type TupleTrait
Definition ClauseT.h:557
std::true_type TupleTrait
Definition ClauseT.h:566
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:564
tomp::type::DependenceType DependenceType
Definition ClauseT.h:565
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:568
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:580
std::tuple< OPT(AccessGroup), OPT(Prescriptiveness), Size > t
Definition ClauseT.h:583
ENUM(AccessGroup, Cgroup)
std::true_type TupleTrait
Definition ClauseT.h:591
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:592
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:589
std::true_type WrapperTrait
Definition ClauseT.h:598
ObjectListT< I, E > List
Definition ClauseT.h:599
MemoryOrder v
Definition ClauseT.h:608
std::true_type WrapperTrait
Definition ClauseT.h:607
type::MemoryOrder MemoryOrder
Definition ClauseT.h:606
std::true_type WrapperTrait
Definition ClauseT.h:615
std::true_type WrapperTrait
Definition ClauseT.h:623
std::true_type WrapperTrait
Definition ClauseT.h:631
ObjectListT< I, E > List
Definition ClauseT.h:630
std::true_type TupleTrait
Definition ClauseT.h:644
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:640
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:645
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:642
type::MotionExpectation Expectation
Definition ClauseT.h:639
ObjectListT< I, E > LocatorList
Definition ClauseT.h:638
std::true_type EmptyTrait
Definition ClauseT.h:651
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:657
std::true_type TupleTrait
Definition ClauseT.h:659
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:660
std::true_type EmptyTrait
Definition ClauseT.h:666
std::true_type EmptyTrait
Definition ClauseT.h:672
ObjectListT< I, E > List
Definition ClauseT.h:678
std::true_type WrapperTrait
Definition ClauseT.h:679
std::true_type WrapperTrait
Definition ClauseT.h:687
std::true_type WrapperTrait
Definition ClauseT.h:694
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:704
std::true_type TupleTrait
Definition ClauseT.h:703
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:701
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:758
std::true_type TupleTrait
Definition ClauseT.h:757
ObjectListT< I, E > List
Definition ClauseT.h:753
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:756
std::true_type EmptyTrait
Definition ClauseT.h:710
std::true_type WrapperTrait
Definition ClauseT.h:717
ObjectListT< I, E > List
Definition ClauseT.h:716
std::true_type WrapperTrait
Definition ClauseT.h:725
OPT(InvokedByFptr) v
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:734
ObjectT< I, E > InteropVar
Definition ClauseT.h:733
ListT< InteropType > InteropTypes
Definition ClauseT.h:736
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:739
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:738
InitializerExpr v
Definition ClauseT.h:747
std::true_type WrapperTrait
Definition ClauseT.h:746
ObjectListT< I, E > List
Definition ClauseT.h:764
std::true_type WrapperTrait
Definition ClauseT.h:765
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:775
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:774
ObjectListT< I, E > List
Definition ClauseT.h:772
std::true_type TupleTrait
Definition ClauseT.h:787
ObjectListT< I, E > List
Definition ClauseT.h:782
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:789
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:796
ObjectListT< I, E > List
Definition ClauseT.h:795
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:808
ObjectListT< I, E > LocatorList
Definition ClauseT.h:803
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:809
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:810
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:815
ENUM(MapType, To, From, Tofrom, Storage)
std::true_type TupleTrait
Definition ClauseT.h:812
std::true_type IncompleteTrait
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:863
std::true_type EmptyTrait
Definition ClauseT.h:881
std::true_type WrapperTrait
Definition ClauseT.h:842
DoNotUpdateContext v
Definition ClauseT.h:843
std::true_type EmptyTrait
Definition ClauseT.h:849
ObjectListT< I, E > List
Definition ClauseT.h:855
std::true_type WrapperTrait
Definition ClauseT.h:856
std::true_type EmptyTrait
Definition ClauseT.h:887
std::true_type WrapperTrait
Definition ClauseT.h:894
DoNotUseVariant v
Definition ClauseT.h:895
std::true_type EmptyTrait
Definition ClauseT.h:901
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:910
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:907
std::true_type TupleTrait
Definition ClauseT.h:909
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:922
std::true_type WrapperTrait
Definition ClauseT.h:928
ListT< Range > List
Definition ClauseT.h:927
std::true_type WrapperTrait
Definition ClauseT.h:936
std::true_type EmptyTrait
Definition ClauseT.h:942
std::true_type EmptyTrait
Definition ClauseT.h:947
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:962
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:961
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:969
std::true_type IncompleteTrait
Definition ClauseT.h:976
std::true_type WrapperTrait
Definition ClauseT.h:983
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:991
std::true_type WrapperTrait
Definition ClauseT.h:999
std::true_type WrapperTrait
Definition ClauseT.h:1007
ObjectListT< I, E > List
Definition ClauseT.h:1006
AffinityPolicy v
Definition ClauseT.h:1016
std::true_type WrapperTrait
Definition ClauseT.h:1015
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1022
std::true_type TupleTrait
Definition ClauseT.h:1033
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1034
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1028
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1031
std::true_type EmptyTrait
Definition ClauseT.h:1040
std::true_type EmptyTrait
Definition ClauseT.h:1046
std::true_type IncompleteTrait
Definition ClauseT.h:1052
std::true_type WrapperTrait
Definition ClauseT.h:1065
std::true_type TupleTrait
Definition ClauseT.h:1076
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1077
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type EmptyTrait
Definition ClauseT.h:1182
std::true_type EmptyTrait
Definition ClauseT.h:1083
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1090
std::true_type WrapperTrait
Definition ClauseT.h:1098
ObjectListT< I, E > List
Definition ClauseT.h:1097
std::true_type EmptyTrait
Definition ClauseT.h:1105
std::true_type WrapperTrait
Definition ClauseT.h:1112
ListT< E > SizeList
Definition ClauseT.h:1119
std::true_type WrapperTrait
Definition ClauseT.h:1120
ObjectListT< I, E > List
Definition ClauseT.h:1127
std::true_type TupleTrait
Definition ClauseT.h:1131
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1130
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1132
std::true_type WrapperTrait
Definition ClauseT.h:1139
std::true_type EmptyTrait
Definition ClauseT.h:1146
std::true_type TupleTrait
Definition ClauseT.h:1158
type::MotionExpectation Expectation
Definition ClauseT.h:1153
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1159
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1156
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1152
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1155
std::true_type IncompleteTrait
Definition ClauseT.h:1165
std::true_type WrapperTrait
Definition ClauseT.h:1189
ParameterList v
Definition ClauseT.h:1190
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1188
std::true_type EmptyTrait
Definition ClauseT.h:1195
std::true_type EmptyTrait
Definition ClauseT.h:1201
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1210
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1209
std::true_type WrapperTrait
Definition ClauseT.h:1226
ObjectListT< I, E > List
Definition ClauseT.h:1225
ObjectListT< I, E > List
Definition ClauseT.h:1233
std::true_type WrapperTrait
Definition ClauseT.h:1234
ObjectT< I, E > InteropVar
Definition ClauseT.h:1217
std::true_type WrapperTrait
Definition ClauseT.h:1218
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1246
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1248
std::true_type WrapperTrait
Definition ClauseT.h:1249
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1242
std::true_type EmptyTrait
Definition ClauseT.h:1256
std::true_type IncompleteTrait
Definition ClauseT.h:1262
std::true_type EmptyTrait
Definition ClauseT.h:1268
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::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
Definition ClauseT.h:218
std::tuple< DefinedOperatorT< I, E >, E > t
Definition ClauseT.h:251
std::tuple< ObjectT< I, E >, OPT(Distance)> t
Definition ClauseT.h:254
std::true_type TupleTrait
Definition ClauseT.h:253
MapperIdentifier v
Definition ClauseT.h:234
ObjectT< I, E > MapperIdentifier
Definition ClauseT.h:232
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:273
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type
Definition ClauseT.h:147
std::variant<> type
Definition ClauseT.h:142