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