Skip to content

Commit

Permalink
Update rasterize_cuda_kernel.cu according to daniilidis-group#144
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan6thomas authored Jun 24, 2024
1 parent 5cc8574 commit b8447ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neural_renderer/cuda/rasterize_cuda_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#include <cuda_runtime.h>

// 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;
Expand All @@ -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 <typename scalar_t>
Expand Down

0 comments on commit b8447ac

Please sign in to comment.