LLVM 19.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 varuant 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 (as defined in the OpenMP spec).
154//
155// A specialization of ObjectT<Id, Expr> must provide the following definitions:
156// {
157// using IdTy = Id;
158// using ExprTy = Expr;
159//
160// auto id() const -> IdTy {
161// return the identifier of the object (for use in tests for
162// presence/absence of the object)
163// }
164//
165// auto ref() const -> (e.g. const ExprTy&) {
166// return the expression accessing (referencing) the object
167// }
168// }
169//
170// For example, the ObjectT instance created for "var[x+1]" would have
171// the `id()` return the identifier for `var`, and the `ref()` return the
172// representation of the array-access `var[x+1]`.
173//
174// The identity of an object must always be present, i.e. it cannot be
175// nullptr, std::nullopt, etc. The reference is optional.
176//
177// Note: the ObjectT template is not defined. Any user of it is expected to
178// provide their own specialization that conforms to the above requirements.
179template <typename IdType, typename ExprType> struct ObjectT;
180
181// By default, object equality is only determined by its identity.
182template <typename I, typename E>
183bool operator==(const ObjectT<I, E> &o1, const ObjectT<I, E> &o2) {
184 return o1.id() == o2.id();
185}
186
187template <typename I, typename E> using ObjectListT = ListT<ObjectT<I, E>>;
188
189using DirectiveName = llvm::omp::Directive;
190
191template <typename I, typename E> //
194 using WrapperTrait = std::true_type;
196 };
197 ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT,
198 LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max);
199 using UnionTrait = std::true_type;
200 std::variant<DefinedOpName, IntrinsicOperator> u;
201};
202
203// V5.2: [3.2.6] `iterator` modifier
204template <typename E> //
205struct RangeT {
206 // range-specification: begin : end[: step]
207 using TupleTrait = std::true_type;
208 std::tuple<E, E, OPT(E)> t;
209};
210
211// V5.2: [3.2.6] `iterator` modifier
212template <typename TypeType, typename IdType, typename ExprType> //
214 // iterators-specifier: [ iterator-type ] identifier = range-specification
215 using TupleTrait = std::true_type;
217};
218
219// Note:
220// For motion or map clauses the OpenMP spec allows a unique mapper modifier.
221// In practice, since these clauses apply to multiple objects, there can be
222// multiple effective mappers applicable to these objects (due to overloads,
223// etc.). Because of that store a list of mappers every time a mapper modifier
224// is allowed. If the mapper list contains a single element, it applies to
225// all objects in the clause, otherwise there should be as many mappers as
226// there are objects.
227// V5.2: [5.8.2] Mapper identifiers and `mapper` modifiers
228template <typename I, typename E> //
229struct MapperT {
231 using WrapperTrait = std::true_type;
233};
234
235// V5.2: [15.8.1] `memory-order` clauses
236// When used as arguments for other clauses, e.g. `fail`.
237ENUM(MemoryOrder, AcqRel, Acquire, Relaxed, Release, SeqCst);
238ENUM(MotionExpectation, Present);
239// V5.2: [15.9.1] `task-dependence-type` modifier
240ENUM(TaskDependenceType, In, Out, Inout, Mutexinoutset, Inoutset, Depobj);
241
242template <typename I, typename E> //
244 struct Distance {
245 using TupleTrait = std::true_type;
246 std::tuple<DefinedOperatorT<I, E>, E> t;
247 };
248 using TupleTrait = std::true_type;
249 std::tuple<ObjectT<I, E>, OPT(Distance)> t;
250};
251
252template <typename I, typename E> //
254 using WrapperTrait = std::true_type;
256};
257
258// Note:
259// For reduction clauses the OpenMP spec allows a unique reduction identifier.
260// For reasons analogous to those listed for the MapperT type, clauses that
261// according to the spec contain a reduction identifier will contain a list of
262// reduction identifiers. The same constraints apply: there is either a single
263// identifier that applies to all objects, or there are as many identifiers
264// as there are objects.
265template <typename I, typename E> //
267 using UnionTrait = std::true_type;
268 std::variant<DefinedOperatorT<I, E>, ProcedureDesignatorT<I, E>> u;
269};
270
271template <typename T, typename I, typename E> //
273
274template <typename T>
275std::enable_if_t<T::EmptyTrait::value, bool> operator==(const T &a,
276 const T &b) {
277 return true;
278}
279template <typename T>
280std::enable_if_t<T::IncompleteTrait::value, bool> operator==(const T &a,
281 const T &b) {
282 return true;
283}
284template <typename T>
285std::enable_if_t<T::WrapperTrait::value, bool> operator==(const T &a,
286 const T &b) {
287 return a.v == b.v;
288}
289template <typename T>
290std::enable_if_t<T::TupleTrait::value, bool> operator==(const T &a,
291 const T &b) {
292 return a.t == b.t;
293}
294template <typename T>
295std::enable_if_t<T::UnionTrait::value, bool> operator==(const T &a,
296 const T &b) {
297 return a.u == b.u;
298}
299} // namespace type
300
301template <typename T> using ListT = type::ListT<T>;
302
303template <typename I, typename E> using ObjectT = type::ObjectT<I, E>;
304template <typename I, typename E> using ObjectListT = type::ObjectListT<I, E>;
305
306template <typename T, typename I, typename E>
308
309template <
310 typename ContainerTy, typename FunctionTy,
311 typename ElemTy = typename llvm::remove_cvref_t<ContainerTy>::value_type,
312 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
313ListT<ResultTy> makeList(ContainerTy &&container, FunctionTy &&func) {
315 llvm::transform(container, std::back_inserter(v), func);
316 return v;
317}
318
319namespace clause {
320using type::operator==;
321
322// V5.2: [8.3.1] `assumption` clauses
323template <typename T, typename I, typename E> //
324struct AbsentT {
326 using WrapperTrait = std::true_type;
328};
329
330// V5.2: [15.8.1] `memory-order` clauses
331template <typename T, typename I, typename E> //
332struct AcqRelT {
333 using EmptyTrait = std::true_type;
334};
335
336// V5.2: [15.8.1] `memory-order` clauses
337template <typename T, typename I, typename E> //
338struct AcquireT {
339 using EmptyTrait = std::true_type;
340};
341
342// V5.2: [7.5.2] `adjust_args` clause
343template <typename T, typename I, typename E> //
345 using IncompleteTrait = std::true_type;
346};
347
348// V5.2: [12.5.1] `affinity` clause
349template <typename T, typename I, typename E> //
350struct AffinityT {
353
354 using TupleTrait = std::true_type;
355 std::tuple<OPT(Iterator), LocatorList> t;
356};
357
358// V5.2: [6.3] `align` clause
359template <typename T, typename I, typename E> //
360struct AlignT {
361 using Alignment = E;
362
363 using WrapperTrait = std::true_type;
365};
366
367// V5.2: [5.11] `aligned` clause
368template <typename T, typename I, typename E> //
369struct AlignedT {
370 using Alignment = E;
372
373 using TupleTrait = std::true_type;
374 std::tuple<OPT(Alignment), List> t;
375};
376
377template <typename T, typename I, typename E> //
378struct AllocatorT;
379
380// V5.2: [6.6] `allocate` clause
381template <typename T, typename I, typename E> //
382struct AllocateT {
387
388 using TupleTrait = std::true_type;
392};
393
394// V5.2: [6.4] `allocator` clause
395template <typename T, typename I, typename E> //
397 using Allocator = E;
398 using WrapperTrait = std::true_type;
400};
401
402// V5.2: [7.5.3] `append_args` clause
403template <typename T, typename I, typename E> //
405 using IncompleteTrait = std::true_type;
406};
407
408// V5.2: [8.1] `at` clause
409template <typename T, typename I, typename E> //
410struct AtT {
411 ENUM(ActionTime, Compilation, Execution);
412 using WrapperTrait = std::true_type;
413 ActionTime v;
414};
415
416// V5.2: [8.2.1] `requirement` clauses
417template <typename T, typename I, typename E> //
419 using MemoryOrder = type::MemoryOrder;
420 using WrapperTrait = std::true_type;
421 MemoryOrder v; // Name not provided in spec
422};
423
424// V5.2: [11.7.1] `bind` clause
425template <typename T, typename I, typename E> //
426struct BindT {
427 ENUM(Binding, Teams, Parallel, Thread);
428 using WrapperTrait = std::true_type;
429 Binding v;
430};
431
432// V5.2: [15.8.3] `extended-atomic` clauses
433template <typename T, typename I, typename E> //
434struct CaptureT {
435 using EmptyTrait = std::true_type;
436};
437
438// V5.2: [4.4.3] `collapse` clause
439template <typename T, typename I, typename E> //
440struct CollapseT {
441 using N = E;
442 using WrapperTrait = std::true_type;
444};
445
446// V5.2: [15.8.3] `extended-atomic` clauses
447template <typename T, typename I, typename E> //
448struct CompareT {
449 using EmptyTrait = std::true_type;
450};
451
452// V5.2: [8.3.1] `assumption` clauses
453template <typename T, typename I, typename E> //
454struct ContainsT {
456 using WrapperTrait = std::true_type;
458};
459
460// V5.2: [5.7.1] `copyin` clause
461template <typename T, typename I, typename E> //
462struct CopyinT {
464 using WrapperTrait = std::true_type;
466};
467
468// V5.2: [5.7.2] `copyprivate` clause
469template <typename T, typename I, typename E> //
472 using WrapperTrait = std::true_type;
474};
475
476// V5.2: [5.4.1] `default` clause
477template <typename T, typename I, typename E> //
478struct DefaultT {
479 ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared);
480 using WrapperTrait = std::true_type;
481 DataSharingAttribute v;
482};
483
484// V5.2: [5.8.7] `defaultmap` clause
485template <typename T, typename I, typename E> //
487 ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default,
488 Present);
489 ENUM(VariableCategory, Scalar, Aggregate, Pointer, Allocatable);
490 using TupleTrait = std::true_type;
491 std::tuple<ImplicitBehavior, OPT(VariableCategory)> t;
492};
493
494template <typename T, typename I, typename E> //
495struct DoacrossT;
496
497// V5.2: [15.9.5] `depend` clause
498template <typename T, typename I, typename E> //
499struct DependT {
502 using TaskDependenceType = tomp::type::TaskDependenceType;
503
504 struct WithLocators { // Modern form
505 using TupleTrait = std::true_type;
506 // Empty LocatorList means "omp_all_memory".
508 };
509
511 using UnionTrait = std::true_type;
512 std::variant<Doacross, WithLocators> u; // Doacross form is legacy
513};
514
515// V5.2: [3.5] `destroy` clause
516template <typename T, typename I, typename E> //
517struct DestroyT {
519 using WrapperTrait = std::true_type;
520 // DestroyVar can be ommitted in "depobj destroy".
522};
523
524// V5.2: [12.5.2] `detach` clause
525template <typename T, typename I, typename E> //
526struct DetachT {
528 using WrapperTrait = std::true_type;
530};
531
532// V5.2: [13.2] `device` clause
533template <typename T, typename I, typename E> //
534struct DeviceT {
536 ENUM(DeviceModifier, Ancestor, DeviceNum);
537 using TupleTrait = std::true_type;
538 std::tuple<OPT(DeviceModifier), DeviceDescription> t;
539};
540
541// V5.2: [13.1] `device_type` clause
542template <typename T, typename I, typename E> //
544 ENUM(DeviceTypeDescription, Any, Host, Nohost);
545 using WrapperTrait = std::true_type;
546 DeviceTypeDescription v;
547};
548
549// V5.2: [11.6.1] `dist_schedule` clause
550template <typename T, typename I, typename E> //
552 ENUM(Kind, Static);
553 using ChunkSize = E;
554 using TupleTrait = std::true_type;
555 std::tuple<Kind, OPT(ChunkSize)> t;
556};
557
558// V5.2: [15.9.6] `doacross` clause
559template <typename T, typename I, typename E> //
560struct DoacrossT {
562 ENUM(DependenceType, Source, Sink);
563 using TupleTrait = std::true_type;
564 // Empty Vector means "omp_cur_iteration"
565 std::tuple<DependenceType, Vector> t;
566};
567
568// V5.2: [8.2.1] `requirement` clauses
569template <typename T, typename I, typename E> //
571 using EmptyTrait = std::true_type;
572};
573
574// V5.2: [5.8.4] `enter` clause
575template <typename T, typename I, typename E> //
576struct EnterT {
578 using WrapperTrait = std::true_type;
580};
581
582// V5.2: [5.6.2] `exclusive` clause
583template <typename T, typename I, typename E> //
585 using WrapperTrait = std::true_type;
588};
589
590// V5.2: [15.8.3] `extended-atomic` clauses
591template <typename T, typename I, typename E> //
592struct FailT {
593 using MemoryOrder = type::MemoryOrder;
594 using WrapperTrait = std::true_type;
596};
597
598// V5.2: [10.5.1] `filter` clause
599template <typename T, typename I, typename E> //
600struct FilterT {
601 using ThreadNum = E;
602 using WrapperTrait = std::true_type;
604};
605
606// V5.2: [12.3] `final` clause
607template <typename T, typename I, typename E> //
608struct FinalT {
609 using Finalize = E;
610 using WrapperTrait = std::true_type;
612};
613
614// V5.2: [5.4.4] `firstprivate` clause
615template <typename T, typename I, typename E> //
618 using WrapperTrait = std::true_type;
620};
621
622// V5.2: [5.9.2] `from` clause
623template <typename T, typename I, typename E> //
624struct FromT {
626 using Expectation = type::MotionExpectation;
628 // See note at the definition of the MapperT type.
629 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
630
631 using TupleTrait = std::true_type;
633};
634
635// V5.2: [9.2.1] `full` clause
636template <typename T, typename I, typename E> //
637struct FullT {
638 using EmptyTrait = std::true_type;
639};
640
641// V5.2: [12.6.1] `grainsize` clause
642template <typename T, typename I, typename E> //
644 ENUM(Prescriptiveness, Strict);
645 using GrainSize = E;
646 using TupleTrait = std::true_type;
647 std::tuple<OPT(Prescriptiveness), GrainSize> t;
648};
649
650// V5.2: [5.4.9] `has_device_addr` clause
651template <typename T, typename I, typename E> //
654 using WrapperTrait = std::true_type;
656};
657
658// V5.2: [15.1.2] `hint` clause
659template <typename T, typename I, typename E> //
660struct HintT {
661 using HintExpr = E;
662 using WrapperTrait = std::true_type;
664};
665
666// V5.2: [8.3.1] Assumption clauses
667template <typename T, typename I, typename E> //
668struct HoldsT {
669 using WrapperTrait = std::true_type;
670 E v; // No argument name in spec 5.2
671};
672
673// V5.2: [3.4] `if` clause
674template <typename T, typename I, typename E> //
675struct IfT {
678 using TupleTrait = std::true_type;
680};
681
682// V5.2: [7.7.1] `branch` clauses
683template <typename T, typename I, typename E> //
684struct InbranchT {
685 using EmptyTrait = std::true_type;
686};
687
688// V5.2: [5.6.1] `exclusive` clause
689template <typename T, typename I, typename E> //
692 using WrapperTrait = std::true_type;
694};
695
696// V5.2: [7.8.3] `indirect` clause
697template <typename T, typename I, typename E> //
698struct IndirectT {
700 using WrapperTrait = std::true_type;
702};
703
704// V5.2: [14.1.2] `init` clause
705template <typename T, typename I, typename E> //
706struct InitT {
710 ENUM(InteropType, Target, Targetsync); // Repeatable
711 using InteropTypes = ListT<InteropType>; // Not a spec name
712
713 using TupleTrait = std::true_type;
715};
716
717// V5.2: [5.5.4] `initializer` clause
718template <typename T, typename I, typename E> //
721 using WrapperTrait = std::true_type;
723};
724
725// V5.2: [5.5.10] `in_reduction` clause
726template <typename T, typename I, typename E> //
729 // See note at the definition of the ReductionIdentifierT type.
730 // The name ReductionIdentifiers is not a spec name.
732 using TupleTrait = std::true_type;
733 std::tuple<ReductionIdentifiers, List> t;
734};
735
736// V5.2: [5.4.7] `is_device_ptr` clause
737template <typename T, typename I, typename E> //
740 using WrapperTrait = std::true_type;
742};
743
744// V5.2: [5.4.5] `lastprivate` clause
745template <typename T, typename I, typename E> //
748 ENUM(LastprivateModifier, Conditional);
749 using TupleTrait = std::true_type;
750 std::tuple<OPT(LastprivateModifier), List> t;
751};
752
753// V5.2: [5.4.6] `linear` clause
754template <typename T, typename I, typename E> //
755struct LinearT {
756 // std::get<type> won't work here due to duplicate types in the tuple.
760 ENUM(LinearModifier, Ref, Val, Uval);
761
762 using TupleTrait = std::true_type;
763 // Step == nullopt means 1.
765 OPT(LinearModifier), List>
767};
768
769// V5.2: [5.8.5] `link` clause
770template <typename T, typename I, typename E> //
771struct LinkT {
773 using WrapperTrait = std::true_type;
775};
776
777// V5.2: [5.8.3] `map` clause
778template <typename T, typename I, typename E> //
779struct MapT {
781 ENUM(MapType, To, From, Tofrom, Alloc, Release, Delete);
782 ENUM(MapTypeModifier, Always, Close, Present, OmpxHold);
783 // See note at the definition of the MapperT type.
784 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
786 using MapTypeModifiers = ListT<MapTypeModifier>; // Not a spec name
787
788 using TupleTrait = std::true_type;
789 std::tuple<OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator),
792};
793
794// V5.2: [7.5.1] `match` clause
795template <typename T, typename I, typename E> //
796struct MatchT {
797 using IncompleteTrait = std::true_type;
798};
799
800// V5.2: [12.2] `mergeable` clause
801template <typename T, typename I, typename E> //
803 using EmptyTrait = std::true_type;
804};
805
806// V5.2: [8.5.2] `message` clause
807template <typename T, typename I, typename E> //
808struct MessageT {
809 using MsgString = E;
810 using WrapperTrait = std::true_type;
812};
813
814// V5.2: [7.6.2] `nocontext` clause
815template <typename T, typename I, typename E> //
818 using WrapperTrait = std::true_type;
820};
821
822// V5.2: [15.7] `nowait` clause
823template <typename T, typename I, typename E> //
824struct NogroupT {
825 using EmptyTrait = std::true_type;
826};
827
828// V5.2: [10.4.1] `nontemporal` clause
829template <typename T, typename I, typename E> //
832 using WrapperTrait = std::true_type;
834};
835
836// V5.2: [8.3.1] `assumption` clauses
837template <typename T, typename I, typename E> //
838struct NoOpenmpT {
839 using EmptyTrait = std::true_type;
840};
841
842// V5.2: [8.3.1] `assumption` clauses
843template <typename T, typename I, typename E> //
845 using EmptyTrait = std::true_type;
846};
847
848// V5.2: [8.3.1] `assumption` clauses
849template <typename T, typename I, typename E> //
851 using EmptyTrait = std::true_type;
852};
853
854// V5.2: [7.7.1] `branch` clauses
855template <typename T, typename I, typename E> //
857 using EmptyTrait = std::true_type;
858};
859
860// V5.2: [7.6.1] `novariants` clause
861template <typename T, typename I, typename E> //
864 using WrapperTrait = std::true_type;
866};
867
868// V5.2: [15.6] `nowait` clause
869template <typename T, typename I, typename E> //
870struct NowaitT {
871 using EmptyTrait = std::true_type;
872};
873
874// V5.2: [12.6.2] `num_tasks` clause
875template <typename T, typename I, typename E> //
876struct NumTasksT {
877 using NumTasks = E;
878 ENUM(Prescriptiveness, Strict);
879 using TupleTrait = std::true_type;
880 std::tuple<OPT(Prescriptiveness), NumTasks> t;
881};
882
883// V5.2: [10.2.1] `num_teams` clause
884template <typename T, typename I, typename E> //
885struct NumTeamsT {
886 using TupleTrait = std::true_type;
887 using LowerBound = E;
888 using UpperBound = E;
889 std::tuple<OPT(LowerBound), UpperBound> t;
890};
891
892// V5.2: [10.1.2] `num_threads` clause
893template <typename T, typename I, typename E> //
895 using Nthreads = E;
896 using WrapperTrait = std::true_type;
898};
899
900template <typename T, typename I, typename E> //
902 using EmptyTrait = std::true_type;
903};
904
905template <typename T, typename I, typename E> //
906struct OmpxBareT {
907 using EmptyTrait = std::true_type;
908};
909
910template <typename T, typename I, typename E> //
912 using WrapperTrait = std::true_type;
914};
915
916// V5.2: [10.3] `order` clause
917template <typename T, typename I, typename E> //
918struct OrderT {
919 ENUM(OrderModifier, Reproducible, Unconstrained);
920 ENUM(Ordering, Concurrent);
921 using TupleTrait = std::true_type;
922 std::tuple<OPT(OrderModifier), Ordering> t;
923};
924
925// V5.2: [4.4.4] `ordered` clause
926template <typename T, typename I, typename E> //
927struct OrderedT {
928 using N = E;
929 using WrapperTrait = std::true_type;
930 OPT(N) v;
931};
932
933// V5.2: [7.4.2] `otherwise` clause
934template <typename T, typename I, typename E> //
936 using IncompleteTrait = std::true_type;
937};
938
939// V5.2: [9.2.2] `partial` clause
940template <typename T, typename I, typename E> //
941struct PartialT {
943 using WrapperTrait = std::true_type;
945};
946
947// V5.2: [12.4] `priority` clause
948template <typename T, typename I, typename E> //
949struct PriorityT {
951 using WrapperTrait = std::true_type;
953};
954
955// V5.2: [5.4.3] `private` clause
956template <typename T, typename I, typename E> //
957struct PrivateT {
959 using WrapperTrait = std::true_type;
961};
962
963// V5.2: [10.1.4] `proc_bind` clause
964template <typename T, typename I, typename E> //
965struct ProcBindT {
966 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
967 using WrapperTrait = std::true_type;
968 AffinityPolicy v;
969};
970
971// V5.2: [15.8.2] Atomic clauses
972template <typename T, typename I, typename E> //
973struct ReadT {
974 using EmptyTrait = std::true_type;
975};
976
977// V5.2: [5.5.8] `reduction` clause
978template <typename T, typename I, typename E> //
981 // See note at the definition of the ReductionIdentifierT type.
982 // The name ReductionIdentifiers is not a spec name.
984 ENUM(ReductionModifier, Default, Inscan, Task);
985 using TupleTrait = std::true_type;
986 std::tuple<OPT(ReductionModifier), ReductionIdentifiers, List> t;
987};
988
989// V5.2: [15.8.1] `memory-order` clauses
990template <typename T, typename I, typename E> //
991struct RelaxedT {
992 using EmptyTrait = std::true_type;
993};
994
995// V5.2: [15.8.1] `memory-order` clauses
996template <typename T, typename I, typename E> //
997struct ReleaseT {
998 using EmptyTrait = std::true_type;
999};
1000
1001// V5.2: [8.2.1] `requirement` clauses
1002template <typename T, typename I, typename E> //
1004 using EmptyTrait = std::true_type;
1005};
1006
1007// V5.2: [10.4.2] `safelen` clause
1008template <typename T, typename I, typename E> //
1009struct SafelenT {
1010 using Length = E;
1011 using WrapperTrait = std::true_type;
1013};
1014
1015// V5.2: [11.5.3] `schedule` clause
1016template <typename T, typename I, typename E> //
1018 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1019 using ChunkSize = E;
1020 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1021 ENUM(ChunkModifier, Simd);
1022 using TupleTrait = std::true_type;
1023 std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t;
1024};
1025
1026// V5.2: [15.8.1] Memory-order clauses
1027template <typename T, typename I, typename E> //
1028struct SeqCstT {
1029 using EmptyTrait = std::true_type;
1030};
1031
1032// V5.2: [8.5.1] `severity` clause
1033template <typename T, typename I, typename E> //
1035 ENUM(SevLevel, Fatal, Warning);
1036 using WrapperTrait = std::true_type;
1037 SevLevel v;
1038};
1039
1040// V5.2: [5.4.2] `shared` clause
1041template <typename T, typename I, typename E> //
1042struct SharedT {
1044 using WrapperTrait = std::true_type;
1046};
1047
1048// V5.2: [15.10.3] `parallelization-level` clauses
1049template <typename T, typename I, typename E> //
1050struct SimdT {
1051 using EmptyTrait = std::true_type;
1052};
1053
1054// V5.2: [10.4.3] `simdlen` clause
1055template <typename T, typename I, typename E> //
1056struct SimdlenT {
1057 using Length = E;
1058 using WrapperTrait = std::true_type;
1060};
1061
1062// V5.2: [9.1.1] `sizes` clause
1063template <typename T, typename I, typename E> //
1064struct SizesT {
1066 using WrapperTrait = std::true_type;
1068};
1069
1070// V5.2: [5.5.9] `task_reduction` clause
1071template <typename T, typename I, typename E> //
1074 // See note at the definition of the ReductionIdentifierT type.
1075 // The name ReductionIdentifiers is not a spec name.
1077 using TupleTrait = std::true_type;
1078 std::tuple<ReductionIdentifiers, List> t;
1079};
1080
1081// V5.2: [13.3] `thread_limit` clause
1082template <typename T, typename I, typename E> //
1084 using Threadlim = E;
1085 using WrapperTrait = std::true_type;
1087};
1088
1089// V5.2: [15.10.3] `parallelization-level` clauses
1090template <typename T, typename I, typename E> //
1091struct ThreadsT {
1092 using EmptyTrait = std::true_type;
1093};
1094
1095// V5.2: [5.9.1] `to` clause
1096template <typename T, typename I, typename E> //
1097struct ToT {
1099 using Expectation = type::MotionExpectation;
1100 // See note at the definition of the MapperT type.
1101 using Mappers = ListT<type::MapperT<I, E>>; // Not a spec name
1103
1104 using TupleTrait = std::true_type;
1106};
1107
1108// V5.2: [8.2.1] `requirement` clauses
1109template <typename T, typename I, typename E> //
1111 using EmptyTrait = std::true_type;
1112};
1113
1114// V5.2: [8.2.1] `requirement` clauses
1115template <typename T, typename I, typename E> //
1117 using EmptyTrait = std::true_type;
1118};
1119
1120// V5.2: [5.10] `uniform` clause
1121template <typename T, typename I, typename E> //
1122struct UniformT {
1124 using WrapperTrait = std::true_type;
1126};
1127
1128template <typename T, typename I, typename E> //
1129struct UnknownT {
1130 using EmptyTrait = std::true_type;
1131};
1132
1133// V5.2: [12.1] `untied` clause
1134template <typename T, typename I, typename E> //
1135struct UntiedT {
1136 using EmptyTrait = std::true_type;
1137};
1138
1139// Both of the following
1140// V5.2: [15.8.2] `atomic` clauses
1141// V5.2: [15.9.3] `update` clause
1142template <typename T, typename I, typename E> //
1143struct UpdateT {
1144 using TaskDependenceType = tomp::type::TaskDependenceType;
1145 using WrapperTrait = std::true_type;
1147};
1148
1149// V5.2: [14.1.3] `use` clause
1150template <typename T, typename I, typename E> //
1151struct UseT {
1153 using WrapperTrait = std::true_type;
1155};
1156
1157// V5.2: [5.4.10] `use_device_addr` clause
1158template <typename T, typename I, typename E> //
1161 using WrapperTrait = std::true_type;
1163};
1164
1165// V5.2: [5.4.8] `use_device_ptr` clause
1166template <typename T, typename I, typename E> //
1169 using WrapperTrait = std::true_type;
1171};
1172
1173// V5.2: [6.8] `uses_allocators` clause
1174template <typename T, typename I, typename E> //
1176 using MemSpace = E;
1178 using Allocator = E;
1179 struct AllocatorSpec { // Not a spec name
1180 using TupleTrait = std::true_type;
1182 };
1183 using Allocators = ListT<AllocatorSpec>; // Not a spec name
1184 using WrapperTrait = std::true_type;
1186};
1187
1188// V5.2: [15.8.3] `extended-atomic` clauses
1189template <typename T, typename I, typename E> //
1190struct WeakT {
1191 using EmptyTrait = std::true_type;
1192};
1193
1194// V5.2: [7.4.1] `when` clause
1195template <typename T, typename I, typename E> //
1196struct WhenT {
1197 using IncompleteTrait = std::true_type;
1198};
1199
1200// V5.2: [15.8.2] Atomic clauses
1201template <typename T, typename I, typename E> //
1202struct WriteT {
1203 using EmptyTrait = std::true_type;
1204};
1205
1206// ---
1207
1208template <typename T, typename I, typename E>
1210 std::variant<OmpxAttributeT<T, I, E>, OmpxBareT<T, I, E>,
1212
1213template <typename T, typename I, typename E>
1214using EmptyClausesT = std::variant<
1224
1225template <typename T, typename I, typename E>
1227 std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, MatchT<T, I, E>,
1229
1230template <typename T, typename I, typename E>
1232 std::variant<AffinityT<T, I, E>, AlignedT<T, I, E>, AllocateT<T, I, E>,
1239
1240template <typename T, typename I, typename E>
1241using UnionClausesT = std::variant<DependT<T, I, E>>;
1242
1243template <typename T, typename I, typename E>
1244using WrapperClausesT = std::variant<
1261
1262template <typename T, typename I, typename E>
1270 >::type;
1271} // namespace clause
1272
1273using type::operator==;
1274
1275// The variant wrapper that encapsulates all possible specific clauses.
1276// The `Extras` arguments are additional types representing local extensions
1277// to the clause set, e.g.
1278//
1279// using Clause = ClauseT<Type, Id, Expr,
1280// MyClause1, MyClause2>;
1281//
1282// The member Clause::u will be a variant containing all specific clauses
1283// defined above, plus MyClause1 and MyClause2.
1284//
1285// Note: Any derived class must be constructible from the base class
1286// ClauseT<...>.
1287template <typename TypeType, typename IdType, typename ExprType,
1288 typename... Extras>
1289struct ClauseT {
1290 using TypeTy = TypeType;
1291 using IdTy = IdType;
1292 using ExprTy = ExprType;
1293
1294 // Type of "self" to specify this type given a derived class type.
1295 using BaseT = ClauseT<TypeType, IdType, ExprType, Extras...>;
1296
1297 using VariantTy = typename type::Union<
1299 std::variant<Extras...>>::type;
1300
1301 llvm::omp::Clause id; // The numeric id of the clause
1302 using UnionTrait = std::true_type;
1304};
1305
1306template <typename ClauseType> struct DirectiveWithClauses {
1307 llvm::omp::Directive id = llvm::omp::Directive::OMPD_unknown;
1309};
1310
1311} // namespace tomp
1312
1313#undef OPT
1314#undef ENUM
1315
1316#endif // LLVM_FRONTEND_OPENMP_CLAUSET_H
BlockVerifier::State From
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define ENUM(Name,...)
Definition: ClauseT.h:61
#define OPT(x)
Definition: ClauseT.h:62
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
@ Default
Definition: DwarfDebug.cpp:87
#define T
uint64_t Thread
Definition: Profile.cpp:48
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[]
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:1928
typename llvm::remove_cvref< T >::type remove_cvref_t
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
std::variant< DependT< T, I, E > > UnionClausesT
Definition: ClauseT.h:1241
std::variant< AcqRelT< T, I, E >, AcquireT< T, I, E >, CaptureT< T, I, E >, CompareT< T, I, E >, DynamicAllocatorsT< T, I, E >, FullT< T, I, E >, InbranchT< T, I, E >, MergeableT< T, I, E >, NogroupT< 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 >, ReverseOffloadT< T, I, E >, SeqCstT< T, I, E >, SimdT< T, I, E >, ThreadsT< T, I, E >, UnifiedAddressT< T, I, E >, UnifiedSharedMemoryT< 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:1223
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:1270
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 >, DeviceTypeT< 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 >, SafelenT< T, I, E >, SeverityT< T, I, E >, SharedT< T, I, E >, SimdlenT< T, I, E >, SizesT< T, I, E >, ThreadLimitT< 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:1260
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
Definition: ClauseT.h:1211
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, MatchT< T, I, E >, OtherwiseT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
Definition: ClauseT.h:1228
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 >, 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 >, 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:1238
llvm::omp::Directive DirectiveName
Definition: ClauseT.h:189
Definition: ClauseT.h:133
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
Definition: ClauseT.h:313
#define EQ(a, b)
Definition: regexec.c:112
static constexpr bool value
Definition: ClauseT.h:115
IdType IdTy
Definition: ClauseT.h:1291
std::true_type UnionTrait
Definition: ClauseT.h:1302
ExprType ExprTy
Definition: ClauseT.h:1292
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
Definition: ClauseT.h:1299
VariantTy u
Definition: ClauseT.h:1303
llvm::omp::Clause id
Definition: ClauseT.h:1301
TypeType TypeTy
Definition: ClauseT.h:1290
tomp::type::ListT< ClauseType > clauses
Definition: ClauseT.h:1308
std::true_type WrapperTrait
Definition: ClauseT.h:326
std::true_type EmptyTrait
Definition: ClauseT.h:333
std::true_type EmptyTrait
Definition: ClauseT.h:339
std::true_type IncompleteTrait
Definition: ClauseT.h:345
std::tuple< OPT(Iterator), LocatorList > t
Definition: ClauseT.h:355
std::true_type TupleTrait
Definition: ClauseT.h:354
std::true_type WrapperTrait
Definition: ClauseT.h:363
std::tuple< OPT(Alignment), List > t
Definition: ClauseT.h:374
std::true_type TupleTrait
Definition: ClauseT.h:373
std::true_type TupleTrait
Definition: ClauseT.h:388
std::tuple< OPT(AllocatorSimpleModifier), OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
Definition: ClauseT.h:391
std::true_type WrapperTrait
Definition: ClauseT.h:398
std::true_type IncompleteTrait
Definition: ClauseT.h:405
ActionTime v
Definition: ClauseT.h:413
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
Definition: ClauseT.h:412
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
Definition: ClauseT.h:428
std::true_type EmptyTrait
Definition: ClauseT.h:435
std::true_type WrapperTrait
Definition: ClauseT.h:442
std::true_type EmptyTrait
Definition: ClauseT.h:449
std::true_type WrapperTrait
Definition: ClauseT.h:456
std::true_type WrapperTrait
Definition: ClauseT.h:464
std::true_type WrapperTrait
Definition: ClauseT.h:472
DataSharingAttribute v
Definition: ClauseT.h:481
std::true_type WrapperTrait
Definition: ClauseT.h:480
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(VariableCategory, Scalar, Aggregate, Pointer, Allocatable)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
Definition: ClauseT.h:491
std::true_type TupleTrait
Definition: ClauseT.h:490
std::tuple< TaskDependenceType, OPT(Iterator), LocatorList > t
Definition: ClauseT.h:507
std::true_type UnionTrait
Definition: ClauseT.h:511
tomp::type::TaskDependenceType TaskDependenceType
Definition: ClauseT.h:502
std::variant< Doacross, WithLocators > u
Definition: ClauseT.h:512
std::true_type WrapperTrait
Definition: ClauseT.h:519
EventHandle v
Definition: ClauseT.h:529
std::true_type WrapperTrait
Definition: ClauseT.h:528
std::tuple< OPT(DeviceModifier), DeviceDescription > t
Definition: ClauseT.h:538
std::true_type TupleTrait
Definition: ClauseT.h:537
ENUM(DeviceModifier, Ancestor, DeviceNum)
DeviceTypeDescription v
Definition: ClauseT.h:546
std::true_type WrapperTrait
Definition: ClauseT.h:545
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
Definition: ClauseT.h:555
std::true_type TupleTrait
Definition: ClauseT.h:554
std::true_type TupleTrait
Definition: ClauseT.h:563
std::tuple< DependenceType, Vector > t
Definition: ClauseT.h:565
ENUM(DependenceType, Source, Sink)
std::true_type WrapperTrait
Definition: ClauseT.h:578
std::true_type WrapperTrait
Definition: ClauseT.h:585
MemoryOrder v
Definition: ClauseT.h:595
std::true_type WrapperTrait
Definition: ClauseT.h:594
type::MemoryOrder MemoryOrder
Definition: ClauseT.h:593
std::true_type WrapperTrait
Definition: ClauseT.h:602
std::true_type WrapperTrait
Definition: ClauseT.h:610
std::true_type WrapperTrait
Definition: ClauseT.h:618
std::true_type TupleTrait
Definition: ClauseT.h:631
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:632
type::MotionExpectation Expectation
Definition: ClauseT.h:626
std::true_type EmptyTrait
Definition: ClauseT.h:638
std::true_type TupleTrait
Definition: ClauseT.h:646
ENUM(Prescriptiveness, Strict)
std::tuple< OPT(Prescriptiveness), GrainSize > t
Definition: ClauseT.h:647
std::true_type WrapperTrait
Definition: ClauseT.h:654
std::true_type WrapperTrait
Definition: ClauseT.h:662
std::true_type WrapperTrait
Definition: ClauseT.h:669
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
Definition: ClauseT.h:679
std::true_type TupleTrait
Definition: ClauseT.h:678
type::DirectiveName DirectiveNameModifier
Definition: ClauseT.h:676
std::tuple< ReductionIdentifiers, List > t
Definition: ClauseT.h:733
std::true_type TupleTrait
Definition: ClauseT.h:732
std::true_type EmptyTrait
Definition: ClauseT.h:685
std::true_type WrapperTrait
Definition: ClauseT.h:692
std::true_type WrapperTrait
Definition: ClauseT.h:700
InvokedByFptr v
Definition: ClauseT.h:701
ListT< InteropType > InteropTypes
Definition: ClauseT.h:711
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
Definition: ClauseT.h:714
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
Definition: ClauseT.h:713
InitializerExpr v
Definition: ClauseT.h:722
std::true_type WrapperTrait
Definition: ClauseT.h:721
std::true_type WrapperTrait
Definition: ClauseT.h:740
std::tuple< OPT(LastprivateModifier), List > t
Definition: ClauseT.h:750
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
Definition: ClauseT.h:749
std::true_type TupleTrait
Definition: ClauseT.h:762
ENUM(LinearModifier, Ref, Val, Uval)
std::tuple< OPT(StepSimpleModifier), OPT(StepComplexModifier), OPT(LinearModifier), List > t
Definition: ClauseT.h:766
std::true_type WrapperTrait
Definition: ClauseT.h:773
ENUM(MapTypeModifier, Always, Close, Present, OmpxHold)
ENUM(MapType, To, From, Tofrom, Alloc, Release, Delete)
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:791
std::true_type TupleTrait
Definition: ClauseT.h:788
std::true_type IncompleteTrait
Definition: ClauseT.h:797
std::true_type EmptyTrait
Definition: ClauseT.h:803
std::true_type WrapperTrait
Definition: ClauseT.h:810
std::true_type EmptyTrait
Definition: ClauseT.h:839
std::true_type EmptyTrait
Definition: ClauseT.h:851
std::true_type WrapperTrait
Definition: ClauseT.h:818
DoNotUpdateContext v
Definition: ClauseT.h:819
std::true_type EmptyTrait
Definition: ClauseT.h:825
std::true_type WrapperTrait
Definition: ClauseT.h:832
std::true_type EmptyTrait
Definition: ClauseT.h:857
std::true_type WrapperTrait
Definition: ClauseT.h:864
DoNotUseVariant v
Definition: ClauseT.h:865
std::true_type EmptyTrait
Definition: ClauseT.h:871
std::tuple< OPT(Prescriptiveness), NumTasks > t
Definition: ClauseT.h:880
ENUM(Prescriptiveness, Strict)
std::true_type TupleTrait
Definition: ClauseT.h:879
std::true_type TupleTrait
Definition: ClauseT.h:886
std::tuple< OPT(LowerBound), UpperBound > t
Definition: ClauseT.h:889
std::true_type WrapperTrait
Definition: ClauseT.h:896
std::true_type EmptyTrait
Definition: ClauseT.h:902
std::true_type EmptyTrait
Definition: ClauseT.h:907
std::true_type WrapperTrait
Definition: ClauseT.h:912
std::tuple< OPT(OrderModifier), Ordering > t
Definition: ClauseT.h:922
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
Definition: ClauseT.h:921
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
Definition: ClauseT.h:929
std::true_type IncompleteTrait
Definition: ClauseT.h:936
std::true_type WrapperTrait
Definition: ClauseT.h:943
OPT(UnrollFactor) v
std::true_type WrapperTrait
Definition: ClauseT.h:951
PriorityValue v
Definition: ClauseT.h:952
std::true_type WrapperTrait
Definition: ClauseT.h:959
AffinityPolicy v
Definition: ClauseT.h:968
std::true_type WrapperTrait
Definition: ClauseT.h:967
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
Definition: ClauseT.h:974
std::true_type TupleTrait
Definition: ClauseT.h:985
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
Definition: ClauseT.h:986
ENUM(ReductionModifier, Default, Inscan, Task)
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
Definition: ClauseT.h:983
std::true_type EmptyTrait
Definition: ClauseT.h:992
std::true_type EmptyTrait
Definition: ClauseT.h:998
std::true_type EmptyTrait
Definition: ClauseT.h:1004
std::true_type WrapperTrait
Definition: ClauseT.h:1011
std::true_type TupleTrait
Definition: ClauseT.h:1022
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
Definition: ClauseT.h:1023
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type EmptyTrait
Definition: ClauseT.h:1029
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
Definition: ClauseT.h:1036
std::true_type WrapperTrait
Definition: ClauseT.h:1044
std::true_type EmptyTrait
Definition: ClauseT.h:1051
std::true_type WrapperTrait
Definition: ClauseT.h:1058
std::true_type WrapperTrait
Definition: ClauseT.h:1066
std::true_type TupleTrait
Definition: ClauseT.h:1077
std::tuple< ReductionIdentifiers, List > t
Definition: ClauseT.h:1078
std::true_type WrapperTrait
Definition: ClauseT.h:1085
std::true_type EmptyTrait
Definition: ClauseT.h:1092
std::true_type TupleTrait
Definition: ClauseT.h:1104
type::MotionExpectation Expectation
Definition: ClauseT.h:1099
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
Definition: ClauseT.h:1105
std::true_type EmptyTrait
Definition: ClauseT.h:1111
std::true_type WrapperTrait
Definition: ClauseT.h:1124
ParameterList v
Definition: ClauseT.h:1125
std::true_type EmptyTrait
Definition: ClauseT.h:1130
std::true_type EmptyTrait
Definition: ClauseT.h:1136
std::true_type WrapperTrait
Definition: ClauseT.h:1145
OPT(TaskDependenceType) v
tomp::type::TaskDependenceType TaskDependenceType
Definition: ClauseT.h:1144
std::true_type WrapperTrait
Definition: ClauseT.h:1161
std::true_type WrapperTrait
Definition: ClauseT.h:1169
InteropVar v
Definition: ClauseT.h:1154
std::true_type WrapperTrait
Definition: ClauseT.h:1153
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
Definition: ClauseT.h:1181
std::true_type WrapperTrait
Definition: ClauseT.h:1184
std::true_type EmptyTrait
Definition: ClauseT.h:1191
std::true_type IncompleteTrait
Definition: ClauseT.h:1197
std::true_type EmptyTrait
Definition: ClauseT.h:1203
std::true_type UnionTrait
Definition: ClauseT.h:199
std::variant< DefinedOpName, IntrinsicOperator > u
Definition: ClauseT.h:200
ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT, LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max)
std::true_type TupleTrait
Definition: ClauseT.h:215
std::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
Definition: ClauseT.h:216
std::tuple< DefinedOperatorT< I, E >, E > t
Definition: ClauseT.h:246
std::tuple< ObjectT< I, E >, OPT(Distance)> t
Definition: ClauseT.h:249
std::true_type TupleTrait
Definition: ClauseT.h:248
MapperIdentifier v
Definition: ClauseT.h:232
std::true_type WrapperTrait
Definition: ClauseT.h:231
std::true_type TupleTrait
Definition: ClauseT.h:207
std::tuple< E, E, OPT(E)> t
Definition: ClauseT.h:208
std::variant< DefinedOperatorT< I, E >, ProcedureDesignatorT< I, E > > u
Definition: ClauseT.h:268
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type
Definition: ClauseT.h:148
std::variant<> type
Definition: ClauseT.h:142