From 2523c39a3706fc8d95d196a1eb4179497dda4a7e Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 6 Jun 2018 11:15:54 -0400 Subject: [PATCH] Includes or by __cplusplus in hip_complex.h --- include/hip/hcc_detail/hip_complex.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/hip/hcc_detail/hip_complex.h b/include/hip/hcc_detail/hip_complex.h index 3dc7a2ed56..72f139ba84 100644 --- a/include/hip/hcc_detail/hip_complex.h +++ b/include/hip/hcc_detail/hip_complex.h @@ -24,7 +24,15 @@ THE SOFTWARE. #define HIP_INCLUDE_HIP_HCC_DETAIL_HIP_COMPLEX_H #include "hip/hcc_detail/hip_vector_types.h" + +// TODO: Clang has a bug which allows device functions to call std functions +// when std functions are introduced into default namespace by using statement. +// math.h may be included after this bug is fixed. +#if __cplusplus #include +#else +#include "math.h" +#endif #if __cplusplus #define COMPLEX_ADD_OP_OVERLOAD(type) \