Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
#ifndef LLVM_OpenACC_INC
2
#define LLVM_OpenACC_INC
3
 
4
#include "llvm/ADT/BitmaskEnum.h"
5
 
6
namespace llvm {
7
class StringRef;
8
namespace acc {
9
 
10
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
11
 
12
enum class Directive {
13
  ACCD_atomic,
14
  ACCD_cache,
15
  ACCD_data,
16
  ACCD_declare,
17
  ACCD_enter_data,
18
  ACCD_exit_data,
19
  ACCD_host_data,
20
  ACCD_init,
21
  ACCD_kernels,
22
  ACCD_kernels_loop,
23
  ACCD_loop,
24
  ACCD_parallel,
25
  ACCD_parallel_loop,
26
  ACCD_routine,
27
  ACCD_serial,
28
  ACCD_serial_loop,
29
  ACCD_set,
30
  ACCD_shutdown,
31
  ACCD_unknown,
32
  ACCD_update,
33
  ACCD_wait,
34
};
35
 
36
static constexpr std::size_t Directive_enumSize = 21;
37
 
38
constexpr auto ACCD_atomic = llvm::acc::Directive::ACCD_atomic;
39
constexpr auto ACCD_cache = llvm::acc::Directive::ACCD_cache;
40
constexpr auto ACCD_data = llvm::acc::Directive::ACCD_data;
41
constexpr auto ACCD_declare = llvm::acc::Directive::ACCD_declare;
42
constexpr auto ACCD_enter_data = llvm::acc::Directive::ACCD_enter_data;
43
constexpr auto ACCD_exit_data = llvm::acc::Directive::ACCD_exit_data;
44
constexpr auto ACCD_host_data = llvm::acc::Directive::ACCD_host_data;
45
constexpr auto ACCD_init = llvm::acc::Directive::ACCD_init;
46
constexpr auto ACCD_kernels = llvm::acc::Directive::ACCD_kernels;
47
constexpr auto ACCD_kernels_loop = llvm::acc::Directive::ACCD_kernels_loop;
48
constexpr auto ACCD_loop = llvm::acc::Directive::ACCD_loop;
49
constexpr auto ACCD_parallel = llvm::acc::Directive::ACCD_parallel;
50
constexpr auto ACCD_parallel_loop = llvm::acc::Directive::ACCD_parallel_loop;
51
constexpr auto ACCD_routine = llvm::acc::Directive::ACCD_routine;
52
constexpr auto ACCD_serial = llvm::acc::Directive::ACCD_serial;
53
constexpr auto ACCD_serial_loop = llvm::acc::Directive::ACCD_serial_loop;
54
constexpr auto ACCD_set = llvm::acc::Directive::ACCD_set;
55
constexpr auto ACCD_shutdown = llvm::acc::Directive::ACCD_shutdown;
56
constexpr auto ACCD_unknown = llvm::acc::Directive::ACCD_unknown;
57
constexpr auto ACCD_update = llvm::acc::Directive::ACCD_update;
58
constexpr auto ACCD_wait = llvm::acc::Directive::ACCD_wait;
59
 
60
enum class Clause {
61
  ACCC_async,
62
  ACCC_attach,
63
  ACCC_auto,
64
  ACCC_bind,
65
  ACCC_capture,
66
  ACCC_collapse,
67
  ACCC_copy,
68
  ACCC_copyin,
69
  ACCC_copyout,
70
  ACCC_create,
71
  ACCC_default,
72
  ACCC_default_async,
73
  ACCC_delete,
74
  ACCC_detach,
75
  ACCC_device,
76
  ACCC_device_num,
77
  ACCC_deviceptr,
78
  ACCC_device_resident,
79
  ACCC_device_type,
80
  ACCC_finalize,
81
  ACCC_firstprivate,
82
  ACCC_gang,
83
  ACCC_host,
84
  ACCC_if,
85
  ACCC_if_present,
86
  ACCC_independent,
87
  ACCC_link,
88
  ACCC_no_create,
89
  ACCC_nohost,
90
  ACCC_num_gangs,
91
  ACCC_num_workers,
92
  ACCC_present,
93
  ACCC_private,
94
  ACCC_read,
95
  ACCC_reduction,
96
  ACCC_self,
97
  ACCC_seq,
98
  ACCC_tile,
99
  ACCC_unknown,
100
  ACCC_use_device,
101
  ACCC_vector,
102
  ACCC_vector_length,
103
  ACCC_wait,
104
  ACCC_worker,
105
  ACCC_write,
106
};
107
 
108
static constexpr std::size_t Clause_enumSize = 45;
109
 
110
constexpr auto ACCC_async = llvm::acc::Clause::ACCC_async;
111
constexpr auto ACCC_attach = llvm::acc::Clause::ACCC_attach;
112
constexpr auto ACCC_auto = llvm::acc::Clause::ACCC_auto;
113
constexpr auto ACCC_bind = llvm::acc::Clause::ACCC_bind;
114
constexpr auto ACCC_capture = llvm::acc::Clause::ACCC_capture;
115
constexpr auto ACCC_collapse = llvm::acc::Clause::ACCC_collapse;
116
constexpr auto ACCC_copy = llvm::acc::Clause::ACCC_copy;
117
constexpr auto ACCC_copyin = llvm::acc::Clause::ACCC_copyin;
118
constexpr auto ACCC_copyout = llvm::acc::Clause::ACCC_copyout;
119
constexpr auto ACCC_create = llvm::acc::Clause::ACCC_create;
120
constexpr auto ACCC_default = llvm::acc::Clause::ACCC_default;
121
constexpr auto ACCC_default_async = llvm::acc::Clause::ACCC_default_async;
122
constexpr auto ACCC_delete = llvm::acc::Clause::ACCC_delete;
123
constexpr auto ACCC_detach = llvm::acc::Clause::ACCC_detach;
124
constexpr auto ACCC_device = llvm::acc::Clause::ACCC_device;
125
constexpr auto ACCC_device_num = llvm::acc::Clause::ACCC_device_num;
126
constexpr auto ACCC_deviceptr = llvm::acc::Clause::ACCC_deviceptr;
127
constexpr auto ACCC_device_resident = llvm::acc::Clause::ACCC_device_resident;
128
constexpr auto ACCC_device_type = llvm::acc::Clause::ACCC_device_type;
129
constexpr auto ACCC_finalize = llvm::acc::Clause::ACCC_finalize;
130
constexpr auto ACCC_firstprivate = llvm::acc::Clause::ACCC_firstprivate;
131
constexpr auto ACCC_gang = llvm::acc::Clause::ACCC_gang;
132
constexpr auto ACCC_host = llvm::acc::Clause::ACCC_host;
133
constexpr auto ACCC_if = llvm::acc::Clause::ACCC_if;
134
constexpr auto ACCC_if_present = llvm::acc::Clause::ACCC_if_present;
135
constexpr auto ACCC_independent = llvm::acc::Clause::ACCC_independent;
136
constexpr auto ACCC_link = llvm::acc::Clause::ACCC_link;
137
constexpr auto ACCC_no_create = llvm::acc::Clause::ACCC_no_create;
138
constexpr auto ACCC_nohost = llvm::acc::Clause::ACCC_nohost;
139
constexpr auto ACCC_num_gangs = llvm::acc::Clause::ACCC_num_gangs;
140
constexpr auto ACCC_num_workers = llvm::acc::Clause::ACCC_num_workers;
141
constexpr auto ACCC_present = llvm::acc::Clause::ACCC_present;
142
constexpr auto ACCC_private = llvm::acc::Clause::ACCC_private;
143
constexpr auto ACCC_read = llvm::acc::Clause::ACCC_read;
144
constexpr auto ACCC_reduction = llvm::acc::Clause::ACCC_reduction;
145
constexpr auto ACCC_self = llvm::acc::Clause::ACCC_self;
146
constexpr auto ACCC_seq = llvm::acc::Clause::ACCC_seq;
147
constexpr auto ACCC_tile = llvm::acc::Clause::ACCC_tile;
148
constexpr auto ACCC_unknown = llvm::acc::Clause::ACCC_unknown;
149
constexpr auto ACCC_use_device = llvm::acc::Clause::ACCC_use_device;
150
constexpr auto ACCC_vector = llvm::acc::Clause::ACCC_vector;
151
constexpr auto ACCC_vector_length = llvm::acc::Clause::ACCC_vector_length;
152
constexpr auto ACCC_wait = llvm::acc::Clause::ACCC_wait;
153
constexpr auto ACCC_worker = llvm::acc::Clause::ACCC_worker;
154
constexpr auto ACCC_write = llvm::acc::Clause::ACCC_write;
155
 
156
enum class DefaultValue {
157
  ACC_Default_present=0,
158
  ACC_Default_none=1,
159
};
160
 
161
constexpr auto ACC_Default_present = llvm::acc::DefaultValue::ACC_Default_present;
162
constexpr auto ACC_Default_none = llvm::acc::DefaultValue::ACC_Default_none;
163
 
164
// Enumeration helper functions
165
Directive getOpenACCDirectiveKind(llvm::StringRef Str);
166
 
167
llvm::StringRef getOpenACCDirectiveName(Directive D);
168
 
169
Clause getOpenACCClauseKind(llvm::StringRef Str);
170
 
171
llvm::StringRef getOpenACCClauseName(Clause C);
172
 
173
/// Return true if \p C is a valid clause for \p D in version \p Version.
174
bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version);
175
 
176
DefaultValue getDefaultValue(StringRef);
177
llvm::StringRef getOpenACCDefaultValueName(DefaultValue);
178
 
179
} // namespace acc
180
} // namespace llvm
181
#endif // LLVM_OpenACC_INC