68MFEM_DEVICE
inline real_t
atomicAdd(real_t *add, real_t val)
70 unsigned long long int *ptr = (
unsigned long long int *) add;
71 unsigned long long int old = *ptr, reg;
75 old = atomicCAS(ptr, reg,
77 __float_as_int(val + __int_as_float(reg)));
79 __double_as_longlong(val + __longlong_as_double(reg)));
84 return __int_as_float(old);
86 return __longlong_as_double(old);