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