summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/libomptarget')
-rw-r--r--openmp/libomptarget/deviceRTLs/interface.h1
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu3
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/critical.cu5
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/debug.h2
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/device_environment.h24
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu3
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h11
7 files changed, 33 insertions, 16 deletions
diff --git a/openmp/libomptarget/deviceRTLs/interface.h b/openmp/libomptarget/deviceRTLs/interface.h
index 0f0f43ebb19..d0b2d1763fd 100644
--- a/openmp/libomptarget/deviceRTLs/interface.h
+++ b/openmp/libomptarget/deviceRTLs/interface.h
@@ -16,6 +16,7 @@
#ifndef _INTERFACES_H_
#define _INTERFACES_H_
+#include <stddef.h>
#include <stdint.h>
#ifdef __CUDACC__
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu
index bffe1b7e32b..99dea1fadcb 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu
@@ -10,7 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#include "omptarget-nvptx.h"
+#include "interface.h"
+#include "debug.h"
EXTERN int32_t __kmpc_cancellationpoint(kmp_Ident *loc, int32_t global_tid,
int32_t cancelVal) {
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/critical.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/critical.cu
index 2eb94f5cb6f..d8cfb47b876 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/critical.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/critical.cu
@@ -10,9 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-#include "omptarget-nvptx.h"
+#include "interface.h"
+#include "debug.h"
EXTERN
void __kmpc_critical(kmp_Ident *loc, int32_t global_tid,
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h b/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
index a2f1d37fdad..1052392155a 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
@@ -28,6 +28,8 @@
#ifndef _OMPTARGET_NVPTX_DEBUG_H_
#define _OMPTARGET_NVPTX_DEBUG_H_
+#include "device_environment.h"
+
////////////////////////////////////////////////////////////////////////////////
// set desired level of debugging
////////////////////////////////////////////////////////////////////////////////
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/device_environment.h b/openmp/libomptarget/deviceRTLs/nvptx/src/device_environment.h
new file mode 100644
index 00000000000..b2f65af354a
--- /dev/null
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/device_environment.h
@@ -0,0 +1,24 @@
+//===---- device_environment.h - OpenMP GPU device environment --- CUDA -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Global device environment
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _OMPTARGET_DEVICE_ENVIRONMENT_H_
+#define _OMPTARGET_DEVICE_ENVIRONMENT_H_
+
+#include "target_impl.h"
+
+struct omptarget_device_environmentTy {
+ int32_t debug_level;
+};
+
+extern __device__ omptarget_device_environmentTy omptarget_device_environment;
+
+#endif
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
index d369da1cb7e..181bceb3e17 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
@@ -11,9 +11,10 @@
//===----------------------------------------------------------------------===//
#include "omptarget-nvptx.h"
+#include "device_environment.h"
////////////////////////////////////////////////////////////////////////////////
-// global device envrionment
+// global device environment
////////////////////////////////////////////////////////////////////////////////
__device__ omptarget_device_environmentTy omptarget_device_environment;
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
index 5006aa4a6cc..986150402f1 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
@@ -324,11 +324,6 @@ private:
uint64_t cnt;
};
-/// Device envrionment data
-struct omptarget_device_environmentTy {
- int32_t debug_level;
-};
-
/// Memory manager for statically allocated memory.
class omptarget_nvptx_SimpleMemoryManager {
private:
@@ -346,12 +341,6 @@ public:
};
////////////////////////////////////////////////////////////////////////////////
-// global device envrionment
-////////////////////////////////////////////////////////////////////////////////
-
-extern __device__ omptarget_device_environmentTy omptarget_device_environment;
-
-////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// global data tables
OpenPOWER on IntegriCloud