summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/libomptarget/deviceRTLs/nvptx/src/debug.h')
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/debug.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h b/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
index 3388b04616f..1052392155a 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
@@ -128,12 +128,12 @@
#if OMPTARGET_NVPTX_DEBUG || OMPTARGET_NVPTX_TEST || OMPTARGET_NVPTX_WARNING
#include <stdio.h>
-#include "support.h"
+#include "target_impl.h"
template <typename... Arguments>
NOINLINE static void log(const char *fmt, Arguments... parameters) {
- printf(fmt, (int)GetBlockIdInKernel(), (int)GetThreadIdInBlock(),
- (int)GetWarpId(), (int)GetLaneId(), parameters...);
+ printf(fmt, (int)blockIdx.x, (int)threadIdx.x, (int)(threadIdx.x / WARPSIZE),
+ (int)(threadIdx.x & 0x1F), parameters...);
}
#endif
@@ -144,8 +144,9 @@ template <typename... Arguments>
NOINLINE static void check(bool cond, const char *fmt,
Arguments... parameters) {
if (!cond)
- printf(fmt, (int)GetBlockIdInKernel(), (int)GetThreadIdInBlock(),
- (int)GetWarpId(), (int)GetLaneId(), parameters...);
+ printf(fmt, (int)blockIdx.x, (int)threadIdx.x,
+ (int)(threadIdx.x / WARPSIZE), (int)(threadIdx.x & 0x1F),
+ parameters...);
assert(cond);
}
OpenPOWER on IntegriCloud