fix __longlong_as_double() problem, return the double value

previous version return a long long valus *as* double, hence we may get the wrong result.
this also affect atomicAdd(double * ...), which use long long pointer to mimic double pointer.

Signed-off-by: carlushuang <carlus.huang@amd.com>


[ROCm/hip commit: d577f27d1a]
Este commit está contenido en:
carlushuang
2018-09-12 13:24:56 +08:00
padre 489b696bae
commit 7c4aaeff95
@@ -593,7 +593,7 @@ __device__ static inline double __longlong_as_double(long long int x) {
double tmp;
__builtin_memcpy(&tmp, &x, sizeof(tmp));
return x;
return tmp;
}
__device__ static inline double __uint2double_rn(int x) { return (double)x; }