ATLAS Offline Software
Atomic_Double.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FASTCALOGPU_ATOMIC_DOUBLE
6 #define ISF_FASTCALOGPU_ATOMIC_DOUBLE
7 #if !defined( __CUDA_ARCH__ ) || __CUDA_ARCH__ >= 600
8 #else
9 __device__ double atomicAdd( double* address, double val ) {
10  unsigned long long int* address_as_ull = (unsigned long long int*)address;
11  unsigned long long int old = *address_as_ull, assumed;
12  do {
13  assumed = old;
14  old = atomicCAS( address_as_ull, assumed, __double_as_longlong( val + __longlong_as_double( assumed ) ) );
15  } while ( assumed != old );
16  return __longlong_as_double( old );
17 }
18 #endif
19 #endif
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14