fix hip_fast_dsqrt* to call a double fp sqrt function

This commit is contained in:
Siu Chi Chan
2017-05-25 23:15:30 -04:00
vanhempi c863215611
commit 1dce01f9bb
+7 -4
Näytä tiedosto
@@ -1215,20 +1215,23 @@ __device__ float __hip_fast_tanf(float x) {
}
// Double Precision Math
// FIXME - HCC doesn't have a fast_math version double FP sqrt
// Another issue is that these intrinsics call for a specific rounding mode;
// however, their implementation all map to the same sqrt builtin
__device__ double __hip_fast_dsqrt_rd(double x) {
return hc::fast_math::sqrt(x);
return hc::precise_math::sqrt(x);
}
__device__ double __hip_fast_dsqrt_rn(double x) {
return hc::fast_math::sqrt(x);
return hc::precise_math::sqrt(x);
}
__device__ double __hip_fast_dsqrt_ru(double x) {
return hc::fast_math::sqrt(x);
return hc::precise_math::sqrt(x);
}
__device__ double __hip_fast_dsqrt_rz(double x) {
return hc::fast_math::sqrt(x);
return hc::precise_math::sqrt(x);
}
__device__ void __threadfence_system(void){