diff --git a/neural_renderer/cuda/rasterize_cuda_kernel.cu b/neural_renderer/cuda/rasterize_cuda_kernel.cu index b8596f8..daef1f3 100644 --- a/neural_renderer/cuda/rasterize_cuda_kernel.cu +++ b/neural_renderer/cuda/rasterize_cuda_kernel.cu @@ -5,7 +5,8 @@ #include // for the older gpus atomicAdd with double arguments does not exist -#if __CUDA_ARCH__ < 600 and defined(__CUDA_ARCH__) +#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600 +#else static __inline__ __device__ double atomicAdd(double* address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull, assumed; @@ -17,7 +18,7 @@ static __inline__ __device__ double atomicAdd(double* address, double val) { } while (assumed != old); return __longlong_as_double(old); } -#endif +#endif namespace{ template