LLVM 22.0.0git
ClauseT.h
Go to the documentation of this file.
1//===- ClauseT.h -- clause template definitions ---------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8// This file contains template classes that represent OpenMP clauses, as
9// described in the OpenMP API specification.
10//
11// The general structure of any specific clause class is that it is either
12// empty, or it consists of a single data member, which can take one of these
13// three forms:
14// - a value member, named `v`, or
15// - a tuple of values, named `t`, or
16// - a variant (i.e. union) of values, named `u`.
17// To assist with generic visit algorithms, classes define one of the following
18// traits:
19// - EmptyTrait: the class has no data members.
20// - WrapperTrait: the class has a single member `v`
21// - TupleTrait: the class has a tuple member `t`
22// - UnionTrait the class has a variant member `u`
23// - IncompleteTrait: the class is a placeholder class that is currently empty,
24// but will be completed at a later time.
25// Note: This structure follows the one used in flang parser.
26//
27// The types used in the class definitions follow the names used in the spec
28// (there are a few exceptions to this). For example, given
29// Clause `foo`
30// - foo-modifier : description...
31// - list : list of variables
32// the corresponding class would be
33// template <...>
34// struct FooT {
35// using FooModifier = type that can represent the modifier
36// using List = ListT<ObjectT<...>>;
37// using TupleTrait = std::true_type;
38// std::tuple<std::optional<FooModifier>, List> t;
39// };
40//===----------------------------------------------------------------------===//
41#ifndef LLVM_FRONTEND_OPENMP_CLAUSET_H
42#define LLVM_FRONTEND_OPENMP_CLAUSET_H
43
44#include "llvm/ADT/ArrayRef.h"
45#include "llvm/ADT/DenseMap.h"
46#include "llvm/ADT/DenseSet.h"
47#include "llvm/ADT/STLExtras.h"
52
53#include <iterator>
54#include <optional>
55#include <tuple>
56#include <type_traits>
57#include <utility>
58#include <variant>
59
60#define ENUM(Name, ...) enum class Name { __VA_ARGS__ }
61#define OPT(x) std::optional<x>
62
63// A number of OpenMP clauses contain values that come from a given set of
64// possibilities. In the IR these are usually represented by enums. Both
65// clang and flang use different types for the enums, and the enum elements
66// representing the same thing may have different values between clang and
67// flang.
68// Since the representation below tries to adhere to the spec, and be source
69// language agnostic, it defines its own enums, independent from any language
70// frontend. As a consequence, when instantiating the templates below,
71// frontend-specific enums need to be translated into the representation
72// used here. The macros below are intended to assist with the conversion.
73
74// Helper macro for enum-class conversion.
75#define CLAUSET_SCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
76 if (v == OtherEnum::Ov) { \
77 return ThisEnum::Tv; \
78 }
79
80// Helper macro for enum (non-class) conversion.
81#define CLAUSET_UNSCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
82 if (v == Ov) { \
83 return ThisEnum::Tv; \
84 }
85
86#define CLAUSET_ENUM_CONVERT(func, OtherE, ThisE, Maps) \
87 auto func = [](OtherE v) -> ThisE { \
88 using ThisEnum = ThisE; \
89 using OtherEnum = OtherE; \
90 (void)sizeof(OtherEnum); /*Avoid "unused local typedef" warning*/ \
91 Maps; \
92 llvm_unreachable("Unexpected value in " #OtherE); \
93 }
94
95// Usage:
96//
97// Given two enums,
98// enum class Other { o1, o2 };
99// enum class This { t1, t2 };
100// generate conversion function "Func : Other -> This" with
101// CLAUSET_ENUM_CONVERT(
102// Func, Other, This,
103// CLAUSET_ENUM_MEMBER_CONVERT(o1, t1) // <- No comma
104// CLAUSET_ENUM_MEMBER_CONVERT(o2, t2)
105// ...
106// )
107//
108// Note that the sequence of M(other-value, this-value) is separated
109// with _spaces_, not commas.
110
111namespace detail {
112// Type trait to determine whether T is a specialization of std::variant.
113template <typename T> struct is_variant {
114 static constexpr bool value = false;
115};
116
117template <typename... Ts> struct is_variant<std::variant<Ts...>> {
118 static constexpr bool value = true;
119};
120
121template <typename T> constexpr bool is_variant_v = is_variant<T>::value;
122
123// Helper utility to create a type which is a union of two given variants.
124template <typename...> struct UnionOfTwo;
125
126template <typename... Types1, typename... Types2>
127struct UnionOfTwo<std::variant<Types1...>, std::variant<Types2...>> {
128 using type = std::variant<Types1..., Types2...>;
129};
130} // namespace detail
131
132namespace tomp {
133namespace type {
134
135// Helper utility to create a type which is a union of an arbitrary number
136// of variants.
137template <typename...> struct Union;
138
139template <> struct Union<> {
140 // Legal to define, illegal to instantiate.
141 using type = std::variant<>;
142};
143
144template <typename T, typename... Ts> struct Union<T, Ts...> {
145 static_assert(detail::is_variant_v<T>);
146 using type =
147 typename detail::UnionOfTwo<T, typename Union<Ts...>::type>::type;
148};
149
150template <typename T> using ListT = llvm::SmallVector<T, 0>;
151
152// The ObjectT class represents a variable or a locator (as defined in
153// the OpenMP spec).
154// Note: the ObjectT template is not defined. Any user of it is expected to
155// provide their own specialization that conforms to the requirements listed
156// below.
157//
158// Let ObjectS be any specialization of ObjectT:
159//
160// ObjectS must provide the following definitions:
161// {
162// using IdTy = Id;
163// using ExprTy = Expr;
164//
165// auto id() const -> IdTy {
166// // Return a value such that a.id() == b.id() if and only if:
167// // (1) both `a` and `b` represent the same variable or location, or
168// // (2) bool(a.id()) == false and bool(b.id()) == false
169// }
170// }
171//
172// The type IdTy should be hashable (usable as key in unordered containers).
173//
174// Values of type IdTy should be contextually convertible to `bool`.
175//
176// If S is an object of type ObjectS, then `bool(S.id())` is `false` if
177// and only if S does not represent any variable or location.
178//
179// ObjectS should be copyable, movable, and default-constructible.
180template <typename IdType, typename ExprType> struct ObjectT;
181
182// By default, object equality is only determined by its identity.
183template <typename I, typename E>
184bool operator==(const ObjectT<I, E> &o1, const ObjectT<I, E> &o2) {
185 return o1.id() == o2.id();
186}
187
188template <typename I, typename E> using ObjectListT = ListT<ObjectT<I, E>>;
189
190using DirectiveName = llvm::omp::Directive;
191
192template <typename I, typename E> //
195 using Instance = E;
196 using TupleTrait = std::true_type;
197 std::tuple<Variables, Instance> t;
198};
199
200template <typename I, typename E> //
203 using WrapperTrait = std::true_type;
205 };
206 ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT,
207 LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max);
208 using UnionTrait = std::true_type;
209 std::variant<DefinedOpName, IntrinsicOperator> u;
210};
211
212// V5.2: [3.2.6] `iterator` modifier
213template <typename E> //
214struct RangeT {
215 // range-specification: begin : end[: step]
216 using TupleTrait = std::true_type;
217 std::tuple<E, E, OPT(E)> t;
218};
219
220// V5.2: [3.2.6] `iterator` modifier
221template <typename TypeType, typename IdType, typename ExprType> //
223 // iterators-specifier: [ iterator-type ] identifier = range-specification
224 using TupleTrait = std::true_type;
226};
227
228// Note:
229// For motion or map clauses the OpenMP spec allows a unique mapper modifier.
230// In practice, since these clauses apply to multiple objects, there can be
231// multiple effective mappers applicable to these objects (due to overloads,
232// etc.). Because of that store a list of mappers every time a mapper modifier
233// is allowed. If the mapper list contains a single element, it applies to
234// all objects in the clause, otherwise there should be as many mappers as
235// there are objects.
236// V5.2: [5.8.2] Mapper identifiers and `mapper` modifiers
237template <typename I, typename E> //
238struct MapperT {
240 using WrapperTrait = std::true_type;
242};
243
244// V5.2: [15.8.1] `memory-order` clauses
245// When used as arguments for other clauses, e.g. `fail`.
246ENUM(MemoryOrder, AcqRel, Acquire, Relaxed, Release, SeqCst);
247ENUM(MotionExpectation, Present);
248// Union of `dependence-type` and `task-depenence-type`.
249// V5.2: [15.9.1] `task-dependence-type` modifier
250ENUM(DependenceType, Depobj, In, Inout, Inoutset, Mutexinoutset, Out, Sink,
251 Source);
252ENUM(Prescriptiveness, Strict);
253
254template <typename I, typename E> //
256 struct Distance {
257 using TupleTrait = std::true_type;
258 std::tuple<DefinedOperatorT<I, E>, E> t;
259 };
260 using TupleTrait = std::true_type;
261 std::tuple<ObjectT<I, E>, OPT(Distance)> t;
262};
263
264template <typename I, typename E> //
266 using WrapperTrait = std::true_type;
268};
269
270// Note:
271// For reduction clauses the OpenMP spec allows a unique reduction identifier.
272// For reasons analogous to those listed for the MapperT type, clauses that
273// according to the spec contain a reduction identifier will contain a list of
274// reduction identifiers. The same constraints apply: there is either a single
275// identifier that applies to all objects, or there are as many identifiers
276// as there are objects.
277template <typename I, typename E> //
279 using UnionTrait = std::true_type;
280 std::variant<DefinedOperatorT<I, E>, ProcedureDesignatorT<I, E>> u;
281};
282
283template <typename T, typename I, typename E> //
285
286template <typename T>
287std::enable_if_t<T::EmptyTrait::value, bool> operator==(const T &a,
288 const T &b) {
289 return true;
290}
291template <typename T>
292std::enable_if_t<T::IncompleteTrait::value, bool> operator==(const T &a,
293 const T &b) {
294 return true;
295}
296template <typename T>
297std::enable_if_t<T::WrapperTrait::value, bool> operator==(const T &a,
298 const T &b) {
299 return a.v == b.v;
300}
301template <typename T>
302std::enable_if_t<T::TupleTrait::value, bool> operator==(const T &a,
303 const T &b) {
304 return a.t == b.t;
305}
306template <typename T>
307std::enable_if_t<T::UnionTrait::value, bool> operator==(const T &a,
308 const T &b) {
309 return a.u == b.u;
310}
311} // namespace type
312
313template <typename T> using ListT = type::ListT<T>;
314
315template <typename I, typename E> using ObjectT = type::ObjectT<I, E>;
316template <typename I, typename E> using ObjectListT = type::ObjectListT<I, E>;
317
318template <typename T, typename I, typename E>
320
321template <
322 typename ContainerTy, typename FunctionTy,
323 typename ElemTy = typename llvm::remove_cvref_t<ContainerTy>::value_type,
324 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
325ListT<ResultTy> makeList(ContainerTy &&container, FunctionTy &&func) {
327 llvm::transform(container, std::back_inserter(v), func);
328 return v;
329}
330
331namespace clause {
332using type::operator==;
333
334// V5.2: [8.3.1] `assumption` clauses
335template <typename T, typename I, typename E> //
336struct AbsentT {
338 using WrapperTrait = std::true_type;
340};
341
342// V5.2: [15.8.1] `memory-order` clauses
343template <typename T, typename I, typename E> //
344struct AcqRelT {
345 using EmptyTrait = std::true_type;
346};
347
348// V5.2: [15.8.1] `memory-order` clauses
349template <typename T, typename I, typename E> //
350struct AcquireT {
351 using EmptyTrait = std::true_type;
352};
353
354// V5.2: [7.5.2] `adjust_args` clause
355template <typename T, typename I, typename E> //
357 using IncompleteTrait = std::true_type;
358};
359
360// V5.2: [12.5.1] `affinity` clause
361template <typename T, typename I, typename E> //
362struct AffinityT {
365
366 using TupleTrait = std::true_type;
367 std::tuple<OPT(Iterator), LocatorList> t;
368};
369
370// V5.2: [6.3] `align` clause
371template <typename T, typename I, typename E> //
372struct AlignT {
373 using Alignment = E;
374
375 using WrapperTrait = std::true_type;
377};
378
379// V5.2: [5.11] `aligned` clause
380template <typename T, typename I, typename E> //
381struct AlignedT {
382 using Alignment = E;
384
385 using TupleTrait = std::true_type;
386 std::tuple<OPT(Alignment), List> t;
387};
388
389template <typename T, typename I, typename E> //
390struct AllocatorT;
391
392// V5.2: [6.6] `allocate` clause
393template <typename T, typename I, typename E> //
394struct AllocateT {
395 // AllocatorSimpleModifier is same as AllocatorComplexModifier.
399
400 using TupleTrait = std::true_type;
402};
403
404// V5.2: [6.4] `allocator` clause
405template <typename T, typename I, typename E> //
407 using Allocator = E;
408 using WrapperTrait = std::true_type;
410};
411
412// V5.2: [7.5.3] `append_args` clause
413template <typename T, typename I, typename E> //
415 using IncompleteTrait = std::true_type;
416};
417
418// [6.0:372-373]
419template <typename T, typename I, typename E> //
420struct ApplyT {
421 using IncompleteTrait = std::true_type;
422};
423
424// V5.2: [8.1] `at` clause
425template <typename T, typename I, typename E> //
426struct AtT {
427 ENUM(ActionTime, Compilation, Execution);
428 using WrapperTrait = std::true_type;
429 ActionTime v;
430};
431
432// V5.2: [8.2.1] `requirement` clauses
433template <typename T, typename I, typename E> //
435 using MemoryOrder = type::MemoryOrder;
436 using WrapperTrait = std::true_type;
437 MemoryOrder v; // Name not provided in spec
438};
439
440// V5.2: [11.7.1] `bind` clause
441template <typename T, typename I, typename E> //
442struct BindT {
443 ENUM(Binding, Teams, Parallel, Thread);
444 using WrapperTrait = std::true_type;
446};
447
448// V5.2: [15.8.3] `extended-atomic` clauses
449template <typename T, typename I, typename E> //
450struct CaptureT {
451 using EmptyTrait = std::true_type;
452};
453
454// V5.2: [4.4.3] `collapse` clause
455template <typename T, typename I, typename E> //
456struct CollapseT {
457 using N = E;
458 using WrapperTrait = std::true_type;
460};
461
462// [6.0:266]
463template <typename T, typename I, typename E> //
465 using IncompleteTrait = std::true_type;
466};
467
468// [6.0:262]
469template <typename T, typename I, typename E> //
470struct CombinerT {
472 using WrapperTrait = std::true_type;
474};
475
476// V5.2: [15.8.3] `extended-atomic` clauses
477template <typename T, typename I, typename E> //
478struct CompareT {
479 using EmptyTrait = std::true_type;
480};
481
482// V5.2: [8.3.1] `assumption` clauses
483template <typename T, typename I, typename E> //
484struct ContainsT {
486 using WrapperTrait = std::true_type;
488};
489
490// V5.2: [5.7.1] `copyin` clause
491template <typename T, typename I, typename E> //
492struct CopyinT {
494 using WrapperTrait = std::true_type;
496};
497
498// V5.2: [5.7.2] `copyprivate` clause
499template <typename T, typename I, typename E> //
502 using WrapperTrait = std::true_type;
504};
505
506// [6.0:378-379]
507template <typename T, typename I, typename E> //
508struct CountsT {
509 using IncompleteTrait = std::true_type;
510};
511
512// V5.2: [5.4.1] `default` clause
513template <typename T, typename I, typename E> //
514struct DefaultT {
515 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
516 using WrapperTrait = std::true_type;
517 DataSharingAttribute v;
518};
519
520// V5.2: [5.8.7] `defaultmap` clause
521template <typename T, typename I, typename E> //
523 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
524 Present);
525 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
526 using TupleTrait = std::true_type;
527 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
528};
529
530template <typename T, typename I, typename E> //
531struct DoacrossT;
532
533// V5.2: [15.9.5] `depend` clause
534template <typename T, typename I, typename E> //
535struct DependT {
538 using DependenceType = tomp::type::DependenceType;
539
540 struct TaskDep { // The form with task dependence type.
541 using TupleTrait = std::true_type;
542 // Empty LocatorList means "omp_all_memory".
544 };
545
547 using UnionTrait = std::true_type;
548 std::variant<Doacross, TaskDep> u; // Doacross form is legacy
549};
550
551// V5.2: [3.5] `destroy` clause
552template <typename T, typename I, typename E> //
553struct DestroyT {
555 using WrapperTrait = std::true_type;
556 // DestroyVar can be ommitted in "depobj destroy".
558};
559
560// V5.2: [12.5.2] `detach` clause
561template <typename T, typename I, typename E> //
562struct DetachT {
564 using WrapperTrait = std::true_type;
566};
567
568// V5.2: [13.2] `device` clause
569template <typename T, typename I, typename E> //
570struct DeviceT {
572 ENUM(DeviceModifier, Ancestor, DeviceNum);
573 using TupleTrait = std::true_type;
574 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
575};
576
577// [6.0:362]
578template <typename T, typename I, typename E> //
580 using Requires = E;
581 using WrapperTrait = std::true_type;
583};
584
585// V5.2: [13.1] `device_type` clause
586template <typename T, typename I, typename E> //
588 ENUM(DeviceTypeDescription, Any, Host, Nohost);
589 using WrapperTrait = std::true_type;
590 DeviceTypeDescription v;
591};
592
593// V5.2: [11.6.1] `dist_schedule` clause
594template <typename T, typename I, typename E> //
596 ENUM(Kind, Static);
597 using ChunkSize = E;
598 using TupleTrait = std::true_type;
599 std::tuple<Kind, OPT(ChunkSize)> t;
600};
601
602// V5.2: [15.9.6] `doacross` clause
603template <typename T, typename I, typename E> //
604struct DoacrossT {
606 using DependenceType = tomp::type::DependenceType;
607 using TupleTrait = std::true_type;
608 // Empty Vector means "omp_cur_iteration"
609 std::tuple<DependenceType, Vector> t;
610};
611
612// V5.2: [8.2.1] `requirement` clauses
613template <typename T, typename I, typename E> //
615 using Requires = E;
616 using WrapperTrait = std::true_type;
618};
619
620template <typename T, typename I, typename E> //
622 ENUM(AccessGroup, Cgroup);
623 ENUM(Fallback, Abort, Default_Mem, Null);
624 using Size = E;
625 using TupleTrait = std::true_type;
626 std::tuple<OPT(AccessGroup), OPT(Fallback), Size> t;
627};
628
629// V5.2: [5.8.4] `enter` clause
630template <typename T, typename I, typename E> //
631struct EnterT {
633 ENUM(Modifier, Automap);
634 using TupleTrait = std::true_type;
635 std::tuple<OPT(Modifier), List> t;
636};
637
638// V5.2: [5.6.2] `exclusive` clause
639template <typename T, typename I, typename E> //
641 using WrapperTrait = std::true_type;
644};
645
646// V5.2: [15.8.3] `extended-atomic` clauses
647template <typename T, typename I, typename E> //
648struct FailT {
649 using MemoryOrder = type::MemoryOrder;
650 using WrapperTrait = std::true_type;
652};
653
654// V5.2: [10.5.1] `filter` clause
655template <typename T, typename I, typename E> //
656struct FilterT {
657 using ThreadNum = E;
658 using WrapperTrait = std::true_type;
660};
661
662// V5.2: [12.3] `final` clause
663template <typename T, typename I, typename E> //
664struct FinalT {
665 using Finalize = E;
666 using WrapperTrait = std::true_type;
668};
669
670// V5.2: [5.4.4] `firstprivate` clause
671template <typename T, typename I, typename E> //
674 using WrapperTrait = std::true_type;
676};
677
678// V5.2: [5.9.2] `from` clause
679template <typename T, typename I, typename E> //
680struct FromT {
682 using Expectation = type::MotionExpectation;
684 // See note at the definition of the MapperT type.
685 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
686
687 using TupleTrait = std::true_type;
689};
690
691// V5.2: [9.2.1] `full` clause
692template <typename T, typename I, typename E> //
693struct FullT {
694 using EmptyTrait = std::true_type;
695};
696
697// V5.2: [12.6.1] `grainsize` clause
698template <typename T, typename I, typename E> //
700 using Prescriptiveness = type::Prescriptiveness;
701 using GrainSize = E;
702 using TupleTrait = std::true_type;
704};
705
706// [6.0:438] `graph_id` clause
707template <typename T, typename I, typename E> //
708struct GraphIdT {
709 using IncompleteTrait = std::true_type;
710};
711
712// [6.0:438] `graph_reset` clause
713template <typename T, typename I, typename E> //
715 using IncompleteTrait = std::true_type;
716};
717
718// V5.2: [5.4.9] `has_device_addr` clause
719template <typename T, typename I, typename E> //
722 using WrapperTrait = std::true_type;
724};
725
726// V5.2: [15.1.2] `hint` clause
727template <typename T, typename I, typename E> //
728struct HintT {
729 using HintExpr = E;
730 using WrapperTrait = std::true_type;
732};
733
734// V5.2: [8.3.1] Assumption clauses
735template <typename T, typename I, typename E> //
736struct HoldsT {
737 using WrapperTrait = std::true_type;
738 E v; // No argument name in spec 5.2
739};
740
741// V5.2: [3.4] `if` clause
742template <typename T, typename I, typename E> //
743struct IfT {
746 using TupleTrait = std::true_type;
748};
749
750// V5.2: [7.7.1] `branch` clauses
751template <typename T, typename I, typename E> //
752struct InbranchT {
753 using EmptyTrait = std::true_type;
754};
755
756// V5.2: [5.6.1] `exclusive` clause
757template <typename T, typename I, typename E> //
760 using WrapperTrait = std::true_type;
762};
763
764// V5.2: [7.8.3] `indirect` clause
765template <typename T, typename I, typename E> //
766struct IndirectT {
768 using WrapperTrait = std::true_type;
770};
771
772// [6.0:257-261]
773template <typename T, typename I, typename E> //
775 using IncompleteTrait = std::true_type;
776};
777
778// [6.0:265-266]
779template <typename T, typename I, typename E> //
780struct InductorT {
781 using IncompleteTrait = std::true_type;
782};
783
784// V5.2: [14.1.2] `init` clause
785template <typename T, typename I, typename E> //
786struct InitT {
790 ENUM(InteropType, Target, Targetsync); // Repeatable
791 using InteropTypes = ListT<InteropType>; // Not a spec name
792
793 using TupleTrait = std::true_type;
795};
796
797// [6.0:270]
798template <typename T, typename I, typename E> //
800 using IncompleteTrait = std::true_type;
801};
802
803// V5.2: [5.5.4] `initializer` clause
804template <typename T, typename I, typename E> //
807 using WrapperTrait = std::true_type;
809};
810
811// V5.2: [5.5.10] `in_reduction` clause
812template <typename T, typename I, typename E> //
815 // See note at the definition of the ReductionIdentifierT type.
816 // The name ReductionIdentifiers is not a spec name.
818 using TupleTrait = std::true_type;
819 std::tuple<ReductionIdentifiers, List> t;
820};
821
822// [6.0:339-340]
823template <typename T, typename I, typename E> //
824struct InteropT {
825 using IncompleteTrait = std::true_type;
826};
827
828// V5.2: [5.4.7] `is_device_ptr` clause
829template <typename T, typename I, typename E> //
832 using WrapperTrait = std::true_type;
834};
835
836// V5.2: [5.4.5] `lastprivate` clause
837template <typename T, typename I, typename E> //
840 ENUM(LastprivateModifier, Conditional);
841 using TupleTrait = std::true_type;
842 std::tuple<OPT(LastprivateModifier), List> t;
843};
844
845// V5.2: [5.4.6] `linear` clause
846template <typename T, typename I, typename E> //
847struct LinearT {
848 // std::get<type> won't work here due to duplicate types in the tuple.
850 // StepSimpleModifier is same as StepComplexModifier.
852 ENUM(LinearModifier, Ref, Val, Uval);
853
854 using TupleTrait = std::true_type;
855 // Step == nullopt means 1.
856 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
857};
858
859// V5.2: [5.8.5] `link` clause
860template <typename T, typename I, typename E> //
861struct LinkT {
863 using WrapperTrait = std::true_type;
865};
866
867// [6.0:303]
868template <typename T, typename I, typename E> //
869struct LocalT {
870 using IncompleteTrait = std::true_type;
871};
872
873// V6: [6.4.7] Looprange clause
874template <typename T, typename I, typename E> //
876 using Begin = E;
877 using End = E;
878
879 using TupleTrait = std::true_type;
880 std::tuple<Begin, End> t;
881};
882
883// V5.2: [5.8.3] `map` clause
884template <typename T, typename I, typename E> //
885struct MapT {
887 ENUM(MapType, To, From, Tofrom, Storage);
888 ENUM(AttachModifier, Always, Auto, Never);
889 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
890 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
891 // See note at the definition of the MapperT type.
892 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
894 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
895
896 using TupleTrait = std::true_type;
897 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
898 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
900};
901
902// V5.2: [7.5.1] `match` clause
903template <typename T, typename I, typename E> //
904struct MatchT {
905 using IncompleteTrait = std::true_type;
906};
907
908// [6.0:493-494]
909template <typename T, typename I, typename E> //
910struct MemscopeT {
911 using IncompleteTrait = std::true_type;
912};
913
914// V5.2: [12.2] `mergeable` clause
915template <typename T, typename I, typename E> //
917 using EmptyTrait = std::true_type;
918};
919
920// V5.2: [8.5.2] `message` clause
921template <typename T, typename I, typename E> //
922struct MessageT {
923 using MsgString = E;
924 using WrapperTrait = std::true_type;
926};
927
928// V5.2: [7.6.2] `nocontext` clause
929template <typename T, typename I, typename E> //
932 using WrapperTrait = std::true_type;
934};
935
936// V5.2: [15.7] `nowait` clause
937template <typename T, typename I, typename E> //
938struct NogroupT {
939 using EmptyTrait = std::true_type;
940};
941
942// V5.2: [10.4.1] `nontemporal` clause
943template <typename T, typename I, typename E> //
946 using WrapperTrait = std::true_type;
948};
949
950// V5.2: [8.3.1] `assumption` clauses
951template <typename T, typename I, typename E> //
952struct NoOpenmpT {
953 using EmptyTrait = std::true_type;
954};
955
956// V6.0: [10.6.1] `assumption` clauses
957template <typename T, typename I, typename E> //
959 using EmptyTrait = std::true_type;
960};
961
962// V5.2: [8.3.1] `assumption` clauses
963template <typename T, typename I, typename E> //
965 using EmptyTrait = std::true_type;
966};
967
968// V5.2: [8.3.1] `assumption` clauses
969template <typename T, typename I, typename E> //
971 using EmptyTrait = std::true_type;
972};
973
974// V5.2: [7.7.1] `branch` clauses
975template <typename T, typename I, typename E> //
977 using EmptyTrait = std::true_type;
978};
979
980// V5.2: [7.6.1] `novariants` clause
981template <typename T, typename I, typename E> //
984 using WrapperTrait = std::true_type;
986};
987
988// V5.2: [15.6] `nowait` clause
989template <typename T, typename I, typename E> //
990struct NowaitT {
991 using EmptyTrait = std::true_type;
992};
993
994// V5.2: [12.6.2] `num_tasks` clause
995template <typename T, typename I, typename E> //
996struct NumTasksT {
997 using Prescriptiveness = type::Prescriptiveness;
998 using NumTasks = E;
999 using TupleTrait = std::true_type;
1001};
1002
1003// V5.2: [10.2.1] `num_teams` clause
1004template <typename T, typename I, typename E> //
1006 using LowerBound = E;
1007 using UpperBound = E;
1008
1009 // The name Range is not a spec name.
1010 struct Range {
1011 using TupleTrait = std::true_type;
1013 };
1014
1015 // The name List is not a spec name. The list is an extension to allow
1016 // specifying a grid with connection with the ompx_bare clause.
1018 using WrapperTrait = std::true_type;
1020};
1021
1022// V5.2: [10.1.2] `num_threads` clause
1023template <typename T, typename I, typename E> //
1025 using Nthreads = E;
1026 using WrapperTrait = std::true_type;
1028};
1029
1030template <typename T, typename I, typename E> //
1032 using EmptyTrait = std::true_type;
1033};
1034
1035template <typename T, typename I, typename E> //
1037 using EmptyTrait = std::true_type;
1038};
1039
1040template <typename T, typename I, typename E> //
1042 using WrapperTrait = std::true_type;
1044};
1045
1046// V5.2: [10.3] `order` clause
1047template <typename T, typename I, typename E> //
1048struct OrderT {
1049 ENUM(OrderModifier, Reproducible, Unconstrained);
1050 ENUM(Ordering, Concurrent);
1051 using TupleTrait = std::true_type;
1052 std::tuple<OPT(OrderModifier), Ordering> t;
1053};
1054
1055// V5.2: [4.4.4] `ordered` clause
1056template <typename T, typename I, typename E> //
1057struct OrderedT {
1058 using N = E;
1059 using WrapperTrait = std::true_type;
1060 OPT(N) v;
1061};
1062
1063// V5.2: [7.4.2] `otherwise` clause
1064template <typename T, typename I, typename E> //
1066 using IncompleteTrait = std::true_type;
1067};
1068
1069// V5.2: [9.2.2] `partial` clause
1070template <typename T, typename I, typename E> //
1071struct PartialT {
1073 using WrapperTrait = std::true_type;
1075};
1076
1077// V6.0: `permutation` clause
1078template <typename T, typename I, typename E> //
1081 using WrapperTrait = std::true_type;
1083};
1084
1085// V5.2: [12.4] `priority` clause
1086template <typename T, typename I, typename E> //
1089 using WrapperTrait = std::true_type;
1091};
1092
1093// V5.2: [5.4.3] `private` clause
1094template <typename T, typename I, typename E> //
1095struct PrivateT {
1097 using WrapperTrait = std::true_type;
1099};
1100
1101// V5.2: [10.1.4] `proc_bind` clause
1102template <typename T, typename I, typename E> //
1104 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1105 using WrapperTrait = std::true_type;
1106 AffinityPolicy v;
1107};
1108
1109// V5.2: [15.8.2] Atomic clauses
1110template <typename T, typename I, typename E> //
1111struct ReadT {
1112 using EmptyTrait = std::true_type;
1113};
1114
1115// V5.2: [5.5.8] `reduction` clause
1116template <typename T, typename I, typename E> //
1119 // See note at the definition of the ReductionIdentifierT type.
1120 // The name ReductionIdentifiers is not a spec name.
1122 ENUM(ReductionModifier, Default, Inscan, Task);
1123 using TupleTrait = std::true_type;
1124 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1125};
1126
1127// V5.2: [15.8.1] `memory-order` clauses
1128template <typename T, typename I, typename E> //
1129struct RelaxedT {
1130 using EmptyTrait = std::true_type;
1131};
1132
1133// V5.2: [15.8.1] `memory-order` clauses
1134template <typename T, typename I, typename E> //
1135struct ReleaseT {
1136 using EmptyTrait = std::true_type;
1137};
1138
1139// [6.0:440-441] `replayable` clause
1140template <typename T, typename I, typename E> //
1142 using IncompleteTrait = std::true_type;
1143};
1144
1145// V5.2: [8.2.1] `requirement` clauses
1146template <typename T, typename I, typename E> //
1148 using Requires = E;
1149 using WrapperTrait = std::true_type;
1151};
1152
1153// V5.2: [10.4.2] `safelen` clause
1154template <typename T, typename I, typename E> //
1155struct SafelenT {
1156 using Length = E;
1157 using WrapperTrait = std::true_type;
1159};
1160
1161// [6.0:393]
1162template <typename T, typename I, typename E> //
1164 using IncompleteTrait = std::true_type;
1165};
1166
1167// V5.2: [11.5.3] `schedule` clause
1168template <typename T, typename I, typename E> //
1170 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1171 using ChunkSize = E;
1172 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1173 ENUM(ChunkModifier, Simd);
1174 using TupleTrait = std::true_type;
1175 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1176};
1177
1178// [6.0:361]
1179template <typename T, typename I, typename E> //
1181 using Requires = E;
1182 using WrapperTrait = std::true_type;
1184};
1185
1186// V5.2: [15.8.1] Memory-order clauses
1187template <typename T, typename I, typename E> //
1188struct SeqCstT {
1189 using EmptyTrait = std::true_type;
1190};
1191
1192// V5.2: [8.5.1] `severity` clause
1193template <typename T, typename I, typename E> //
1195 ENUM(SevLevel, Fatal, Warning);
1196 using WrapperTrait = std::true_type;
1197 SevLevel v;
1198};
1199
1200// V5.2: [5.4.2] `shared` clause
1201template <typename T, typename I, typename E> //
1202struct SharedT {
1204 using WrapperTrait = std::true_type;
1206};
1207
1208// V5.2: [15.10.3] `parallelization-level` clauses
1209template <typename T, typename I, typename E> //
1210struct SimdT {
1211 using EmptyTrait = std::true_type;
1212};
1213
1214// V5.2: [10.4.3] `simdlen` clause
1215template <typename T, typename I, typename E> //
1216struct SimdlenT {
1217 using Length = E;
1218 using WrapperTrait = std::true_type;
1220};
1221
1222// V5.2: [9.1.1] `sizes` clause
1223template <typename T, typename I, typename E> //
1224struct SizesT {
1226 using WrapperTrait = std::true_type;
1228};
1229
1230// V5.2: [5.5.9] `task_reduction` clause
1231template <typename T, typename I, typename E> //
1234 // See note at the definition of the ReductionIdentifierT type.
1235 // The name ReductionIdentifiers is not a spec name.
1237 using TupleTrait = std::true_type;
1238 std::tuple<ReductionIdentifiers, List> t;
1239};
1240
1241// V5.2: [13.3] `thread_limit` clause
1242template <typename T, typename I, typename E> //
1244 using Threadlim = E;
1245 using WrapperTrait = std::true_type;
1247};
1248
1249// V5.2: [15.10.3] `parallelization-level` clauses
1250template <typename T, typename I, typename E> //
1251struct ThreadsT {
1252 using EmptyTrait = std::true_type;
1253};
1254
1255// V6.0: [14.8] `threadset` clause
1256template <typename T, typename I, typename E> //
1258 ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team);
1259 using WrapperTrait = std::true_type;
1260 ThreadsetPolicy v;
1261};
1262
1263// V5.2: [5.9.1] `to` clause
1264template <typename T, typename I, typename E> //
1265struct ToT {
1267 using Expectation = type::MotionExpectation;
1268 // See note at the definition of the MapperT type.
1269 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1271
1272 using TupleTrait = std::true_type;
1274};
1275
1276// [6.0:440-441] `transparent` clause
1277template <typename T, typename I, typename E> //
1279 using IncompleteTrait = std::true_type;
1280};
1281
1282// V5.2: [8.2.1] `requirement` clauses
1283template <typename T, typename I, typename E> //
1285 using Requires = E;
1286 using WrapperTrait = std::true_type;
1288};
1289
1290// V5.2: [8.2.1] `requirement` clauses
1291template <typename T, typename I, typename E> //
1293 using Requires = E;
1294 using WrapperTrait = std::true_type;
1296};
1297
1298// V5.2: [5.10] `uniform` clause
1299template <typename T, typename I, typename E> //
1300struct UniformT {
1302 using WrapperTrait = std::true_type;
1304};
1305
1306template <typename T, typename I, typename E> //
1307struct UnknownT {
1308 using EmptyTrait = std::true_type;
1309};
1310
1311// V5.2: [12.1] `untied` clause
1312template <typename T, typename I, typename E> //
1313struct UntiedT {
1314 using EmptyTrait = std::true_type;
1315};
1316
1317// Both of the following
1318// V5.2: [15.8.2] `atomic` clauses
1319// V5.2: [15.9.3] `update` clause
1320template <typename T, typename I, typename E> //
1321struct UpdateT {
1322 using DependenceType = tomp::type::DependenceType;
1323 using WrapperTrait = std::true_type;
1325};
1326
1327// V5.2: [14.1.3] `use` clause
1328template <typename T, typename I, typename E> //
1329struct UseT {
1331 using WrapperTrait = std::true_type;
1333};
1334
1335// V5.2: [5.4.10] `use_device_addr` clause
1336template <typename T, typename I, typename E> //
1339 using WrapperTrait = std::true_type;
1341};
1342
1343// V5.2: [5.4.8] `use_device_ptr` clause
1344template <typename T, typename I, typename E> //
1347 using WrapperTrait = std::true_type;
1349};
1350
1351// V5.2: [6.8] `uses_allocators` clause
1352template <typename T, typename I, typename E> //
1354 using MemSpace = E;
1356 using Allocator = E;
1357 struct AllocatorSpec { // Not a spec name
1358 using TupleTrait = std::true_type;
1360 };
1361 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1362 using WrapperTrait = std::true_type;
1364};
1365
1366// V5.2: [15.8.3] `extended-atomic` clauses
1367template <typename T, typename I, typename E> //
1368struct WeakT {
1369 using EmptyTrait = std::true_type;
1370};
1371
1372// V5.2: [7.4.1] `when` clause
1373template <typename T, typename I, typename E> //
1374struct WhenT {
1375 using IncompleteTrait = std::true_type;
1376};
1377
1378// V5.2: [15.8.2] Atomic clauses
1379template <typename T, typename I, typename E> //
1380struct WriteT {
1381 using EmptyTrait = std::true_type;
1382};
1383
1384// ---
1385
1386template <typename T, typename I, typename E>
1388 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1390
1391template <typename T, typename I, typename E>
1392using EmptyClausesT = std::variant<
1400
1401template <typename T, typename I, typename E>
1403 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, ApplyT<T, I, E>,
1410
1411template <typename T, typename I, typename E>
1413 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1421
1422template <typename T, typename I, typename E>
1423using UnionClausesT = std::variant<DependT<T, I, E>>;
1424
1425template <typename T, typename I, typename E>
1426using WrapperClausesT = std::variant<
1446
1447template <typename T, typename I, typename E>
1455 >::type;
1456} // namespace clause
1457
1458using type::operator==;
1459
1460// The variant wrapper that encapsulates all possible specific clauses.
1461// The `Extras` arguments are additional types representing local extensions
1462// to the clause set, e.g.
1463//
1464// using Clause = ClauseT<Type, Id, Expr,
1465// MyClause1, MyClause2>;
1466//
1467// The member Clause::u will be a variant containing all specific clauses
1468// defined above, plus MyClause1 and MyClause2.
1469//
1470// Note: Any derived class must be constructible from the base class
1471// ClauseT<...>.
1472template <typename TypeType, typename IdType, typename ExprType,
1473 typename... Extras>
1474struct ClauseT {
1475 using TypeTy = TypeType;
1476 using IdTy = IdType;
1477 using ExprTy = ExprType;
1478
1479 // Type of "self" to specify this type given a derived class type.
1480 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1481
1482 using VariantTy = typename type::Union<
1484 std::variant<Extras...>>::type;
1485
1486 llvm::omp::Clause id; // The numeric id of the clause
1487 using UnionTrait = std::true_type;
1489};
1490
1491template <typename ClauseType> struct DirectiveWithClauses {
1492 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1494};
1495
1496} // namespace tomp
1497
1498#undef OPT
1499#undef ENUM
1500
1501#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
AMDGPU Prepare AGPR Alloc
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define ENUM(Name,...)
Definition ClauseT.h:60
#define OPT(x)
Definition ClauseT.h:61
DXIL Resource Implicit Binding
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
@ Default
#define T
This file contains some templates that are useful if you are working with the STL at all.
This file defines the SmallVector class.
@ None
static constexpr int Concat[]
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
constexpr bool is_variant_v
Definition ClauseT.h:121
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
Definition STLExtras.h:2016
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:870
typename type::Union< EmptyClausesT< T, I, E >, ExtensionClausesT< T, I, E >, IncompleteClausesT< T, I, E >, TupleClausesT< T, I, E >, UnionClausesT< T, I, E >, WrapperClausesT< T, I, E > >::type UnionOfAllClausesT
Definition ClauseT.h:1448
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1387
std::variant< AbsentT< T, I, E >, AlignT< T, I, E >, AllocatorT< T, I, E >, AtomicDefaultMemOrderT< T, I, E >, AtT< T, I, E >, BindT< T, I, E >, CollapseT< T, I, E >, CombinerT< T, I, E >, ContainsT< T, I, E >, CopyinT< T, I, E >, CopyprivateT< T, I, E >, DefaultT< T, I, E >, DestroyT< T, I, E >, DetachT< T, I, E >, DeviceSafesyncT< T, I, E >, DeviceTypeT< T, I, E >, DynamicAllocatorsT< T, I, E >, EnterT< T, I, E >, ExclusiveT< T, I, E >, FailT< T, I, E >, FilterT< T, I, E >, FinalT< T, I, E >, FirstprivateT< T, I, E >, HasDeviceAddrT< T, I, E >, HintT< T, I, E >, HoldsT< T, I, E >, InclusiveT< T, I, E >, IndirectT< T, I, E >, InitializerT< T, I, E >, IsDevicePtrT< T, I, E >, LinkT< T, I, E >, MessageT< T, I, E >, NocontextT< T, I, E >, NontemporalT< T, I, E >, NovariantsT< T, I, E >, NumTeamsT< T, I, E >, NumThreadsT< T, I, E >, OrderedT< T, I, E >, PartialT< T, I, E >, PriorityT< T, I, E >, PrivateT< T, I, E >, ProcBindT< T, I, E >, ReverseOffloadT< T, I, E >, SafelenT< T, I, E >, SelfMapsT< T, I, E >, SeverityT< T, I, E >, SharedT< T, I, E >, SimdlenT< T, I, E >, SizesT< T, I, E >, PermutationT< T, I, E >, ThreadLimitT< T, I, E >, ThreadsetT< T, I, E >, UnifiedAddressT< T, I, E >, UnifiedSharedMemoryT< T, I, E >, UniformT< T, I, E >, UpdateT< T, I, E >, UseDeviceAddrT< T, I, E >, UseDevicePtrT< T, I, E >, UsesAllocatorsT< T, I, E > > WrapperClausesT
Definition ClauseT.h:1426
std::variant< AcqRelT< T, I, E >, AcquireT< T, I, E >, CaptureT< T, I, E >, CompareT< T, I, E >, FullT< T, I, E >, InbranchT< T, I, E >, MergeableT< T, I, E >, NogroupT< T, I, E >, NoOpenmpConstructsT< T, I, E >, NoOpenmpRoutinesT< T, I, E >, NoOpenmpT< T, I, E >, NoParallelismT< T, I, E >, NotinbranchT< T, I, E >, NowaitT< T, I, E >, ReadT< T, I, E >, RelaxedT< T, I, E >, ReleaseT< T, I, E >, SeqCstT< T, I, E >, SimdT< T, I, E >, ThreadsT< T, I, E >, UnknownT< T, I, E >, UntiedT< T, I, E >, UseT< T, I, E >, WeakT< T, I, E >, WriteT< T, I, E > > EmptyClausesT
Definition ClauseT.h:1392
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, ApplyT< T, I, E >, CollectorT< T, I, E >, CountsT< T, I, E >, GraphIdT< T, I, E >, GraphResetT< T, I, E >, InductionT< T, I, E >, InductorT< T, I, E >, InitCompleteT< T, I, E >, InteropT< T, I, E >, LocalT< T, I, E >, MatchT< T, I, E >, MemscopeT< T, I, E >, OtherwiseT< T, I, E >, ReplayableT< T, I, E >, SafesyncT< T, I, E >, TransparentT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition ClauseT.h:1402
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1423
std::variant< AffinityT< T, I, E >, AlignedT< T, I, E >, AllocateT< T, I, E >, DefaultmapT< T, I, E >, DeviceT< T, I, E >, DistScheduleT< T, I, E >, DoacrossT< T, I, E >, DynGroupprivateT< T, I, E >, FromT< T, I, E >, GrainsizeT< T, I, E >, IfT< T, I, E >, InitT< T, I, E >, InReductionT< T, I, E >, LastprivateT< T, I, E >, LinearT< T, I, E >, LooprangeT< T, I, E >, MapT< T, I, E >, NumTasksT< T, I, E >, OrderT< T, I, E >, ReductionT< T, I, E >, ScheduleT< T, I, E >, TaskReductionT< T, I, E >, ToT< T, I, E > > TupleClausesT
Definition ClauseT.h:1412
llvm::omp::Directive DirectiveName
Definition ClauseT.h:190
ListT< IteratorSpecifierT< T, I, E > > IteratorT
Definition ClauseT.h:284
bool operator==(const ObjectT< I, E > &o1, const ObjectT< I, E > &o2)
Definition ClauseT.h:184
ListT< ObjectT< I, E > > ObjectListT
Definition ClauseT.h:188
llvm::SmallVector< T, 0 > ListT
Definition ClauseT.h:150
type::ObjectListT< I, E > ObjectListT
Definition ClauseT.h:316
type::IteratorT< T, I, E > IteratorT
Definition ClauseT.h:319
type::ListT< T > ListT
Definition ClauseT.h:313
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
Definition ClauseT.h:325
type::ObjectT< I, E > ObjectT
Definition ClauseT.h:315
#define EQ(a, b)
Definition regexec.c:65
static constexpr bool value
Definition ClauseT.h:114
IdType IdTy
Definition ClauseT.h:1476
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1482
ExprType ExprTy
Definition ClauseT.h:1477
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1480
TypeType TypeTy
Definition ClauseT.h:1475
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1493
std::true_type WrapperTrait
Definition ClauseT.h:338
ListT< type::DirectiveName > List
Definition ClauseT.h:337
std::true_type EmptyTrait
Definition ClauseT.h:345
std::true_type EmptyTrait
Definition ClauseT.h:351
std::true_type IncompleteTrait
Definition ClauseT.h:357
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:363
std::tuple< OPT(Iterator), LocatorList > t
Definition ClauseT.h:367
std::true_type TupleTrait
Definition ClauseT.h:366
ObjectListT< I, E > LocatorList
Definition ClauseT.h:364
std::true_type WrapperTrait
Definition ClauseT.h:375
std::tuple< OPT(Alignment), List > t
Definition ClauseT.h:386
ObjectListT< I, E > List
Definition ClauseT.h:383
std::true_type TupleTrait
Definition ClauseT.h:385
std::true_type TupleTrait
Definition ClauseT.h:400
ObjectListT< I, E > List
Definition ClauseT.h:398
std::tuple< OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
Definition ClauseT.h:401
AllocatorT< T, I, E > AllocatorComplexModifier
Definition ClauseT.h:396
AlignT< T, I, E > AlignModifier
Definition ClauseT.h:397
std::true_type WrapperTrait
Definition ClauseT.h:408
std::true_type IncompleteTrait
Definition ClauseT.h:415
std::true_type IncompleteTrait
Definition ClauseT.h:421
ActionTime v
Definition ClauseT.h:429
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition ClauseT.h:428
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition ClauseT.h:444
std::true_type EmptyTrait
Definition ClauseT.h:451
std::true_type WrapperTrait
Definition ClauseT.h:458
std::true_type IncompleteTrait
Definition ClauseT.h:465
std::true_type WrapperTrait
Definition ClauseT.h:472
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:471
std::true_type EmptyTrait
Definition ClauseT.h:479
ListT< type::DirectiveName > List
Definition ClauseT.h:485
std::true_type WrapperTrait
Definition ClauseT.h:486
std::true_type WrapperTrait
Definition ClauseT.h:494
ObjectListT< I, E > List
Definition ClauseT.h:493
ObjectListT< I, E > List
Definition ClauseT.h:501
std::true_type WrapperTrait
Definition ClauseT.h:502
std::true_type IncompleteTrait
Definition ClauseT.h:509
DataSharingAttribute v
Definition ClauseT.h:517
std::true_type WrapperTrait
Definition ClauseT.h:516
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
Definition ClauseT.h:527
std::true_type TupleTrait
Definition ClauseT.h:526
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
Definition ClauseT.h:543
tomp::type::DependenceType DependenceType
Definition ClauseT.h:538
DoacrossT< T, I, E > Doacross
Definition ClauseT.h:546
std::true_type UnionTrait
Definition ClauseT.h:547
ObjectListT< I, E > LocatorList
Definition ClauseT.h:537
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:536
std::variant< Doacross, TaskDep > u
Definition ClauseT.h:548
std::true_type WrapperTrait
Definition ClauseT.h:555
ObjectT< I, E > DestroyVar
Definition ClauseT.h:554
ObjectT< I, E > EventHandle
Definition ClauseT.h:563
std::true_type WrapperTrait
Definition ClauseT.h:564
std::true_type WrapperTrait
Definition ClauseT.h:581
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:574
std::true_type TupleTrait
Definition ClauseT.h:573
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:590
std::true_type WrapperTrait
Definition ClauseT.h:589
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:599
std::true_type TupleTrait
Definition ClauseT.h:598
std::true_type TupleTrait
Definition ClauseT.h:607
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:605
tomp::type::DependenceType DependenceType
Definition ClauseT.h:606
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:609
ENUM(AccessGroup, Cgroup)
ENUM(Fallback, Abort, Default_Mem, Null)
std::tuple< OPT(AccessGroup), OPT(Fallback), Size > t
Definition ClauseT.h:626
std::true_type TupleTrait
Definition ClauseT.h:634
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:635
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:632
std::true_type WrapperTrait
Definition ClauseT.h:641
ObjectListT< I, E > List
Definition ClauseT.h:642
MemoryOrder v
Definition ClauseT.h:651
std::true_type WrapperTrait
Definition ClauseT.h:650
type::MemoryOrder MemoryOrder
Definition ClauseT.h:649
std::true_type WrapperTrait
Definition ClauseT.h:658
std::true_type WrapperTrait
Definition ClauseT.h:666
std::true_type WrapperTrait
Definition ClauseT.h:674
ObjectListT< I, E > List
Definition ClauseT.h:673
std::true_type TupleTrait
Definition ClauseT.h:687
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:683
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:688
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:685
type::MotionExpectation Expectation
Definition ClauseT.h:682
ObjectListT< I, E > LocatorList
Definition ClauseT.h:681
std::true_type EmptyTrait
Definition ClauseT.h:694
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:700
std::true_type TupleTrait
Definition ClauseT.h:702
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:703
std::true_type IncompleteTrait
Definition ClauseT.h:709
std::true_type IncompleteTrait
Definition ClauseT.h:715
ObjectListT< I, E > List
Definition ClauseT.h:721
std::true_type WrapperTrait
Definition ClauseT.h:722
std::true_type WrapperTrait
Definition ClauseT.h:730
std::true_type WrapperTrait
Definition ClauseT.h:737
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:747
std::true_type TupleTrait
Definition ClauseT.h:746
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:744
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:819
std::true_type TupleTrait
Definition ClauseT.h:818
ObjectListT< I, E > List
Definition ClauseT.h:814
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:817
std::true_type EmptyTrait
Definition ClauseT.h:753
std::true_type WrapperTrait
Definition ClauseT.h:760
ObjectListT< I, E > List
Definition ClauseT.h:759
std::true_type WrapperTrait
Definition ClauseT.h:768
OPT(InvokedByFptr) v
std::true_type IncompleteTrait
Definition ClauseT.h:775
std::true_type IncompleteTrait
Definition ClauseT.h:781
std::true_type IncompleteTrait
Definition ClauseT.h:800
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:789
ObjectT< I, E > InteropVar
Definition ClauseT.h:788
ListT< InteropType > InteropTypes
Definition ClauseT.h:791
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:794
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:793
std::true_type WrapperTrait
Definition ClauseT.h:807
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:806
std::true_type IncompleteTrait
Definition ClauseT.h:825
ObjectListT< I, E > List
Definition ClauseT.h:831
std::true_type WrapperTrait
Definition ClauseT.h:832
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:842
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:841
ObjectListT< I, E > List
Definition ClauseT.h:839
std::true_type TupleTrait
Definition ClauseT.h:854
ObjectListT< I, E > List
Definition ClauseT.h:849
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:856
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:863
ObjectListT< I, E > List
Definition ClauseT.h:862
std::true_type IncompleteTrait
Definition ClauseT.h:870
std::tuple< Begin, End > t
Definition ClauseT.h:880
std::true_type TupleTrait
Definition ClauseT.h:879
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:892
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:899
ObjectListT< I, E > LocatorList
Definition ClauseT.h:886
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:893
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:894
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:896
std::true_type IncompleteTrait
Definition ClauseT.h:905
std::true_type IncompleteTrait
Definition ClauseT.h:911
std::true_type EmptyTrait
Definition ClauseT.h:917
std::true_type WrapperTrait
Definition ClauseT.h:924
std::true_type EmptyTrait
Definition ClauseT.h:953
std::true_type EmptyTrait
Definition ClauseT.h:971
std::true_type WrapperTrait
Definition ClauseT.h:932
DoNotUpdateContext v
Definition ClauseT.h:933
std::true_type EmptyTrait
Definition ClauseT.h:939
ObjectListT< I, E > List
Definition ClauseT.h:945
std::true_type WrapperTrait
Definition ClauseT.h:946
std::true_type EmptyTrait
Definition ClauseT.h:977
std::true_type WrapperTrait
Definition ClauseT.h:984
DoNotUseVariant v
Definition ClauseT.h:985
std::true_type EmptyTrait
Definition ClauseT.h:991
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:1000
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:997
std::true_type TupleTrait
Definition ClauseT.h:999
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:1012
std::true_type WrapperTrait
Definition ClauseT.h:1018
ListT< Range > List
Definition ClauseT.h:1017
std::true_type WrapperTrait
Definition ClauseT.h:1026
std::true_type EmptyTrait
Definition ClauseT.h:1032
std::true_type EmptyTrait
Definition ClauseT.h:1037
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:1052
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:1051
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:1059
std::true_type IncompleteTrait
Definition ClauseT.h:1066
std::true_type WrapperTrait
Definition ClauseT.h:1073
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1081
std::true_type WrapperTrait
Definition ClauseT.h:1089
std::true_type WrapperTrait
Definition ClauseT.h:1097
ObjectListT< I, E > List
Definition ClauseT.h:1096
AffinityPolicy v
Definition ClauseT.h:1106
std::true_type WrapperTrait
Definition ClauseT.h:1105
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1112
std::true_type TupleTrait
Definition ClauseT.h:1123
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1124
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1118
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1121
std::true_type EmptyTrait
Definition ClauseT.h:1130
std::true_type EmptyTrait
Definition ClauseT.h:1136
std::true_type IncompleteTrait
Definition ClauseT.h:1142
std::true_type WrapperTrait
Definition ClauseT.h:1149
std::true_type WrapperTrait
Definition ClauseT.h:1157
std::true_type IncompleteTrait
Definition ClauseT.h:1164
std::true_type TupleTrait
Definition ClauseT.h:1174
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1175
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1182
std::true_type EmptyTrait
Definition ClauseT.h:1189
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1196
std::true_type WrapperTrait
Definition ClauseT.h:1204
ObjectListT< I, E > List
Definition ClauseT.h:1203
std::true_type EmptyTrait
Definition ClauseT.h:1211
std::true_type WrapperTrait
Definition ClauseT.h:1218
ListT< E > SizeList
Definition ClauseT.h:1225
std::true_type WrapperTrait
Definition ClauseT.h:1226
ObjectListT< I, E > List
Definition ClauseT.h:1233
std::true_type TupleTrait
Definition ClauseT.h:1237
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1236
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1238
std::true_type WrapperTrait
Definition ClauseT.h:1245
std::true_type EmptyTrait
Definition ClauseT.h:1252
ThreadsetPolicy v
Definition ClauseT.h:1260
std::true_type WrapperTrait
Definition ClauseT.h:1259
ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team)
std::true_type TupleTrait
Definition ClauseT.h:1272
type::MotionExpectation Expectation
Definition ClauseT.h:1267
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1273
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1270
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1266
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1269
std::true_type IncompleteTrait
Definition ClauseT.h:1279
std::true_type WrapperTrait
Definition ClauseT.h:1286
std::true_type WrapperTrait
Definition ClauseT.h:1302
ParameterList v
Definition ClauseT.h:1303
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1301
std::true_type EmptyTrait
Definition ClauseT.h:1308
std::true_type EmptyTrait
Definition ClauseT.h:1314
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1323
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1322
std::true_type WrapperTrait
Definition ClauseT.h:1339
ObjectListT< I, E > List
Definition ClauseT.h:1338
ObjectListT< I, E > List
Definition ClauseT.h:1346
std::true_type WrapperTrait
Definition ClauseT.h:1347
ObjectT< I, E > InteropVar
Definition ClauseT.h:1330
std::true_type WrapperTrait
Definition ClauseT.h:1331
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1359
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1361
std::true_type WrapperTrait
Definition ClauseT.h:1362
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1355
std::true_type EmptyTrait
Definition ClauseT.h:1369
std::true_type IncompleteTrait
Definition ClauseT.h:1375
std::true_type EmptyTrait
Definition ClauseT.h:1381
std::true_type UnionTrait
Definition ClauseT.h:208
std::variant< DefinedOpName, IntrinsicOperator > u
Definition ClauseT.h:209
ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT, LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max)
std::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
Definition ClauseT.h:225
std::tuple< DefinedOperatorT< I, E >, E > t
Definition ClauseT.h:258
std::tuple< ObjectT< I, E >, OPT(Distance)> t
Definition ClauseT.h:261
std::true_type TupleTrait
Definition ClauseT.h:260
MapperIdentifier v
Definition ClauseT.h:241
ObjectT< I, E > MapperIdentifier
Definition ClauseT.h:239
std::true_type WrapperTrait
Definition ClauseT.h:240
std::true_type TupleTrait
Definition ClauseT.h:216
std::tuple< E, E, OPT(E)> t
Definition ClauseT.h:217
std::variant< DefinedOperatorT< I, E >, ProcedureDesignatorT< I, E > > u
Definition ClauseT.h:280
ObjectListT< I, E > Variables
Definition ClauseT.h:194
std::true_type TupleTrait
Definition ClauseT.h:196
std::tuple< Variables, Instance > t
Definition ClauseT.h:197
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type
Definition ClauseT.h:146
std::variant<> type
Definition ClauseT.h:141