]> https://gitweb.dealii.org/ - dealii.git/commitdiff
clean up cuda_atomic
authorTimo Heister <timo.heister@gmail.com>
Thu, 21 May 2020 22:44:09 +0000 (18:44 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 21 May 2020 22:44:09 +0000 (18:44 -0400)
include/deal.II/lac/cuda_atomic.h

index 7a6cc604960a5b124a80781162009948ea38451f..5bfb1135086078b0256d1440fab0ff53a2bbc29c 100644 (file)
@@ -47,27 +47,7 @@ namespace LinearAlgebra
     inline __device__ double
     atomicAdd_wrapper(double *address, double val)
     {
-      // Use native instruction for CUDA 8 on Pascal or newer architecture
-#  if __CUDACC_VER_MAJOR__ >= 8 && \
-    (!defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600)
       return atomicAdd(address, val);
-#  else
-
-      unsigned long long int *address_as_ull =
-        reinterpret_cast<unsigned long long int *>(address);
-      unsigned long long int old = *address_as_ull, assumed;
-      do
-        {
-          assumed = old;
-          old     = atomicCAS(address_as_ull,
-                          assumed,
-                          __double_as_longlong(val +
-                                               __longlong_as_double(assumed)));
-        }
-      while (assumed != old);
-
-      return __longlong_as_double(old);
-#  endif
     }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.