diff --git a/include/hip/device_functions.h b/include/hip/device_functions.h index 9e1d091364..8388a5c24b 100644 --- a/include/hip/device_functions.h +++ b/include/hip/device_functions.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,9 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_DEVICE_FUNCTIONS_H #define HIP_INCLUDE_HIP_DEVICE_FUNCTIONS_H +#if !defined(__HIPCC_RTC__) #include +#endif #if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include diff --git a/include/hip/driver_types.h b/include/hip/driver_types.h index 695d047fc9..0675dde25f 100644 --- a/include/hip/driver_types.h +++ b/include/hip/driver_types.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,9 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_DRIVER_TYPES_H #define HIP_INCLUDE_HIP_DRIVER_TYPES_H +#if !defined(__HIPCC_RTC__) #include +#endif #if !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include "driver_types.h" diff --git a/include/hip/hip_common.h b/include/hip/hip_common.h index 539952b998..f0a8f2ccac 100644 --- a/include/hip/hip_common.h +++ b/include/hip/hip_common.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,6 +23,10 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_HIP_COMMON_H #define HIP_INCLUDE_HIP_HIP_COMMON_H +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-macro-identifier" +#endif // Common code included at start of every hip file. // Auto enable __HIP_PLATFORM_AMD__ if compiling on AMD platform // Other compiler (GCC,ICC,etc) need to set one of these macros explicitly @@ -99,4 +103,8 @@ THE SOFTWARE. #define __HIP_ARCH_HAS_DYNAMIC_PARALLEL__ (0) #endif +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #endif diff --git a/include/hip/hip_complex.h b/include/hip/hip_complex.h index 51873fbe6b..0e70f245d5 100644 --- a/include/hip/hip_complex.h +++ b/include/hip/hip_complex.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,9 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_HIP_COMPLEX_H #define HIP_INCLUDE_HIP_HIP_COMPLEX_H +#if !defined(__HIPCC_RTC__) #include +#endif #if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include diff --git a/include/hip/library_types.h b/include/hip/library_types.h index 1088cd4c90..6251b7f2ce 100644 --- a/include/hip/library_types.h +++ b/include/hip/library_types.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,9 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_LIBRARY_TYPES_H #define HIP_INCLUDE_HIP_LIBRARY_TYPES_H +#if !defined(__HIPCC_RTC__) #include +#endif #if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) diff --git a/include/hip/math_functions.h b/include/hip/math_functions.h index c451defa42..3216e24317 100644 --- a/include/hip/math_functions.h +++ b/include/hip/math_functions.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27,7 +27,9 @@ THE SOFTWARE. // paths to provide a consistent include env and avoid "missing symbol" errors that only appears // on NVCC path: +#if !defined(__HIPCC_RTC__) #include +#endif #if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include diff --git a/include/hip/surface_types.h b/include/hip/surface_types.h index c7f588de09..62fb681111 100644 --- a/include/hip/surface_types.h +++ b/include/hip/surface_types.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2022 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -25,7 +25,14 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_SURFACE_TYPES_H #define HIP_INCLUDE_HIP_SURFACE_TYPES_H +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + +#if !defined(__HIPCC_RTC__) #include +#endif /** * An opaque value that represents a hip surface object @@ -49,4 +56,8 @@ enum hipSurfaceBoundaryMode { hipBoundaryModeClamp = 2 }; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #endif /* !HIP_INCLUDE_HIP_SURFACE_TYPES_H */ diff --git a/include/hip/texture_types.h b/include/hip/texture_types.h index d83470698f..33c749ed05 100644 --- a/include/hip/texture_types.h +++ b/include/hip/texture_types.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,16 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_TEXTURE_TYPES_H #define HIP_INCLUDE_HIP_TEXTURE_TYPES_H +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-identifier" +#pragma clang diagnostic ignored "-Wreserved-macro-identifier" +#pragma clang diagnostic ignored "-Wc++98-compat" +#endif + +#if !defined(__HIPCC_RTC__) #include +#endif #if !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include "texture_types.h" @@ -179,4 +188,8 @@ struct __HIP_TEXTURE_ATTRIB texture : public textureReference { #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__"); #endif +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #endif