12
12
#ifndef OMPTARGET_TYPES_H
13
13
#define OMPTARGET_TYPES_H
14
14
15
+ #include " DevRTLExtras.h"
16
+
15
17
// Tell the compiler that we do not have any "call-like" inline assembly in the
16
18
// device rutime. That means we cannot have inline assembly which will call
17
19
// another function but only inline assembly that performs some operation or
@@ -178,21 +180,6 @@ using ListGlobalFnTy = void (*)(void *buffer, int idx, void *reduce_data);
178
180
// /{
179
181
180
182
// Follows the pattern in interface.h
181
- // Same definitions as in host runtime
182
- // TODO: move these definitions to a common
183
- // place between host and device runtimes (e.g. in LLVM)
184
- typedef enum omp_memspace_handle_t {
185
- omp_default_mem_space = 0 ,
186
- omp_large_cap_mem_space = 1 ,
187
- omp_const_mem_space = 2 ,
188
- omp_high_bw_mem_space = 3 ,
189
- omp_low_lat_mem_space = 4 ,
190
- llvm_omp_target_host_mem_space = 100 ,
191
- llvm_omp_target_shared_mem_space = 101 ,
192
- llvm_omp_target_device_mem_space = 102 ,
193
- KMP_MEMSPACE_MAX_HANDLE = ~(0u )
194
- } omp_memspace_handle_t ;
195
-
196
183
typedef enum omp_allocator_handle_t {
197
184
omp_null_allocator = 0 ,
198
185
omp_default_mem_alloc = 1 ,
@@ -206,45 +193,6 @@ typedef enum omp_allocator_handle_t {
206
193
KMP_ALLOCATOR_MAX_HANDLE = ~(0U )
207
194
} omp_allocator_handle_t ;
208
195
209
- typedef enum {
210
- omp_atk_sync_hint = 1 ,
211
- omp_atk_alignment = 2 ,
212
- omp_atk_access = 3 ,
213
- omp_atk_pool_size = 4 ,
214
- omp_atk_fallback = 5 ,
215
- omp_atk_fb_data = 6 ,
216
- omp_atk_pinned = 7 ,
217
- omp_atk_partition = 8
218
- } omp_alloctrait_key_t ;
219
-
220
- typedef enum {
221
- omp_atv_false = 0 ,
222
- omp_atv_true = 1 ,
223
- omp_atv_contended = 3 ,
224
- omp_atv_uncontended = 4 ,
225
- omp_atv_serialized = 5 ,
226
- omp_atv_sequential = omp_atv_serialized, // (deprecated)
227
- omp_atv_private = 6 ,
228
- omp_atv_all = 7 ,
229
- omp_atv_thread = 8 ,
230
- omp_atv_pteam = 9 ,
231
- omp_atv_cgroup = 10 ,
232
- omp_atv_default_mem_fb = 11 ,
233
- omp_atv_null_fb = 12 ,
234
- omp_atv_abort_fb = 13 ,
235
- omp_atv_allocator_fb = 14 ,
236
- omp_atv_environment = 15 ,
237
- omp_atv_nearest = 16 ,
238
- omp_atv_blocked = 17 ,
239
- omp_atv_interleaved = 18
240
- } omp_alloctrait_value_t ;
241
- #define omp_atv_default ((uintptr_t )-1 )
242
-
243
- typedef struct {
244
- omp_alloctrait_key_t key;
245
- uintptr_t value;
246
- } omp_alloctrait_t ;
247
-
248
196
#define __PRAGMA (STR ) _Pragma (#STR)
249
197
#define OMP_PRAGMA (STR ) __PRAGMA(omp STR)
250
198
@@ -262,13 +210,6 @@ typedef struct {
262
210
#define CONSTANT (NAME ) \
263
211
[[clang::address_space(4 )]] NAME [[clang::loader_uninitialized]]
264
212
265
- // Attribute to keep alive certain definition for the bitcode library.
266
- #ifdef LIBOMPTARGET_BC_TARGET
267
- #define KEEP_ALIVE __attribute__ ((used, retain))
268
- #else
269
- #define KEEP_ALIVE
270
- #endif
271
-
272
213
// /}
273
214
274
215
#endif
0 commit comments