From 4f5dfa77bd45e391aeb5b41d5789f2e5b56791bf Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Fri, 2 Jun 2023 13:41:21 +0100 Subject: [PATCH] SWDEV-401852 - Do not define hipCreateChannelDesc for long types in LP64 Change-Id: I56881a229ea666269d575c6bdfde5081562ec009 --- hipamd/include/hip/amd_detail/amd_channel_descriptor.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hipamd/include/hip/amd_detail/amd_channel_descriptor.h b/hipamd/include/hip/amd_detail/amd_channel_descriptor.h index 26a7fbc499..bf2c337901 100644 --- a/hipamd/include/hip/amd_detail/amd_channel_descriptor.h +++ b/hipamd/include/hip/amd_detail/amd_channel_descriptor.h @@ -281,6 +281,8 @@ inline hipChannelFormatDesc hipCreateChannelDesc() { return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat); } +#if !defined(__LP64__) + template <> inline hipChannelFormatDesc hipCreateChannelDesc() { int e = (int)sizeof(unsigned long) * 8; @@ -342,12 +344,13 @@ inline hipChannelFormatDesc hipCreateChannelDesc() { int e = (int)sizeof(signed long) * 8; return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned); } +#endif /* !__LP64__ */ #else struct hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, enum hipChannelFormatKind f); -#endif +#endif /* __cplusplus */ -#endif +#endif /* !HIP_INCLUDE_HIP_AMD_DETAIL_CHANNEL_DESCRIPTOR_H */