Fix header for OpenMP AMDGCN support
Add ifndef for __OPENMP_AMDGCN__ target, which shares
these header files with HIP.
Change-Id: I720693cfbcfb7836cd2f361d48530fb55ee3557a
[ROCm/clr commit: 01bd165507]
This commit is contained in:
کامیت شده توسط
Aaron En Ye Shi
والد
16b7ecf4ec
کامیت
ff24c82f34
@@ -1410,6 +1410,7 @@ static inline __device__ void* __hip_hc_memset(void* dst, unsigned char val, siz
|
||||
|
||||
return dst;
|
||||
}
|
||||
#ifndef __OPENMP_AMDGCN__
|
||||
static inline __device__ void* memcpy(void* dst, const void* src, size_t size) {
|
||||
return __hip_hc_memcpy(dst, src, size);
|
||||
}
|
||||
@@ -1418,5 +1419,5 @@ static inline __device__ void* memset(void* ptr, int val, size_t size) {
|
||||
unsigned char val8 = static_cast<unsigned char>(val);
|
||||
return __hip_hc_memset(ptr, val8, size);
|
||||
}
|
||||
|
||||
#endif // !__OPENMP_AMDGCN__
|
||||
#endif
|
||||
|
||||
@@ -312,6 +312,8 @@ static constexpr Coordinates<hip_impl::WorkitemId> threadIdx{};
|
||||
#define hipGridDim_z (hc_get_num_groups(2))
|
||||
|
||||
#endif // defined __HCC__
|
||||
|
||||
#ifndef __OPENMP_AMDGCN__
|
||||
#if __HCC_OR_HIP_CLANG__
|
||||
#if !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
||||
#if __HIP_ENABLE_DEVICE_MALLOC__
|
||||
@@ -325,6 +327,7 @@ static inline __device__ void* free(void* ptr) { __builtin_trap(); return nullpt
|
||||
#endif
|
||||
#endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
||||
#endif //__HCC_OR_HIP_CLANG__
|
||||
#endif // !__OPENMP_AMDGCN__
|
||||
|
||||
#ifdef __HCC__
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user