fixed build issue of double definition of atomicAdd on modern GPUs

avx_docs
Fan Yang 9 years ago committed by Yu Yang
parent 0b02a221ff
commit c9dc794e19

@ -16,6 +16,8 @@ limitations under the License. */
#ifndef HL_DEVICE_FUNCTIONS_CUH_ #ifndef HL_DEVICE_FUNCTIONS_CUH_
#define HL_DEVICE_FUNCTIONS_CUH_ #define HL_DEVICE_FUNCTIONS_CUH_
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600
namespace hppl { namespace hppl {
static __inline__ __device__ double atomicAdd(double* address, double val) { static __inline__ __device__ double atomicAdd(double* address, double val) {
@ -40,4 +42,6 @@ static __inline__ __device__ double atomicAdd(double* address, double val) {
using hppl::atomicAdd; using hppl::atomicAdd;
#endif #endif
#endif
#endif /* HL_DEVICE_FUNCTIONS_CUH_ */ #endif /* HL_DEVICE_FUNCTIONS_CUH_ */

Loading…
Cancel
Save