Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/debug.h
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | |||||
#define LD_CANCEL (LD_SET_CANCEL) | #define LD_CANCEL (LD_SET_CANCEL) | ||||
// pos 3 | // pos 3 | ||||
#define LD_MEM (LD_SET_MEM) | #define LD_MEM (LD_SET_MEM) | ||||
// implement | // implement | ||||
#if OMPTARGET_NVPTX_DEBUG | #if OMPTARGET_NVPTX_DEBUG | ||||
#define DON(_flag) ((OMPTARGET_NVPTX_DEBUG) & (_flag)) | #define DON(_flag) ((unsigned)(OMPTARGET_NVPTX_DEBUG) & (_flag)) | ||||
#define PRINT0(_flag, _str) \ | #define PRINT0(_flag, _str) \ | ||||
{ \ | { \ | ||||
if (DON(_flag)) { \ | if (DON(_flag)) { \ | ||||
printf("<b %2d, t %4d, w %2d, l %2d>: " _str, blockIdx.x, threadIdx.x, \ | printf("<b %2d, t %4d, w %2d, l %2d>: " _str, blockIdx.x, threadIdx.x, \ | ||||
threadIdx.x / WARPSIZE, threadIdx.x & 0x1F); \ | threadIdx.x / WARPSIZE, threadIdx.x & 0x1F); \ | ||||
} \ | } \ | ||||
} | } | ||||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |