Introduce gpu_assert for assertion in device-code, and disable them with clang-cuda.

This commit is contained in:
Gael Guennebaud
2018-07-13 16:04:27 +02:00
parent 5fd03ddbfb
commit 06eb24cf4d
6 changed files with 44 additions and 43 deletions

View File

@@ -19,7 +19,7 @@ EIGEN_DEVICE_FUNC uint64_t get_random_seed() {
#if defined(EIGEN_GPU_COMPILE_PHASE)
// We don't support 3d kernels since we currently only use 1 and
// 2d kernels.
assert(threadIdx.z == 0);
gpu_assert(threadIdx.z == 0);
return clock64() +
blockIdx.x * blockDim.x + threadIdx.x +
gridDim.x * blockDim.x * (blockIdx.y * blockDim.y + threadIdx.y);