40 #include "util_namespace.cuh"
56 #if (defined(DEBUG) || defined(_DEBUG))
68 __host__ __device__ __forceinline__ cudaError_t
Debug(
76 #if (CUB_PTX_ARCH == 0)
77 fprintf(stderr,
"CUDA error %d [%s, %d]: %s\n", error, filename, line, cudaGetErrorString(error));
79 #elif (CUB_PTX_ARCH >= 200)
80 printf(
"CUDA error %d [block %d, thread %d, %s, %d]\n", error, blockIdx.x, threadIdx.x, filename, line);
91 #define CubDebug(e) cub::Debug((e), __FILE__, __LINE__)
97 #define CubDebugExit(e) if (cub::Debug((e), __FILE__, __LINE__)) { exit(1); }
103 #if (CUB_PTX_ARCH == 0)
104 #define CubLog(format, ...) printf(format,__VA_ARGS__);
105 #elif (CUB_PTX_ARCH >= 200)
106 #define CubLog(format, ...) printf("[block %d, thread %d]: " format, blockIdx.x, threadIdx.x, __VA_ARGS__);