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// V5.2: [15.8.3] `extended-atomic` clauses
450template <typename T, typename I, typename E> //
451struct CompareT {
452 using EmptyTrait = std::true_type;
453};
454
455// V5.2: [8.3.1] `assumption` clauses
456template <typename T, typename I, typename E> //
457struct ContainsT {
459 using WrapperTrait = std::true_type;
461};
462
463// V5.2: [5.7.1] `copyin` clause
464template <typename T, typename I, typename E> //
465struct CopyinT {
467 using WrapperTrait = std::true_type;
469};
470
471// V5.2: [5.7.2] `copyprivate` clause
472template <typename T, typename I, typename E> //
475 using WrapperTrait = std::true_type;
477};
478
479// V5.2: [5.4.1] `default` clause
480template <typename T, typename I, typename E> //
481struct DefaultT {
482 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
483 using WrapperTrait = std::true_type;
484 DataSharingAttribute v;
485};
486
487// V5.2: [5.8.7] `defaultmap` clause
488template <typename T, typename I, typename E> //
490 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
491 Present);
492 ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable);
493 using TupleTrait = std::true_type;
494 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
495};
496
497template <typename T, typename I, typename E> //
498struct DoacrossT;
499
500// V5.2: [15.9.5] `depend` clause
501template <typename T, typename I, typename E> //
502struct DependT {
505 using DependenceType = tomp::type::DependenceType;
506
507 struct TaskDep { // The form with task dependence type.
508 using TupleTrait = std::true_type;
509 // Empty LocatorList means "omp_all_memory".
511 };
512
514 using UnionTrait = std::true_type;
515 std::variant<Doacross, TaskDep> u; // Doacross form is legacy
516};
517
518// V5.2: [3.5] `destroy` clause
519template <typename T, typename I, typename E> //
520struct DestroyT {
522 using WrapperTrait = std::true_type;
523 // DestroyVar can be ommitted in "depobj destroy".
525};
526
527// V5.2: [12.5.2] `detach` clause
528template <typename T, typename I, typename E> //
529struct DetachT {
531 using WrapperTrait = std::true_type;
533};
534
535// V5.2: [13.2] `device` clause
536template <typename T, typename I, typename E> //
537struct DeviceT {
539 ENUM(DeviceModifier, Ancestor, DeviceNum);
540 using TupleTrait = std::true_type;
541 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
542};
543
544// [6.0:362]
545template <typename T, typename I, typename E> //
547 using Requires = E;
548 using WrapperTrait = std::true_type;
550};
551
552// V5.2: [13.1] `device_type` clause
553template <typename T, typename I, typename E> //
555 ENUM(DeviceTypeDescription, Any, Host, Nohost);
556 using WrapperTrait = std::true_type;
557 DeviceTypeDescription v;
558};
559
560// V5.2: [11.6.1] `dist_schedule` clause
561template <typename T, typename I, typename E> //
563 ENUM(Kind, Static);
564 using ChunkSize = E;
565 using TupleTrait = std::true_type;
566 std::tuple<Kind, OPT(ChunkSize)> t;
567};
568
569// V5.2: [15.9.6] `doacross` clause
570template <typename T, typename I, typename E> //
571struct DoacrossT {
573 using DependenceType = tomp::type::DependenceType;
574 using TupleTrait = std::true_type;
575 // Empty Vector means "omp_cur_iteration"
576 std::tuple<DependenceType, Vector> t;
577};
578
579// V5.2: [8.2.1] `requirement` clauses
580template <typename T, typename I, typename E> //
582 using Requires = E;
583 using WrapperTrait = std::true_type;
585};
586
587template <typename T, typename I, typename E> //
589 ENUM(AccessGroup, Cgroup);
590 using Prescriptiveness = type::Prescriptiveness;
591 using Size = E;
592 using TupleTrait = std::true_type;
593 std::tuple<OPT(AccessGroup), OPT(Prescriptiveness), Size> t;
594};
595
596// V5.2: [5.8.4] `enter` clause
597template <typename T, typename I, typename E> //
598struct EnterT {
600 ENUM(Modifier, Automap);
601 using TupleTrait = std::true_type;
602 std::tuple<OPT(Modifier), List> t;
603};
604
605// V5.2: [5.6.2] `exclusive` clause
606template <typename T, typename I, typename E> //
608 using WrapperTrait = std::true_type;
611};
612
613// V5.2: [15.8.3] `extended-atomic` clauses
614template <typename T, typename I, typename E> //
615struct FailT {
616 using MemoryOrder = type::MemoryOrder;
617 using WrapperTrait = std::true_type;
619};
620
621// V5.2: [10.5.1] `filter` clause
622template <typename T, typename I, typename E> //
623struct FilterT {
624 using ThreadNum = E;
625 using WrapperTrait = std::true_type;
627};
628
629// V5.2: [12.3] `final` clause
630template <typename T, typename I, typename E> //
631struct FinalT {
632 using Finalize = E;
633 using WrapperTrait = std::true_type;
635};
636
637// V5.2: [5.4.4] `firstprivate` clause
638template <typename T, typename I, typename E> //
641 using WrapperTrait = std::true_type;
643};
644
645// V5.2: [5.9.2] `from` clause
646template <typename T, typename I, typename E> //
647struct FromT {
649 using Expectation = type::MotionExpectation;
651 // See note at the definition of the MapperT type.
652 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
653
654 using TupleTrait = std::true_type;
656};
657
658// V5.2: [9.2.1] `full` clause
659template <typename T, typename I, typename E> //
660struct FullT {
661 using EmptyTrait = std::true_type;
662};
663
664// V5.2: [12.6.1] `grainsize` clause
665template <typename T, typename I, typename E> //
667 using Prescriptiveness = type::Prescriptiveness;
668 using GrainSize = E;
669 using TupleTrait = std::true_type;
671};
672
673// [6.0:438] `graph_id` clause
674template <typename T, typename I, typename E> //
675struct GraphIdT {
676 using IncompleteTrait = std::true_type;
677};
678
679// [6.0:438] `graph_reset` clause
680template <typename T, typename I, typename E> //
682 using IncompleteTrait = std::true_type;
683};
684
685// V5.2: [5.4.9] `has_device_addr` clause
686template <typename T, typename I, typename E> //
689 using WrapperTrait = std::true_type;
691};
692
693// V5.2: [15.1.2] `hint` clause
694template <typename T, typename I, typename E> //
695struct HintT {
696 using HintExpr = E;
697 using WrapperTrait = std::true_type;
699};
700
701// V5.2: [8.3.1] Assumption clauses
702template <typename T, typename I, typename E> //
703struct HoldsT {
704 using WrapperTrait = std::true_type;
705 E v; // No argument name in spec 5.2
706};
707
708// V5.2: [3.4] `if` clause
709template <typename T, typename I, typename E> //
710struct IfT {
713 using TupleTrait = std::true_type;
715};
716
717// V5.2: [7.7.1] `branch` clauses
718template <typename T, typename I, typename E> //
719struct InbranchT {
720 using EmptyTrait = std::true_type;
721};
722
723// V5.2: [5.6.1] `exclusive` clause
724template <typename T, typename I, typename E> //
727 using WrapperTrait = std::true_type;
729};
730
731// V5.2: [7.8.3] `indirect` clause
732template <typename T, typename I, typename E> //
733struct IndirectT {
735 using WrapperTrait = std::true_type;
737};
738
739// V5.2: [14.1.2] `init` clause
740template <typename T, typename I, typename E> //
741struct InitT {
745 ENUM(InteropType, Target, Targetsync); // Repeatable
746 using InteropTypes = ListT<InteropType>; // Not a spec name
747
748 using TupleTrait = std::true_type;
750};
751
752// V5.2: [5.5.4] `initializer` clause
753template <typename T, typename I, typename E> //
756 using WrapperTrait = std::true_type;
758};
759
760// V5.2: [5.5.10] `in_reduction` clause
761template <typename T, typename I, typename E> //
764 // See note at the definition of the ReductionIdentifierT type.
765 // The name ReductionIdentifiers is not a spec name.
767 using TupleTrait = std::true_type;
768 std::tuple<ReductionIdentifiers, List> t;
769};
770
771// V5.2: [5.4.7] `is_device_ptr` clause
772template <typename T, typename I, typename E> //
775 using WrapperTrait = std::true_type;
777};
778
779// V5.2: [5.4.5] `lastprivate` clause
780template <typename T, typename I, typename E> //
783 ENUM(LastprivateModifier, Conditional);
784 using TupleTrait = std::true_type;
785 std::tuple<OPT(LastprivateModifier), List> t;
786};
787
788// V5.2: [5.4.6] `linear` clause
789template <typename T, typename I, typename E> //
790struct LinearT {
791 // std::get<type> won't work here due to duplicate types in the tuple.
793 // StepSimpleModifier is same as StepComplexModifier.
795 ENUM(LinearModifier, Ref, Val, Uval);
796
797 using TupleTrait = std::true_type;
798 // Step == nullopt means 1.
799 std::tuple<OPT(StepComplexModifier), OPT(LinearModifier), List> t;
800};
801
802// V5.2: [5.8.5] `link` clause
803template <typename T, typename I, typename E> //
804struct LinkT {
806 using WrapperTrait = std::true_type;
808};
809
810// V5.2: [5.8.3] `map` clause
811template <typename T, typename I, typename E> //
812struct MapT {
814 ENUM(MapType, To, From, Tofrom, Storage);
815 ENUM(AttachModifier, Always, Auto, Never);
816 ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold);
817 ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee);
818 // See note at the definition of the MapperT type.
819 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
821 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
822
823 using TupleTrait = std::true_type;
824 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier),
825 OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList>
827};
828
829// V5.2: [7.5.1] `match` clause
830template <typename T, typename I, typename E> //
831struct MatchT {
832 using IncompleteTrait = std::true_type;
833};
834
835// V5.2: [12.2] `mergeable` clause
836template <typename T, typename I, typename E> //
838 using EmptyTrait = std::true_type;
839};
840
841// V5.2: [8.5.2] `message` clause
842template <typename T, typename I, typename E> //
843struct MessageT {
844 using MsgString = E;
845 using WrapperTrait = std::true_type;
847};
848
849// V5.2: [7.6.2] `nocontext` clause
850template <typename T, typename I, typename E> //
853 using WrapperTrait = std::true_type;
855};
856
857// V5.2: [15.7] `nowait` clause
858template <typename T, typename I, typename E> //
859struct NogroupT {
860 using EmptyTrait = std::true_type;
861};
862
863// V5.2: [10.4.1] `nontemporal` clause
864template <typename T, typename I, typename E> //
867 using WrapperTrait = std::true_type;
869};
870
871// V5.2: [8.3.1] `assumption` clauses
872template <typename T, typename I, typename E> //
873struct NoOpenmpT {
874 using EmptyTrait = std::true_type;
875};
876
877// V5.2: [8.3.1] `assumption` clauses
878template <typename T, typename I, typename E> //
880 using EmptyTrait = std::true_type;
881};
882
883// V6.0: [10.6.1] `assumption` clauses
884template <typename T, typename I, typename E> //
886 using EmptyTrait = std::true_type;
887};
888
889// V5.2: [8.3.1] `assumption` clauses
890template <typename T, typename I, typename E> //
892 using EmptyTrait = std::true_type;
893};
894
895// V5.2: [7.7.1] `branch` clauses
896template <typename T, typename I, typename E> //
898 using EmptyTrait = std::true_type;
899};
900
901// V5.2: [7.6.1] `novariants` clause
902template <typename T, typename I, typename E> //
905 using WrapperTrait = std::true_type;
907};
908
909// V5.2: [15.6] `nowait` clause
910template <typename T, typename I, typename E> //
911struct NowaitT {
912 using EmptyTrait = std::true_type;
913};
914
915// V5.2: [12.6.2] `num_tasks` clause
916template <typename T, typename I, typename E> //
917struct NumTasksT {
918 using Prescriptiveness = type::Prescriptiveness;
919 using NumTasks = E;
920 using TupleTrait = std::true_type;
922};
923
924// V5.2: [10.2.1] `num_teams` clause
925template <typename T, typename I, typename E> //
926struct NumTeamsT {
927 using LowerBound = E;
928 using UpperBound = E;
929
930 // The name Range is not a spec name.
931 struct Range {
932 using TupleTrait = std::true_type;
933 std::tuple<OPT(LowerBound), UpperBound> t;
934 };
935
936 // The name List is not a spec name. The list is an extension to allow
937 // specifying a grid with connection with the ompx_bare clause.
939 using WrapperTrait = std::true_type;
941};
942
943// V5.2: [10.1.2] `num_threads` clause
944template <typename T, typename I, typename E> //
946 using Nthreads = E;
947 using WrapperTrait = std::true_type;
949};
950
951template <typename T, typename I, typename E> //
953 using EmptyTrait = std::true_type;
954};
955
956template <typename T, typename I, typename E> //
957struct OmpxBareT {
958 using EmptyTrait = std::true_type;
959};
960
961template <typename T, typename I, typename E> //
963 using WrapperTrait = std::true_type;
965};
966
967// V5.2: [10.3] `order` clause
968template <typename T, typename I, typename E> //
969struct OrderT {
970 ENUM(OrderModifier, Reproducible, Unconstrained);
971 ENUM(Ordering, Concurrent);
972 using TupleTrait = std::true_type;
973 std::tuple<OPT(OrderModifier), Ordering> t;
974};
975
976// V5.2: [4.4.4] `ordered` clause
977template <typename T, typename I, typename E> //
978struct OrderedT {
979 using N = E;
980 using WrapperTrait = std::true_type;
981 OPT(N) v;
982};
983
984// V5.2: [7.4.2] `otherwise` clause
985template <typename T, typename I, typename E> //
987 using IncompleteTrait = std::true_type;
988};
989
990// V5.2: [9.2.2] `partial` clause
991template <typename T, typename I, typename E> //
992struct PartialT {
994 using WrapperTrait = std::true_type;
996};
997
998// V6.0: `permutation` clause
999template <typename T, typename I, typename E> //
1002 using WrapperTrait = std::true_type;
1004};
1005
1006// V5.2: [12.4] `priority` clause
1007template <typename T, typename I, typename E> //
1010 using WrapperTrait = std::true_type;
1012};
1013
1014// V5.2: [5.4.3] `private` clause
1015template <typename T, typename I, typename E> //
1016struct PrivateT {
1018 using WrapperTrait = std::true_type;
1020};
1021
1022// V5.2: [10.1.4] `proc_bind` clause
1023template <typename T, typename I, typename E> //
1025 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
1026 using WrapperTrait = std::true_type;
1027 AffinityPolicy v;
1028};
1029
1030// V5.2: [15.8.2] Atomic clauses
1031template <typename T, typename I, typename E> //
1032struct ReadT {
1033 using EmptyTrait = std::true_type;
1034};
1035
1036// V5.2: [5.5.8] `reduction` clause
1037template <typename T, typename I, typename E> //
1040 // See note at the definition of the ReductionIdentifierT type.
1041 // The name ReductionIdentifiers is not a spec name.
1043 ENUM(ReductionModifier, Default, Inscan, Task);
1044 using TupleTrait = std::true_type;
1045 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
1046};
1047
1048// V5.2: [15.8.1] `memory-order` clauses
1049template <typename T, typename I, typename E> //
1050struct RelaxedT {
1051 using EmptyTrait = std::true_type;
1052};
1053
1054// V5.2: [15.8.1] `memory-order` clauses
1055template <typename T, typename I, typename E> //
1056struct ReleaseT {
1057 using EmptyTrait = std::true_type;
1058};
1059
1060// [6.0:440-441] `replayable` clause
1061template <typename T, typename I, typename E> //
1063 using IncompleteTrait = std::true_type;
1064};
1065
1066// V5.2: [8.2.1] `requirement` clauses
1067template <typename T, typename I, typename E> //
1069 using Requires = E;
1070 using WrapperTrait = std::true_type;
1072};
1073
1074// V5.2: [10.4.2] `safelen` clause
1075template <typename T, typename I, typename E> //
1076struct SafelenT {
1077 using Length = E;
1078 using WrapperTrait = std::true_type;
1080};
1081
1082// V5.2: [11.5.3] `schedule` clause
1083template <typename T, typename I, typename E> //
1085 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1086 using ChunkSize = E;
1087 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1088 ENUM(ChunkModifier, Simd);
1089 using TupleTrait = std::true_type;
1090 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1091};
1092
1093// [6.0:361]
1094template <typename T, typename I, typename E> //
1096 using Requires = E;
1097 using WrapperTrait = std::true_type;
1099};
1100
1101// V5.2: [15.8.1] Memory-order clauses
1102template <typename T, typename I, typename E> //
1103struct SeqCstT {
1104 using EmptyTrait = std::true_type;
1105};
1106
1107// V5.2: [8.5.1] `severity` clause
1108template <typename T, typename I, typename E> //
1110 ENUM(SevLevel, Fatal, Warning);
1111 using WrapperTrait = std::true_type;
1112 SevLevel v;
1113};
1114
1115// V5.2: [5.4.2] `shared` clause
1116template <typename T, typename I, typename E> //
1117struct SharedT {
1119 using WrapperTrait = std::true_type;
1121};
1122
1123// V5.2: [15.10.3] `parallelization-level` clauses
1124template <typename T, typename I, typename E> //
1125struct SimdT {
1126 using EmptyTrait = std::true_type;
1127};
1128
1129// V5.2: [10.4.3] `simdlen` clause
1130template <typename T, typename I, typename E> //
1131struct SimdlenT {
1132 using Length = E;
1133 using WrapperTrait = std::true_type;
1135};
1136
1137// V5.2: [9.1.1] `sizes` clause
1138template <typename T, typename I, typename E> //
1139struct SizesT {
1141 using WrapperTrait = std::true_type;
1143};
1144
1145// V5.2: [5.5.9] `task_reduction` clause
1146template <typename T, typename I, typename E> //
1149 // See note at the definition of the ReductionIdentifierT type.
1150 // The name ReductionIdentifiers is not a spec name.
1152 using TupleTrait = std::true_type;
1153 std::tuple<ReductionIdentifiers, List> t;
1154};
1155
1156// V5.2: [13.3] `thread_limit` clause
1157template <typename T, typename I, typename E> //
1159 using Threadlim = E;
1160 using WrapperTrait = std::true_type;
1162};
1163
1164// V5.2: [15.10.3] `parallelization-level` clauses
1165template <typename T, typename I, typename E> //
1166struct ThreadsT {
1167 using EmptyTrait = std::true_type;
1168};
1169
1170// V5.2: [5.9.1] `to` clause
1171template <typename T, typename I, typename E> //
1172struct ToT {
1174 using Expectation = type::MotionExpectation;
1175 // See note at the definition of the MapperT type.
1176 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1178
1179 using TupleTrait = std::true_type;
1181};
1182
1183// [6.0:440-441] `transparent` clause
1184template <typename T, typename I, typename E> //
1186 using IncompleteTrait = std::true_type;
1187};
1188
1189// V5.2: [8.2.1] `requirement` clauses
1190template <typename T, typename I, typename E> //
1192 using Requires = E;
1193 using WrapperTrait = std::true_type;
1195};
1196
1197// V5.2: [8.2.1] `requirement` clauses
1198template <typename T, typename I, typename E> //
1200 using Requires = E;
1201 using WrapperTrait = std::true_type;
1203};
1204
1205// V5.2: [5.10] `uniform` clause
1206template <typename T, typename I, typename E> //
1207struct UniformT {
1209 using WrapperTrait = std::true_type;
1211};
1212
1213template <typename T, typename I, typename E> //
1214struct UnknownT {
1215 using EmptyTrait = std::true_type;
1216};
1217
1218// V5.2: [12.1] `untied` clause
1219template <typename T, typename I, typename E> //
1220struct UntiedT {
1221 using EmptyTrait = std::true_type;
1222};
1223
1224// Both of the following
1225// V5.2: [15.8.2] `atomic` clauses
1226// V5.2: [15.9.3] `update` clause
1227template <typename T, typename I, typename E> //
1228struct UpdateT {
1229 using DependenceType = tomp::type::DependenceType;
1230 using WrapperTrait = std::true_type;
1232};
1233
1234// V5.2: [14.1.3] `use` clause
1235template <typename T, typename I, typename E> //
1236struct UseT {
1238 using WrapperTrait = std::true_type;
1240};
1241
1242// V5.2: [5.4.10] `use_device_addr` clause
1243template <typename T, typename I, typename E> //
1246 using WrapperTrait = std::true_type;
1248};
1249
1250// V5.2: [5.4.8] `use_device_ptr` clause
1251template <typename T, typename I, typename E> //
1254 using WrapperTrait = std::true_type;
1256};
1257
1258// V5.2: [6.8] `uses_allocators` clause
1259template <typename T, typename I, typename E> //
1261 using MemSpace = E;
1263 using Allocator = E;
1264 struct AllocatorSpec { // Not a spec name
1265 using TupleTrait = std::true_type;
1267 };
1268 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1269 using WrapperTrait = std::true_type;
1271};
1272
1273// V5.2: [15.8.3] `extended-atomic` clauses
1274template <typename T, typename I, typename E> //
1275struct WeakT {
1276 using EmptyTrait = std::true_type;
1277};
1278
1279// V5.2: [7.4.1] `when` clause
1280template <typename T, typename I, typename E> //
1281struct WhenT {
1282 using IncompleteTrait = std::true_type;
1283};
1284
1285// V5.2: [15.8.2] Atomic clauses
1286template <typename T, typename I, typename E> //
1287struct WriteT {
1288 using EmptyTrait = std::true_type;
1289};
1290
1291// V6: [6.4.7] Looprange clause
1292template <typename T, typename I, typename E> struct LoopRangeT {
1293 using Begin = E;
1294 using End = E;
1295
1296 using TupleTrait = std::true_type;
1297 std::tuple<Begin, End> t;
1298};
1299
1300// ---
1301
1302template <typename T, typename I, typename E>
1304 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1306
1307template <typename T, typename I, typename E>
1308using EmptyClausesT = std::variant<
1316
1317template <typename T, typename I, typename E>
1319 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, GraphIdT<T, I, E>,
1322
1323template <typename T, typename I, typename E>
1325 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1333
1334template <typename T, typename I, typename E>
1335using UnionClausesT = std::variant<DependT<T, I, E>>;
1336
1337template <typename T, typename I, typename E>
1338using WrapperClausesT = std::variant<
1358
1359template <typename T, typename I, typename E>
1367 >::type;
1368} // namespace clause
1369
1370using type::operator==;
1371
1372// The variant wrapper that encapsulates all possible specific clauses.
1373// The `Extras` arguments are additional types representing local extensions
1374// to the clause set, e.g.
1375//
1376// using Clause = ClauseT<Type, Id, Expr,
1377// MyClause1, MyClause2>;
1378//
1379// The member Clause::u will be a variant containing all specific clauses
1380// defined above, plus MyClause1 and MyClause2.
1381//
1382// Note: Any derived class must be constructible from the base class
1383// ClauseT<...>.
1384template <typename TypeType, typename IdType, typename ExprType,
1385 typename... Extras>
1386struct ClauseT {
1387 using TypeTy = TypeType;
1388 using IdTy = IdType;
1389 using ExprTy = ExprType;
1390
1391 // Type of "self" to specify this type given a derived class type.
1392 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1393
1394 using VariantTy = typename type::Union<
1396 std::variant<Extras...>>::type;
1397
1398 llvm::omp::Clause id; // The numeric id of the clause
1399 using UnionTrait = std::true_type;
1401};
1402
1403template <typename ClauseType> struct DirectiveWithClauses {
1404 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1406};
1407
1408} // namespace tomp
1409
1410#undef OPT
1411#undef ENUM
1412
1413#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:1360
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:1324
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition ClauseT.h:1303
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:1308
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, GraphIdT< T, I, E >, GraphResetT< 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:1318
std::variant< DependT< T, I, E > > UnionClausesT
Definition ClauseT.h:1335
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 >, 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:1338
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:1388
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition ClauseT.h:1394
ExprType ExprTy
Definition ClauseT.h:1389
ClauseT< TypeType, IdType, ExprType, Extras... > BaseT
Definition ClauseT.h:1392
TypeType TypeTy
Definition ClauseT.h:1387
tomp::type::ListT< ClauseType > clauses
Definition ClauseT.h:1405
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 EmptyTrait
Definition ClauseT.h:452
ListT< type::DirectiveName > List
Definition ClauseT.h:458
std::true_type WrapperTrait
Definition ClauseT.h:459
std::true_type WrapperTrait
Definition ClauseT.h:467
ObjectListT< I, E > List
Definition ClauseT.h:466
ObjectListT< I, E > List
Definition ClauseT.h:474
std::true_type WrapperTrait
Definition ClauseT.h:475
DataSharingAttribute v
Definition ClauseT.h:484
std::true_type WrapperTrait
Definition ClauseT.h:483
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:494
std::true_type TupleTrait
Definition ClauseT.h:493
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
Definition ClauseT.h:510
tomp::type::DependenceType DependenceType
Definition ClauseT.h:505
DoacrossT< T, I, E > Doacross
Definition ClauseT.h:513
std::true_type UnionTrait
Definition ClauseT.h:514
ObjectListT< I, E > LocatorList
Definition ClauseT.h:504
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:503
std::variant< Doacross, TaskDep > u
Definition ClauseT.h:515
std::true_type WrapperTrait
Definition ClauseT.h:522
ObjectT< I, E > DestroyVar
Definition ClauseT.h:521
ObjectT< I, E > EventHandle
Definition ClauseT.h:530
std::true_type WrapperTrait
Definition ClauseT.h:531
std::true_type WrapperTrait
Definition ClauseT.h:548
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition ClauseT.h:541
std::true_type TupleTrait
Definition ClauseT.h:540
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition ClauseT.h:557
std::true_type WrapperTrait
Definition ClauseT.h:556
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition ClauseT.h:566
std::true_type TupleTrait
Definition ClauseT.h:565
std::true_type TupleTrait
Definition ClauseT.h:574
ListT< type::LoopIterationT< I, E > > Vector
Definition ClauseT.h:572
tomp::type::DependenceType DependenceType
Definition ClauseT.h:573
std::tuple< DependenceType, Vector > t
Definition ClauseT.h:576
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:590
std::tuple< OPT(AccessGroup), OPT(Prescriptiveness), Size > t
Definition ClauseT.h:593
ENUM(AccessGroup, Cgroup)
std::true_type TupleTrait
Definition ClauseT.h:601
std::tuple< OPT(Modifier), List > t
Definition ClauseT.h:602
ENUM(Modifier, Automap)
ObjectListT< I, E > List
Definition ClauseT.h:599
std::true_type WrapperTrait
Definition ClauseT.h:608
ObjectListT< I, E > List
Definition ClauseT.h:609
MemoryOrder v
Definition ClauseT.h:618
std::true_type WrapperTrait
Definition ClauseT.h:617
type::MemoryOrder MemoryOrder
Definition ClauseT.h:616
std::true_type WrapperTrait
Definition ClauseT.h:625
std::true_type WrapperTrait
Definition ClauseT.h:633
std::true_type WrapperTrait
Definition ClauseT.h:641
ObjectListT< I, E > List
Definition ClauseT.h:640
std::true_type TupleTrait
Definition ClauseT.h:654
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:650
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:655
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:652
type::MotionExpectation Expectation
Definition ClauseT.h:649
ObjectListT< I, E > LocatorList
Definition ClauseT.h:648
std::true_type EmptyTrait
Definition ClauseT.h:661
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:667
std::true_type TupleTrait
Definition ClauseT.h:669
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition ClauseT.h:670
std::true_type IncompleteTrait
Definition ClauseT.h:676
std::true_type IncompleteTrait
Definition ClauseT.h:682
ObjectListT< I, E > List
Definition ClauseT.h:688
std::true_type WrapperTrait
Definition ClauseT.h:689
std::true_type WrapperTrait
Definition ClauseT.h:697
std::true_type WrapperTrait
Definition ClauseT.h:704
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition ClauseT.h:714
std::true_type TupleTrait
Definition ClauseT.h:713
type::DirectiveName DirectiveNameModifier
Definition ClauseT.h:711
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:768
std::true_type TupleTrait
Definition ClauseT.h:767
ObjectListT< I, E > List
Definition ClauseT.h:763
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:766
std::true_type EmptyTrait
Definition ClauseT.h:720
std::true_type WrapperTrait
Definition ClauseT.h:727
ObjectListT< I, E > List
Definition ClauseT.h:726
std::true_type WrapperTrait
Definition ClauseT.h:735
OPT(InvokedByFptr) v
ListT< ForeignRuntimeId > InteropPreference
Definition ClauseT.h:744
ObjectT< I, E > InteropVar
Definition ClauseT.h:743
ListT< InteropType > InteropTypes
Definition ClauseT.h:746
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition ClauseT.h:749
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition ClauseT.h:748
InitializerExpr v
Definition ClauseT.h:757
std::true_type WrapperTrait
Definition ClauseT.h:756
ObjectListT< I, E > List
Definition ClauseT.h:774
std::true_type WrapperTrait
Definition ClauseT.h:775
std::tuple< OPT(LastprivateModifier), List > t
Definition ClauseT.h:785
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition ClauseT.h:784
ObjectListT< I, E > List
Definition ClauseT.h:782
std::true_type TupleTrait
Definition ClauseT.h:797
ObjectListT< I, E > List
Definition ClauseT.h:792
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition ClauseT.h:799
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
Definition ClauseT.h:806
ObjectListT< I, E > List
Definition ClauseT.h:805
std::true_type TupleTrait
Definition ClauseT.h:1296
std::tuple< Begin, End > t
Definition ClauseT.h:1297
ENUM(RefModifier, RefPtee, RefPtr, RefPtrPtee)
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:819
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(AttachModifier), OPT(RefModifier), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:826
ObjectListT< I, E > LocatorList
Definition ClauseT.h:813
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:820
ENUM(MapTypeModifier, Always, Close, Delete, Present, Self, OmpxHold)
ListT< MapTypeModifier > MapTypeModifiers
Definition ClauseT.h:821
ENUM(MapType, To, From, Tofrom, Storage)
ENUM(AttachModifier, Always, Auto, Never)
std::true_type TupleTrait
Definition ClauseT.h:823
std::true_type IncompleteTrait
Definition ClauseT.h:832
std::true_type EmptyTrait
Definition ClauseT.h:838
std::true_type WrapperTrait
Definition ClauseT.h:845
std::true_type EmptyTrait
Definition ClauseT.h:874
std::true_type EmptyTrait
Definition ClauseT.h:892
std::true_type WrapperTrait
Definition ClauseT.h:853
DoNotUpdateContext v
Definition ClauseT.h:854
std::true_type EmptyTrait
Definition ClauseT.h:860
ObjectListT< I, E > List
Definition ClauseT.h:866
std::true_type WrapperTrait
Definition ClauseT.h:867
std::true_type EmptyTrait
Definition ClauseT.h:898
std::true_type WrapperTrait
Definition ClauseT.h:905
DoNotUseVariant v
Definition ClauseT.h:906
std::true_type EmptyTrait
Definition ClauseT.h:912
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition ClauseT.h:921
type::Prescriptiveness Prescriptiveness
Definition ClauseT.h:918
std::true_type TupleTrait
Definition ClauseT.h:920
std::tuple< OPT(LowerBound), UpperBound > t
Definition ClauseT.h:933
std::true_type WrapperTrait
Definition ClauseT.h:939
ListT< Range > List
Definition ClauseT.h:938
std::true_type WrapperTrait
Definition ClauseT.h:947
std::true_type EmptyTrait
Definition ClauseT.h:953
std::true_type EmptyTrait
Definition ClauseT.h:958
std::tuple< OPT(OrderModifier), Ordering > t
Definition ClauseT.h:973
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition ClauseT.h:972
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition ClauseT.h:980
std::true_type IncompleteTrait
Definition ClauseT.h:987
std::true_type WrapperTrait
Definition ClauseT.h:994
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition ClauseT.h:1002
std::true_type WrapperTrait
Definition ClauseT.h:1010
std::true_type WrapperTrait
Definition ClauseT.h:1018
ObjectListT< I, E > List
Definition ClauseT.h:1017
AffinityPolicy v
Definition ClauseT.h:1027
std::true_type WrapperTrait
Definition ClauseT.h:1026
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition ClauseT.h:1033
std::true_type TupleTrait
Definition ClauseT.h:1044
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition ClauseT.h:1045
ENUM(ReductionModifier, Default, Inscan, Task)
ObjectListT< I, E > List
Definition ClauseT.h:1039
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1042
std::true_type EmptyTrait
Definition ClauseT.h:1051
std::true_type EmptyTrait
Definition ClauseT.h:1057
std::true_type IncompleteTrait
Definition ClauseT.h:1063
std::true_type WrapperTrait
Definition ClauseT.h:1070
std::true_type WrapperTrait
Definition ClauseT.h:1078
std::true_type TupleTrait
Definition ClauseT.h:1089
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition ClauseT.h:1090
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type WrapperTrait
Definition ClauseT.h:1097
std::true_type EmptyTrait
Definition ClauseT.h:1104
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition ClauseT.h:1111
std::true_type WrapperTrait
Definition ClauseT.h:1119
ObjectListT< I, E > List
Definition ClauseT.h:1118
std::true_type EmptyTrait
Definition ClauseT.h:1126
std::true_type WrapperTrait
Definition ClauseT.h:1133
ListT< E > SizeList
Definition ClauseT.h:1140
std::true_type WrapperTrait
Definition ClauseT.h:1141
ObjectListT< I, E > List
Definition ClauseT.h:1148
std::true_type TupleTrait
Definition ClauseT.h:1152
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition ClauseT.h:1151
std::tuple< ReductionIdentifiers, List > t
Definition ClauseT.h:1153
std::true_type WrapperTrait
Definition ClauseT.h:1160
std::true_type EmptyTrait
Definition ClauseT.h:1167
std::true_type TupleTrait
Definition ClauseT.h:1179
type::MotionExpectation Expectation
Definition ClauseT.h:1174
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition ClauseT.h:1180
type::IteratorT< T, I, E > Iterator
Definition ClauseT.h:1177
ObjectListT< I, E > LocatorList
Definition ClauseT.h:1173
ListT< type::MapperT< I, E > > Mappers
Definition ClauseT.h:1176
std::true_type IncompleteTrait
Definition ClauseT.h:1186
std::true_type WrapperTrait
Definition ClauseT.h:1193
std::true_type WrapperTrait
Definition ClauseT.h:1209
ParameterList v
Definition ClauseT.h:1210
ObjectListT< I, E > ParameterList
Definition ClauseT.h:1208
std::true_type EmptyTrait
Definition ClauseT.h:1215
std::true_type EmptyTrait
Definition ClauseT.h:1221
OPT(DependenceType) v
std::true_type WrapperTrait
Definition ClauseT.h:1230
tomp::type::DependenceType DependenceType
Definition ClauseT.h:1229
std::true_type WrapperTrait
Definition ClauseT.h:1246
ObjectListT< I, E > List
Definition ClauseT.h:1245
ObjectListT< I, E > List
Definition ClauseT.h:1253
std::true_type WrapperTrait
Definition ClauseT.h:1254
ObjectT< I, E > InteropVar
Definition ClauseT.h:1237
std::true_type WrapperTrait
Definition ClauseT.h:1238
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition ClauseT.h:1266
ListT< AllocatorSpec > Allocators
Definition ClauseT.h:1268
std::true_type WrapperTrait
Definition ClauseT.h:1269
ObjectT< I, E > TraitsArray
Definition ClauseT.h:1262
std::true_type EmptyTrait
Definition ClauseT.h:1276
std::true_type IncompleteTrait
Definition ClauseT.h:1282
std::true_type EmptyTrait
Definition ClauseT.h:1288
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