From 3f648ea2399d0835322a041a581c772d91645a6f Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 1 Feb 2016 14:26:50 +0530 Subject: [PATCH] Restrict using namespace hc::precise_math to device only [ROCm/clr commit: c5990d5651cbd7e7ee0a35b1d2e5c89cf0a88d47] --- projects/clr/hipamd/include/hcc_detail/hip_runtime.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/include/hcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hcc_detail/hip_runtime.h index 72ecc3515c..9f5c81152a 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_runtime.h +++ b/projects/clr/hipamd/include/hcc_detail/hip_runtime.h @@ -352,10 +352,11 @@ __device__ inline unsigned long long int __ballot( int input) } -#ifdef __HCC_ACCELERATOR__ #include // TODO: Choose whether default is precise math or fast math based on compilation flag. +#ifdef __HCC_ACCELERATOR__ using namespace hc::precise_math; +#endif //TODO: Undo this once min/max functions are supported by hc inline int min(int arg1, int arg2) __attribute((hc,cpu)) { \ @@ -368,9 +369,6 @@ inline int max(int arg1, int arg2) __attribute((hc,cpu)) { \ __device__ inline float __log2f(float x) {return hc::fast_math::log2(x); }; __device__ inline float __powf(float base, float exponent) {return hc::fast_math::powf(base, exponent); }; -#endif - - /** * Kernel launching