Includes <cmath> or <math.h> by __cplusplus in hip_complex.h

This commit is contained in:
Yaxun (Sam) Liu
2018-06-06 11:15:54 -04:00
parent 325cf3ccf0
commit 2523c39a37
+8
View File
@@ -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 <cmath>
#else
#include "math.h"
#endif
#if __cplusplus
#define COMPLEX_ADD_OP_OVERLOAD(type) \