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