diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-08-11 12:27:59 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-08-14 09:10:53 +0000 |
commit | 633ebd18d982496a6a626df3b8336f610ab09eb4 (patch) | |
tree | ae4872fcef81ef7e57bc6044053cfc19d6e40613 /include/CL/cl_platform.h | |
parent | ebb91a2c662bf88218c3970fb253c61704c32f28 (diff) | |
download | ComputeLibrary-633ebd18d982496a6a626df3b8336f610ab09eb4.tar.gz |
Update OpenCL headers to v2023.04.17
Resolves: COMPMID-6452
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I0bfab12b79090cea57ab908def9cd5c202ec0a50
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10123
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'include/CL/cl_platform.h')
-rw-r--r-- | include/CL/cl_platform.h | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/include/CL/cl_platform.h b/include/CL/cl_platform.h index 8ae655d143..e7a0d6f476 100644 --- a/include/CL/cl_platform.h +++ b/include/CL/cl_platform.h @@ -135,6 +135,11 @@ extern "C" { #if (defined (_WIN32) && defined(_MSC_VER)) +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wlanguage-extension-token" +#endif + /* intptr_t is used in cl.h and provided by stddef.h in Visual C++, but not in clang */ /* stdint.h was missing before Visual Studio 2010, include it for later versions and for clang */ #if defined(__clang__) || _MSC_VER >= 1600 @@ -155,6 +160,10 @@ typedef unsigned __int16 cl_half; typedef float cl_float; typedef double cl_double; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + /* Macro names and corresponding values defined by OpenCL */ #define CL_CHAR_BIT 8 #define CL_SCHAR_MAX 127 @@ -501,25 +510,26 @@ typedef unsigned int cl_GLenum; #if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #define __CL_HAS_ANON_STRUCT__ 1 #define __CL_ANON_STRUCT__ -#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) +#elif defined(_WIN32) && defined(_MSC_VER) && !defined(__STDC__) +#define __CL_HAS_ANON_STRUCT__ 1 +#define __CL_ANON_STRUCT__ +#elif defined(__GNUC__) && ! defined(__STRICT_ANSI__) +#define __CL_HAS_ANON_STRUCT__ 1 +#define __CL_ANON_STRUCT__ __extension__ +#elif defined(__clang__) #define __CL_HAS_ANON_STRUCT__ 1 #define __CL_ANON_STRUCT__ __extension__ -#elif defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__) - #if _MSC_VER >= 1500 - /* Microsoft Developer Studio 2008 supports anonymous structs, but - * complains by default. */ - #define __CL_HAS_ANON_STRUCT__ 1 - #define __CL_ANON_STRUCT__ - /* Disable warning C4201: nonstandard extension used : nameless - * struct/union */ - #pragma warning( push ) - #pragma warning( disable : 4201 ) - #endif #else #define __CL_HAS_ANON_STRUCT__ 0 #define __CL_ANON_STRUCT__ #endif +#if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__ + /* Disable warning C4201: nonstandard extension used : nameless struct/union */ + #pragma warning( push ) + #pragma warning( disable : 4201 ) +#endif + /* Define alignment keys */ #if defined( __GNUC__ ) || defined(__INTEGRITY) #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) @@ -1395,10 +1405,8 @@ typedef union } #endif -#if defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__) - #if _MSC_VER >=1500 +#if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__ #pragma warning( pop ) - #endif #endif #endif /* __CL_PLATFORM_H */ |