diff --git a/projects/hip/include/hcc_detail/hip_vector_types.h b/projects/hip/include/hcc_detail/hip_vector_types.h index 29d2d53a8d..7d3ed98431 100644 --- a/projects/hip/include/hcc_detail/hip_vector_types.h +++ b/projects/hip/include/hcc_detail/hip_vector_types.h @@ -29,8 +29,12 @@ THE SOFTWARE. #error("This version of HIP requires a newer version of HCC."); #endif +#if __cplusplus #include +using namespace hc::short_vector; +#endif + //-- Signed // Define char vector types typedef hc::short_vector::char1 char1; @@ -108,7 +112,7 @@ typedef hc::short_vector::double2 double2; typedef hc::short_vector::double3 double3; typedef hc::short_vector::double4 double4; - +/* ///--- // Inline functions for creating vector types from basic types #define ONE_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT (T x) { VT t; t.x = x; return t; }; @@ -191,3 +195,4 @@ ONE_COMPONENT_ACCESS (double, double1); TWO_COMPONENT_ACCESS (double, double2); THREE_COMPONENT_ACCESS(double, double3); FOUR_COMPONENT_ACCESS (double, double4); +*/ diff --git a/projects/hip/include/hip_vector_types.h b/projects/hip/include/hip_vector_types.h index 61d7f6c7d9..64702b8655 100644 --- a/projects/hip/include/hip_vector_types.h +++ b/projects/hip/include/hip_vector_types.h @@ -27,7 +27,9 @@ THE SOFTWARE. #if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__) +#if __cplusplus #include +#endif #elif defined(__HIP_PLATFORM_NVCC__) && !defined (__HIP_PLATFORM_HCC__) #include #else