File tree Expand file tree Collapse file tree 7 files changed +33
-16
lines changed
openmp/libomptarget/deviceRTLs Expand file tree Collapse file tree 7 files changed +33
-16
lines changed Original file line number Diff line number Diff line change 16
16
#ifndef _INTERFACES_H_
17
17
#define _INTERFACES_H_
18
18
19
+ #include <stddef.h>
19
20
#include <stdint.h>
20
21
21
22
#ifdef __CUDACC__
Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
- #include " omptarget-nvptx.h"
13
+ #include " interface.h"
14
+ #include " debug.h"
14
15
15
16
EXTERN int32_t __kmpc_cancellationpoint (kmp_Ident *loc, int32_t global_tid,
16
17
int32_t cancelVal) {
Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
- #include < stdio.h>
14
-
15
- #include " omptarget-nvptx.h"
13
+ #include " interface.h"
14
+ #include " debug.h"
16
15
17
16
EXTERN
18
17
void __kmpc_critical (kmp_Ident *loc, int32_t global_tid,
Original file line number Diff line number Diff line change 28
28
#ifndef _OMPTARGET_NVPTX_DEBUG_H_
29
29
#define _OMPTARGET_NVPTX_DEBUG_H_
30
30
31
+ #include " device_environment.h"
32
+
31
33
// //////////////////////////////////////////////////////////////////////////////
32
34
// set desired level of debugging
33
35
// //////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change
1
+ //===---- device_environment.h - OpenMP GPU device environment --- CUDA -*-===//
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
+ //
9
+ // Global device environment
10
+ //
11
+ //===----------------------------------------------------------------------===//
12
+
13
+ #ifndef _OMPTARGET_DEVICE_ENVIRONMENT_H_
14
+ #define _OMPTARGET_DEVICE_ENVIRONMENT_H_
15
+
16
+ #include "target_impl.h"
17
+
18
+ struct omptarget_device_environmentTy {
19
+ int32_t debug_level ;
20
+ };
21
+
22
+ extern __device__ omptarget_device_environmentTy omptarget_device_environment ;
23
+
24
+ #endif
Original file line number Diff line number Diff line change 11
11
// ===----------------------------------------------------------------------===//
12
12
13
13
#include " omptarget-nvptx.h"
14
+ #include " device_environment.h"
14
15
15
16
// //////////////////////////////////////////////////////////////////////////////
16
- // global device envrionment
17
+ // global device environment
17
18
// //////////////////////////////////////////////////////////////////////////////
18
19
19
20
__device__ omptarget_device_environmentTy omptarget_device_environment;
Original file line number Diff line number Diff line change @@ -324,11 +324,6 @@ class omptarget_nvptx_ThreadPrivateContext {
324
324
uint64_t cnt;
325
325
};
326
326
327
- // / Device envrionment data
328
- struct omptarget_device_environmentTy {
329
- int32_t debug_level;
330
- };
331
-
332
327
// / Memory manager for statically allocated memory.
333
328
class omptarget_nvptx_SimpleMemoryManager {
334
329
private:
@@ -345,12 +340,6 @@ class omptarget_nvptx_SimpleMemoryManager {
345
340
INLINE const void *Acquire (const void *buf, size_t size);
346
341
};
347
342
348
- // //////////////////////////////////////////////////////////////////////////////
349
- // global device envrionment
350
- // //////////////////////////////////////////////////////////////////////////////
351
-
352
- extern __device__ omptarget_device_environmentTy omptarget_device_environment;
353
-
354
343
// //////////////////////////////////////////////////////////////////////////////
355
344
356
345
// //////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments