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// V5.2: [3.5] `destroy` clause
543template <typename T, typename I, typename E> //
544struct DestroyT {
546 using WrapperTrait = std::true_type;
547 // DestroyVar can be ommitted in "depobj destroy".
549};
550
551// V5.2: [12.5.2] `detach` clause
552template <typename T, typename I, typename E> //
553struct DetachT {
555 using WrapperTrait = std::true_type;
557};
558
559// V5.2: [13.2] `device` clause
560template <typename T, typename I, typename E> //
561struct DeviceT {
563 ENUM(DeviceModifier, Ancestor, DeviceNum);
564 using TupleTrait = std::true_type;
565 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
566};
567
568// [6.0:362]
569template <typename T, typename I, typename E> //
571 using Requires = E;
572 using WrapperTrait = std::true_type;
574};
575
576// V5.2: [13.1] `device_type` clause
577template <typename T, typename I, typename E> //
579 ENUM(DeviceTypeDescription, Any, Host, Nohost);
580 using WrapperTrait = std::true_type;
581 DeviceTypeDescription v;
582};
583
584// V5.2: [11.6.1] `dist_schedule` clause
585template <typename T, typename I, typename E> //
587 ENUM(Kind, Static);
588 using ChunkSize = E;
589 using TupleTrait = std::true_type;
590 std::tuple<Kind, OPT(ChunkSize)> t;
591};
592
593// V5.2: [15.9.6] `doacross` clause
594template <typename T, typename I, typename E> //
595struct DoacrossT {
597 using DependenceType = tomp::type::DependenceType;
598 using TupleTrait = std::true_type;
599 // Empty Vector means "omp_cur_iteration"
600 std::tuple<DependenceType, Vector> t;
601};
602
603// V5.2: [8.2.1] `requirement` clauses
604template <typename T, typename I, typename E> //
606 using Requires = E;
607 using WrapperTrait = std::true_type;
609};
610
611template <typename T, typename I, typename E> //
613 ENUM(AccessGroup, Cgroup);
614 ENUM(Fallback, Abort, Default_Mem, Null);
615 using Size = E;
616 using TupleTrait = std::true_type;
617 std::tuple<OPT(AccessGroup), OPT(Fallback), Size> t;
618};
619
620// V5.2: [5.8.4] `enter` clause
621template <typename T, typename I, typename E> //
622struct EnterT {
624 ENUM(Modifier, Automap);
625 using TupleTrait = std::true_type;
626 std::tuple<OPT(Modifier), List> t;
627};
628
629// V5.2: [5.6.2] `exclusive` clause
630template <typename T, typename I, typename E> //
632 using WrapperTrait = std::true_type;
635};
636
637// V5.2: [15.8.3] `extended-atomic` clauses
638template <typename T, typename I, typename E> //
639struct FailT {
640 using MemoryOrder = type::MemoryOrder;
641 using WrapperTrait = std::true_type;
643};
644
645// V5.2: [10.5.1] `filter` clause
646template <typename T, typename I, typename E> //
647struct FilterT {
648 using ThreadNum = E;
649 using WrapperTrait = std::true_type;
651};
652
653// V5.2: [12.3] `final` clause
654template <typename T, typename I, typename E> //
655struct FinalT {
656 using Finalize = E;
657 using WrapperTrait = std::true_type;
659};
660
661// V5.2: [5.4.4] `firstprivate` clause
662template <typename T, typename I, typename E> //
665 using WrapperTrait = std::true_type;
667};
668
669// V5.2: [5.9.2] `from` clause
670template <typename T, typename I, typename E> //
671struct FromT {
673 using Expectation = type::MotionExpectation;
675 // See note at the definition of the MapperT type.
676 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
677
678 using TupleTrait = std::true_type;
680};
681
682// V5.2: [9.2.1] `full` clause
683template <typename T, typename I, typename E> //
684struct FullT {
685 using EmptyTrait = std::true_type;
686};
687
688// V5.2: [12.6.1] `grainsize` clause
689template <typename T, typename I, typename E> //
691 using Prescriptiveness = type::Prescriptiveness;
692 using GrainSize = E;
693 using TupleTrait = std::true_type;
695};
696
697// [6.0:438] `graph_id` clause
698template <typename T, typename I, typename E> //
699struct GraphIdT {
700 using IncompleteTrait = std::true_type;
701};
702
703// [6.0:438] `graph_reset` clause
704template <typename T, typename I, typename E> //
706 using IncompleteTrait = std::true_type;
707};
708
709// V5.2: [5.4.9] `has_device_addr` clause
710template <typename T, typename I, typename E> //
713 using WrapperTrait = std::true_type;
715};
716
717// V5.2: [15.1.2] `hint` clause
718template <typename T, typename I, typename E> //
719struct HintT {
720 using HintExpr = E;
721 using WrapperTrait = std::true_type;
723};
724
725// V5.2: [8.3.1] Assumption clauses
726template <typename T, typename I, typename E> //
727struct HoldsT {
728 using WrapperTrait = std::true_type;
729 E v; // No argument name in spec 5.2
730};
731
732// V5.2: [3.4] `if` clause
733template <typename T, typename I, typename E> //
734struct IfT {
737 using TupleTrait = std::true_type;
739};
740
741// V5.2: [7.7.1] `branch` clauses
742template <typename T, typename I, typename E> //
743struct InbranchT {
744 using EmptyTrait = std::true_type;
745};
746
747// V5.2: [5.6.1] `exclusive` clause
748template <typename T, typename I, typename E> //
751 using WrapperTrait = std::true_type;
753};
754
755// V5.2: [7.8.3] `indirect` clause
756template <typename T, typename I, typename E> //
757struct IndirectT {
759 using WrapperTrait = std::true_type;
761};
762
763// [6.0:257-261]
764template <typename T, typename I, typename E> //
766 using IncompleteTrait = std::true_type;
767};
768
769// [6.0:265-266]
770template <typename T, typename I, typename E> //
771struct InductorT {
772 using IncompleteTrait = std::true_type;
773};
774
775// V5.2: [14.1.2] `init` clause
776template <typename T, typename I, typename E> //
777struct InitT {
781 ENUM(InteropType, Target, Targetsync); // Repeatable
782 using InteropTypes = ListT<InteropType>; // Not a spec name
783
784 using TupleTrait = std::true_type;
786};
787
788// [6.0:270]
789template <typename T, typename I, typename E> //
791 using IncompleteTrait = std::true_type;
792};
793
794// V5.2: [5.5.4] `initializer` clause
795template <typename T, typename I, typename E> //
798 using WrapperTrait = std::true_type;
800};
801
802// V5.2: [5.5.10] `in_reduction` clause
803template <typename T, typename I, typename E> //
806 // See note at the definition of the ReductionIdentifierT type.
807 // The name ReductionIdentifiers is not a spec name.
809 using TupleTrait = std::true_type;
810 std::tuple<ReductionIdentifiers, List> t;
811};
812
813// [6.0:339-340]
814template <typename T, typename I, typename E> //
815struct InteropT {
816 using IncompleteTrait = std::true_type;
817};
818
819// V5.2: [5.4.7] `is_device_ptr` clause
820template <typename T, typename I, typename E> //
823 using WrapperTrait = std::true_type;
825};
826
827// V5.2: [5.4.5] `lastprivate` clause
828template <typename T, typename I, typename E> //
831 ENUM(LastprivateModifier, Conditional);
832 using TupleTrait = std::true_type;
833 std::tuple<OPT(LastprivateModifier), List> t;
834};
835
836// V5.2: [5.4.6] `linear` clause
837template <typename T, typename I, typename E> //
838struct LinearT {
839 // std::get<type> won't work here due to duplicate types in the tuple.
841 // StepSimpleModifier is same as StepComplexModifier.
843 ENUM(LinearModifier, Ref, Val, Uval);
844
845 using TupleTrait = std::true_type;
846 // Step == nullopt means 1.
847 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
848};
849
850// V5.2: [5.8.5] `link` clause
851template <typename T, typename I, typename E> //
852struct LinkT {
854 using WrapperTrait = std::true_type;
856};
857
858// [6.0:303]
859template <typename T, typename I, typename E> //
860struct LocalT {
861 using IncompleteTrait = std::true_type;
862};
863
864// V6: [6.4.7] Looprange clause
865template <typename T, typename I, typename E> //
867 using Begin = E;
868 using Count = E;
869
870 using TupleTrait = std::true_type;
871 std::tuple<Begin, Count> t;
872};
873
874// V5.2: [5.8.3] `map` clause
875template <typename T, typename I, typename E> //
876struct MapT {
878 ENUM(MapType, To, From, Tofrom, Storage);
879 ENUM(AttachModifier, Always, Auto, Never);
880 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
881 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
882 // See note at the definition of the MapperT type.
883 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
885 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
886
887 using TupleTrait = std::true_type;
888 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
889 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
891};
892
893// V5.2: [7.5.1] `match` clause
894template <typename T, typename I, typename E> //
895struct MatchT {
896 using IncompleteTrait = std::true_type;
897};
898
899// [6.0:493-494]
900template <typename T, typename I, typename E> //
901struct MemscopeT {
902 using IncompleteTrait = std::true_type;
903};
904
905// V5.2: [12.2] `mergeable` clause
906template <typename T, typename I, typename E> //
908 using EmptyTrait = std::true_type;
909};
910
911// V5.2: [8.5.2] `message` clause
912template <typename T, typename I, typename E> //
913struct MessageT {
914 using MsgString = E;
915 using WrapperTrait = std::true_type;
917};
918
919// V5.2: [7.6.2] `nocontext` clause
920template <typename T, typename I, typename E> //
923 using WrapperTrait = std::true_type;
925};
926
927// V5.2: [15.7] `nowait` clause
928template <typename T, typename I, typename E> //
929struct NogroupT {
930 using EmptyTrait = std::true_type;
931};
932
933// V5.2: [10.4.1] `nontemporal` clause
934template <typename T, typename I, typename E> //
937 using WrapperTrait = std::true_type;
939};
940
941// V5.2: [8.3.1] `assumption` clauses
942template <typename T, typename I, typename E> //
943struct NoOpenmpT {
944 using EmptyTrait = std::true_type;
945};
946
947// V6.0: [10.6.1] `assumption` clauses
948template <typename T, typename I, typename E> //
950 using EmptyTrait = std::true_type;
951};
952
953// V5.2: [8.3.1] `assumption` clauses
954template <typename T, typename I, typename E> //
956 using EmptyTrait = std::true_type;
957};
958
959// V5.2: [8.3.1] `assumption` clauses
960template <typename T, typename I, typename E> //
962 using EmptyTrait = std::true_type;
963};
964
965// V5.2: [7.7.1] `branch` clauses
966template <typename T, typename I, typename E> //
968 using EmptyTrait = std::true_type;
969};
970
971// V5.2: [7.6.1] `novariants` clause
972template <typename T, typename I, typename E> //
975 using WrapperTrait = std::true_type;
977};
978
979// V5.2: [15.6] `nowait` clause
980template <typename T, typename I, typename E> //
981struct NowaitT {
982 using EmptyTrait = std::true_type;
983};
984
985// V5.2: [12.6.2] `num_tasks` clause
986template <typename T, typename I, typename E> //
987struct NumTasksT {
988 using Prescriptiveness = type::Prescriptiveness;
989 using NumTasks = E;
990 using TupleTrait = std::true_type;
992};
993
994// V5.2: [10.2.1] `num_teams` clause
995template <typename T, typename I, typename E> //
996struct NumTeamsT {
997 using LowerBound = E;
998 using UpperBound = E;
999
1000 // The name Range is not a spec name.
1001 struct Range {
1002 using TupleTrait = std::true_type;
1004 };
1005
1006 // The name List is not a spec name. The list is an extension to allow
1007 // specifying a grid with connection with the ompx_bare clause.
1009 using WrapperTrait = std::true_type;
1011};
1012
1013// V5.2: [10.1.2] `num_threads` clause
1014template <typename T, typename I, typename E> //
1016 using Nthreads = E;
1017 using WrapperTrait = std::true_type;
1019};
1020
1021template <typename T, typename I, typename E> //
1023 using EmptyTrait = std::true_type;
1024};
1025
1026template <typename T, typename I, typename E> //
1028 using EmptyTrait = std::true_type;
1029};
1030
1031template <typename T, typename I, typename E> //
1033 using WrapperTrait = std::true_type;
1035};
1036
1037// V5.2: [10.3] `order` clause
1038template <typename T, typename I, typename E> //
1039struct OrderT {
1040 ENUM(OrderModifier, Reproducible, Unconstrained);
1041 ENUM(Ordering, Concurrent);
1042 using TupleTrait = std::true_type;
1043 std::tuple<OPT(OrderModifier), Ordering> t;
1044};
1045
1046// V5.2: [4.4.4] `ordered` clause
1047template <typename T, typename I, typename E> //
1048struct OrderedT {
1049 using N = E;
1050 using WrapperTrait = std::true_type;
1051 OPT(N) v;
1052};
1053
1054// V5.2: [7.4.2] `otherwise` clause
1055template <typename T, typename I, typename E> //
1057 using IncompleteTrait = std::true_type;
1058};
1059
1060// V5.2: [9.2.2] `partial` clause
1061template <typename T, typename I, typename E> //
1062struct PartialT {
1064 using WrapperTrait = std::true_type;
1066};
1067
1068// V6.0: `permutation` clause
1069template <typename T, typename I, typename E> //
1072 using WrapperTrait = std::true_type;
1074};
1075
1076// V5.2: [12.4] `priority` clause
1077template <typename T, typename I, typename E> //
1080 using WrapperTrait = std::true_type;
1082};
1083
1084// V5.2: [5.4.3] `private` clause
1085template <typename T, typename I, typename E> //
1086struct PrivateT {
1088 using WrapperTrait = std::true_type;
1090};
1091
1092// V5.2: [10.1.4] `proc_bind` clause
1093template <typename T, typename I, typename E> //
1095 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1096 using WrapperTrait = std::true_type;
1097 AffinityPolicy v;
1098};
1099
1100// V5.2: [15.8.2] Atomic clauses
1101template <typename T, typename I, typename E> //
1102struct ReadT {
1103 using EmptyTrait = std::true_type;
1104};
1105
1106// V5.2: [5.5.8] `reduction` clause
1107template <typename T, typename I, typename E> //
1110 // See note at the definition of the ReductionIdentifierT type.
1111 // The name ReductionIdentifiers is not a spec name.
1113 ENUM(ReductionModifier, Default, Inscan, Task);
1114 using TupleTrait = std::true_type;
1115 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1116};
1117
1118// V5.2: [15.8.1] `memory-order` clauses
1119template <typename T, typename I, typename E> //
1120struct RelaxedT {
1121 using EmptyTrait = std::true_type;
1122};
1123
1124// V5.2: [15.8.1] `memory-order` clauses
1125template <typename T, typename I, typename E> //
1126struct ReleaseT {
1127 using EmptyTrait = std::true_type;
1128};
1129
1130// [6.0:440-441] `replayable` clause
1131template <typename T, typename I, typename E> //
1133 using IncompleteTrait = std::true_type;
1134};
1135
1136// V5.2: [8.2.1] `requirement` clauses
1137template <typename T, typename I, typename E> //
1139 using Requires = E;
1140 using WrapperTrait = std::true_type;
1142};
1143
1144// V5.2: [10.4.2] `safelen` clause
1145template <typename T, typename I, typename E> //
1146struct SafelenT {
1147 using Length = E;
1148 using WrapperTrait = std::true_type;
1150};
1151
1152// [6.0:393]
1153template <typename T, typename I, typename E> //
1155 using IncompleteTrait = std::true_type;
1156};
1157
1158// V5.2: [11.5.3] `schedule` clause
1159template <typename T, typename I, typename E> //
1161 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1162 using ChunkSize = E;
1163 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1164 ENUM(ChunkModifier, Simd);
1165 using TupleTrait = std::true_type;
1166 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1167};
1168
1169// [6.0:361]
1170template <typename T, typename I, typename E> //
1172 using Requires = E;
1173 using WrapperTrait = std::true_type;
1175};
1176
1177// V5.2: [15.8.1] Memory-order clauses
1178template <typename T, typename I, typename E> //
1179struct SeqCstT {
1180 using EmptyTrait = std::true_type;
1181};
1182
1183// V5.2: [8.5.1] `severity` clause
1184template <typename T, typename I, typename E> //
1186 ENUM(SevLevel, Fatal, Warning);
1187 using WrapperTrait = std::true_type;
1188 SevLevel v;
1189};
1190
1191// V5.2: [5.4.2] `shared` clause
1192template <typename T, typename I, typename E> //
1193struct SharedT {
1195 using WrapperTrait = std::true_type;
1197};
1198
1199// V5.2: [15.10.3] `parallelization-level` clauses
1200template <typename T, typename I, typename E> //
1201struct SimdT {
1202 using EmptyTrait = std::true_type;
1203};
1204
1205// V5.2: [10.4.3] `simdlen` clause
1206template <typename T, typename I, typename E> //
1207struct SimdlenT {
1208 using Length = E;
1209 using WrapperTrait = std::true_type;
1211};
1212
1213// V5.2: [9.1.1] `sizes` clause
1214template <typename T, typename I, typename E> //
1215struct SizesT {
1217 using WrapperTrait = std::true_type;
1219};
1220
1221// V5.2: [5.5.9] `task_reduction` clause
1222template <typename T, typename I, typename E> //
1225 // See note at the definition of the ReductionIdentifierT type.
1226 // The name ReductionIdentifiers is not a spec name.
1228 using TupleTrait = std::true_type;
1229 std::tuple<ReductionIdentifiers, List> t;
1230};
1231
1232// V5.2: [13.3] `thread_limit` clause
1233template <typename T, typename I, typename E> //
1235 using Threadlim = E;
1236 using WrapperTrait = std::true_type;
1238};
1239
1240// V5.2: [15.10.3] `parallelization-level` clauses
1241template <typename T, typename I, typename E> //
1242struct ThreadsT {
1243 using EmptyTrait = std::true_type;
1244};
1245
1246// V6.0: [14.8] `threadset` clause
1247template <typename T, typename I, typename E> //
1249 ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team);
1250 using WrapperTrait = std::true_type;
1251 ThreadsetPolicy v;
1252};
1253
1254// V5.2: [5.9.1] `to` clause
1255template <typename T, typename I, typename E> //
1256struct ToT {
1258 using Expectation = type::MotionExpectation;
1259 // See note at the definition of the MapperT type.
1260 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1262
1263 using TupleTrait = std::true_type;
1265};
1266
1267// [6.0:440-441] `transparent` clause
1268template <typename T, typename I, typename E> //
1270 using IncompleteTrait = std::true_type;
1271};
1272
1273// V5.2: [8.2.1] `requirement` clauses
1274template <typename T, typename I, typename E> //
1276 using Requires = E;
1277 using WrapperTrait = std::true_type;
1279};
1280
1281// V5.2: [8.2.1] `requirement` clauses
1282template <typename T, typename I, typename E> //
1284 using Requires = E;
1285 using WrapperTrait = std::true_type;
1287};
1288
1289// V5.2: [5.10] `uniform` clause
1290template <typename T, typename I, typename E> //
1291struct UniformT {
1293 using WrapperTrait = std::true_type;
1295};
1296
1297template <typename T, typename I, typename E> //
1298struct UnknownT {
1299 using EmptyTrait = std::true_type;
1300};
1301
1302// V5.2: [12.1] `untied` clause
1303template <typename T, typename I, typename E> //
1304struct UntiedT {
1305 using EmptyTrait = std::true_type;
1306};
1307
1308// Both of the following
1309// V5.2: [15.8.2] `atomic` clauses
1310// V5.2: [15.9.3] `update` clause
1311template <typename T, typename I, typename E> //
1312struct UpdateT {
1313 using DependenceType = tomp::type::DependenceType;
1314 using WrapperTrait = std::true_type;
1316};
1317
1318// V5.2: [14.1.3] `use` clause
1319template <typename T, typename I, typename E> //
1320struct UseT {
1322 using WrapperTrait = std::true_type;
1324};
1325
1326// V5.2: [5.4.10] `use_device_addr` clause
1327template <typename T, typename I, typename E> //
1330 using WrapperTrait = std::true_type;
1332};
1333
1334// V5.2: [5.4.8] `use_device_ptr` clause
1335template <typename T, typename I, typename E> //
1338 using WrapperTrait = std::true_type;
1340};
1341
1342// V5.2: [6.8] `uses_allocators` clause
1343template <typename T, typename I, typename E> //
1345 using MemSpace = E;
1347 using Allocator = E;
1348 struct AllocatorSpec { // Not a spec name
1349 using TupleTrait = std::true_type;
1351 };
1352 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1353 using WrapperTrait = std::true_type;
1355};
1356
1357// V5.2: [15.8.3] `extended-atomic` clauses
1358template <typename T, typename I, typename E> //
1359struct WeakT {
1360 using EmptyTrait = std::true_type;
1361};
1362
1363// V5.2: [7.4.1] `when` clause
1364template <typename T, typename I, typename E> //
1365struct WhenT {
1366 using IncompleteTrait = std::true_type;
1367};
1368
1369// V5.2: [15.8.2] Atomic clauses
1370template <typename T, typename I, typename E> //
1371struct WriteT {
1372 using EmptyTrait = std::true_type;
1373};
1374
1375// ---
1376
1377template <typename T, typename I, typename E>
1379 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1381
1382template <typename T, typename I, typename E>
1383using EmptyClausesT = std::variant<
1391
1392template <typename T, typename I, typename E>
1394 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, ApplyT<T, I, E>,
1401
1402template <typename T, typename I, typename E>
1404 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1412
1413template <typename T, typename I, typename E>
1414using UnionClausesT = std::variant<DependT<T, I, E>>;
1415
1416template <typename T, typename I, typename E>
1417using WrapperClausesT = std::variant<
1437
1438template <typename T, typename I, typename E>
1446 >::type;
1447} // namespace clause
1448
1449using type::operator==;
1450
1451// The variant wrapper that encapsulates all possible specific clauses.
1452// The `Extras` arguments are additional types representing local extensions
1453// to the clause set, e.g.
1454//
1455// using Clause = ClauseT<Type, Id, Expr,
1456// MyClause1, MyClause2>;
1457//
1458// The member Clause::u will be a variant containing all specific clauses
1459// defined above, plus MyClause1 and MyClause2.
1460//
1461// Note: Any derived class must be constructible from the base class
1462// ClauseT<...>.
1463template <typename TypeType, typename IdType, typename ExprType,
1464 typename... Extras>
1465struct ClauseT {
1466 using TypeTy = TypeType;
1467 using IdTy = IdType;
1468 using ExprTy = ExprType;
1469
1470 // Type of "self" to specify this type given a derived class type.
1471 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1472
1473 using VariantTy = typename type::Union<
1475 std::variant<Extras...>>::type;
1476
1477 llvm::omp::Clause id; // The numeric id of the clause
1478 using UnionTrait = std::true_type;
1480};
1481
1482template <typename ClauseType> struct DirectiveWithClauses {
1483 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1485};
1486
1487} // namespace tomp
1488
1489#undef OPT
1490#undef ENUM
1491
1492#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:1439
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1378
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:1417
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:1383
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:1393
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1414
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:1403
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:1467
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1473
ExprType ExprTy
Definition ClauseT.h:1468
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1471
TypeType TypeTy
Definition ClauseT.h:1466
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1484
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
ObjectT< I, E > DestroyVar
Definition ClauseT.h:545
ObjectT< I, E > EventHandle
Definition ClauseT.h:554
std::true_type WrapperTrait
Definition ClauseT.h:555
std::true_type WrapperTrait
Definition ClauseT.h:572
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:565
std::true_type TupleTrait
Definition ClauseT.h:564
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:581
std::true_type WrapperTrait
Definition ClauseT.h:580
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:590
std::true_type TupleTrait
Definition ClauseT.h:589
std::true_type TupleTrait
Definition ClauseT.h:598
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:596
tomp::type::DependenceType DependenceType
Definition ClauseT.h:597
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:600
ENUM(AccessGroup, Cgroup)
ENUM(Fallback, Abort, Default_Mem, Null)
std::tuple< OPT(AccessGroup), OPT(Fallback), Size > t
Definition ClauseT.h:617
std::true_type TupleTrait
Definition ClauseT.h:625
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:626
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:623
std::true_type WrapperTrait
Definition ClauseT.h:632
ObjectListT< I, E > List
Definition ClauseT.h:633
MemoryOrder v
Definition ClauseT.h:642
std::true_type WrapperTrait
Definition ClauseT.h:641
type::MemoryOrder MemoryOrder
Definition ClauseT.h:640
std::true_type WrapperTrait
Definition ClauseT.h:649
std::true_type WrapperTrait
Definition ClauseT.h:657
std::true_type WrapperTrait
Definition ClauseT.h:665
ObjectListT< I, E > List
Definition ClauseT.h:664
std::true_type TupleTrait
Definition ClauseT.h:678
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:674
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:679
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:676
type::MotionExpectation Expectation
Definition ClauseT.h:673
ObjectListT< I, E > LocatorList
Definition ClauseT.h:672
std::true_type EmptyTrait
Definition ClauseT.h:685
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:691
std::true_type TupleTrait
Definition ClauseT.h:693
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:694
std::true_type IncompleteTrait
Definition ClauseT.h:700
std::true_type IncompleteTrait
Definition ClauseT.h:706
ObjectListT< I, E > List
Definition ClauseT.h:712
std::true_type WrapperTrait
Definition ClauseT.h:713
std::true_type WrapperTrait
Definition ClauseT.h:721
std::true_type WrapperTrait
Definition ClauseT.h:728
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:738
std::true_type TupleTrait
Definition ClauseT.h:737
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:735
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:810
std::true_type TupleTrait
Definition ClauseT.h:809
ObjectListT< I, E > List
Definition ClauseT.h:805
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:808
std::true_type EmptyTrait
Definition ClauseT.h:744
std::true_type WrapperTrait
Definition ClauseT.h:751
ObjectListT< I, E > List
Definition ClauseT.h:750
std::true_type WrapperTrait
Definition ClauseT.h:759
OPT(InvokedByFptr) v
std::true_type IncompleteTrait
Definition ClauseT.h:766
std::true_type IncompleteTrait
Definition ClauseT.h:772
std::true_type IncompleteTrait
Definition ClauseT.h:791
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:780
ObjectT< I, E > InteropVar
Definition ClauseT.h:779
ListT< InteropType > InteropTypes
Definition ClauseT.h:782
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:785
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:784
std::true_type WrapperTrait
Definition ClauseT.h:798
ListT< type::StylizedInstanceT< I, E > > List
Definition ClauseT.h:797
std::true_type IncompleteTrait
Definition ClauseT.h:816
ObjectListT< I, E > List
Definition ClauseT.h:822
std::true_type WrapperTrait
Definition ClauseT.h:823
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:833
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:832
ObjectListT< I, E > List
Definition ClauseT.h:830
std::true_type TupleTrait
Definition ClauseT.h:845
ObjectListT< I, E > List
Definition ClauseT.h:840
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:847
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:854
ObjectListT< I, E > List
Definition ClauseT.h:853
std::true_type IncompleteTrait
Definition ClauseT.h:861
std::true_type TupleTrait
Definition ClauseT.h:870
std::tuple< Begin, Count > t
Definition ClauseT.h:871
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:883
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:890
ObjectListT< I, E > LocatorList
Definition ClauseT.h:877
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:884
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:885
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:887
std::true_type IncompleteTrait
Definition ClauseT.h:896
std::true_type IncompleteTrait
Definition ClauseT.h:902
std::true_type EmptyTrait
Definition ClauseT.h:908
std::true_type WrapperTrait
Definition ClauseT.h:915
std::true_type EmptyTrait
Definition ClauseT.h:944
std::true_type EmptyTrait
Definition ClauseT.h:962
std::true_type WrapperTrait
Definition ClauseT.h:923
DoNotUpdateContext v
Definition ClauseT.h:924
std::true_type EmptyTrait
Definition ClauseT.h:930
ObjectListT< I, E > List
Definition ClauseT.h:936
std::true_type WrapperTrait
Definition ClauseT.h:937
std::true_type EmptyTrait
Definition ClauseT.h:968
std::true_type WrapperTrait
Definition ClauseT.h:975
DoNotUseVariant v
Definition ClauseT.h:976
std::true_type EmptyTrait
Definition ClauseT.h:982
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:991
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:988
std::true_type TupleTrait
Definition ClauseT.h:990
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:1003
std::true_type WrapperTrait
Definition ClauseT.h:1009
ListT< Range > List
Definition ClauseT.h:1008
std::true_type WrapperTrait
Definition ClauseT.h:1017
std::true_type EmptyTrait
Definition ClauseT.h:1023
std::true_type EmptyTrait
Definition ClauseT.h:1028
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:1043
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:1042
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:1050
std::true_type IncompleteTrait
Definition ClauseT.h:1057
std::true_type WrapperTrait
Definition ClauseT.h:1064
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1072
std::true_type WrapperTrait
Definition ClauseT.h:1080
std::true_type WrapperTrait
Definition ClauseT.h:1088
ObjectListT< I, E > List
Definition ClauseT.h:1087
AffinityPolicy v
Definition ClauseT.h:1097
std::true_type WrapperTrait
Definition ClauseT.h:1096
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1103
std::true_type TupleTrait
Definition ClauseT.h:1114
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1115
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1109
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1112
std::true_type EmptyTrait
Definition ClauseT.h:1121
std::true_type EmptyTrait
Definition ClauseT.h:1127
std::true_type IncompleteTrait
Definition ClauseT.h:1133
std::true_type WrapperTrait
Definition ClauseT.h:1140
std::true_type WrapperTrait
Definition ClauseT.h:1148
std::true_type IncompleteTrait
Definition ClauseT.h:1155
std::true_type TupleTrait
Definition ClauseT.h:1165
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1166
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1173
std::true_type EmptyTrait
Definition ClauseT.h:1180
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1187
std::true_type WrapperTrait
Definition ClauseT.h:1195
ObjectListT< I, E > List
Definition ClauseT.h:1194
std::true_type EmptyTrait
Definition ClauseT.h:1202
std::true_type WrapperTrait
Definition ClauseT.h:1209
ListT< E > SizeList
Definition ClauseT.h:1216
std::true_type WrapperTrait
Definition ClauseT.h:1217
ObjectListT< I, E > List
Definition ClauseT.h:1224
std::true_type TupleTrait
Definition ClauseT.h:1228
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1227
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1229
std::true_type WrapperTrait
Definition ClauseT.h:1236
std::true_type EmptyTrait
Definition ClauseT.h:1243
ThreadsetPolicy v
Definition ClauseT.h:1251
std::true_type WrapperTrait
Definition ClauseT.h:1250
ENUM(ThreadsetPolicy, Omp_Pool, Omp_Team)
std::true_type TupleTrait
Definition ClauseT.h:1263
type::MotionExpectation Expectation
Definition ClauseT.h:1258
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1264
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1261
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1257
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1260
std::true_type IncompleteTrait
Definition ClauseT.h:1270
std::true_type WrapperTrait
Definition ClauseT.h:1277
std::true_type WrapperTrait
Definition ClauseT.h:1293
ParameterList v
Definition ClauseT.h:1294
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1292
std::true_type EmptyTrait
Definition ClauseT.h:1299
std::true_type EmptyTrait
Definition ClauseT.h:1305
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1314
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1313
std::true_type WrapperTrait
Definition ClauseT.h:1330
ObjectListT< I, E > List
Definition ClauseT.h:1329
ObjectListT< I, E > List
Definition ClauseT.h:1337
std::true_type WrapperTrait
Definition ClauseT.h:1338
ObjectT< I, E > InteropVar
Definition ClauseT.h:1321
std::true_type WrapperTrait
Definition ClauseT.h:1322
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1350
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1352
std::true_type WrapperTrait
Definition ClauseT.h:1353
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1346
std::true_type EmptyTrait
Definition ClauseT.h:1360
std::true_type IncompleteTrait
Definition ClauseT.h:1366
std::true_type EmptyTrait
Definition ClauseT.h:1372
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