SWDEV-419480 - HIPRTC implementation of standard headers shouldn't be in std namespace

HIPRTC implementation of few type traits are defined in std
namespace which causes conflicts with the std C++ headers when
apps try to include those std headers. Instead, use the
specific implementation of these headers from __hip_internal
namespace to avoid this.

Change-Id: Ia358df159af8783d1eba9a19cd458e192bf7e9e6


[ROCm/clr commit: 353dbe6e3b]
This commit is contained in:
Satyanvesh Dittakavi
2023-10-09 17:44:37 +00:00
parent 6d8458ba5a
commit 239fdc3bfd
9 changed files with 218 additions and 241 deletions
@@ -60,6 +60,13 @@ function(get_hiprtc_macros HIPRTC_DEFINES)
#define HIP_INCLUDE_HIP_MATH_FUNCTIONS_H\n\
#define HIP_INCLUDE_HIP_HIP_VECTOR_TYPES_H\n\
#if !__HIP_NO_STD_DEFS__\n\
#if defined(_WIN32)\n\
typedef unsigned long long uint64_t;\n\
typedef signed long long int64_t;\n\
#else\n\
typedef unsigned long uint64_t;\n\
typedef signed long int64_t;\n\
#endif\n\
#if defined(__HIPRTC_PTRDIFF_T_IS_LONG_LONG__) && __HIPRTC_PTRDIFF_T_IS_LONG_LONG__==1\n\
typedef long long ptrdiff_t;\n\
#else\n\
@@ -67,6 +74,8 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;\n\
#endif\n\
typedef long clock_t;\n\
namespace std {\n\
using ::uint64_t;\n\
using ::int64_t;\n\
using ::ptrdiff_t;\n\
using ::clock_t;\n\
}\n\