diff --git a/projects/hip/include/hcc_detail/hip_runtime.h b/projects/hip/include/hcc_detail/hip_runtime.h index 72ecc3515c..9f5c81152a 100644 --- a/projects/hip/include/hcc_detail/hip_runtime.h +++ b/projects/hip/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