From 5ccaf2fa7d79ec43fdf5e0a16b269b89e10b4ab6 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 18 Oct 2018 15:33:46 +0100 Subject: [PATCH] Dumb workaround is still needed, so add it back. --- include/hip/hcc_detail/math_functions.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/hip/hcc_detail/math_functions.h b/include/hip/hcc_detail/math_functions.h index faf3804719..4a68a938af 100644 --- a/include/hip/hcc_detail/math_functions.h +++ b/include/hip/hcc_detail/math_functions.h @@ -33,6 +33,12 @@ THE SOFTWARE. #include #include +// HCC's own math functions should be included first, otherwise there will +// be conflicts when hip/math_functions.h is included before hip/hip_runtime.h. +#ifdef __HCC__ +#include "kalmar_math.h" +#endif + #pragma push_macro("__DEVICE__") #pragma push_macro("__RETURN_TYPE")