Fix header for OpenMP AMDGCN support

Add ifndef for __OPENMP_AMDGCN__ target, which shares
these header files with HIP.

Change-Id: I720693cfbcfb7836cd2f361d48530fb55ee3557a
Tá an tiomantas seo le fáil i:
Aaron En Ye Shi údaraithe agus Aaron En Ye Shi tiomanta 2020-10-20 14:04:48 -04:00
1 tuismitheoir c18a791c80
tiomantas 01bd165507
2 comhad athraithe
+5 -1

Níor tháinig aon chomhaid le do chuardach

+2 -1
Féach ar an gComhad
@@ -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
+3
Féach ar an gComhad
@@ -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__