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