From c7c5b3e409a1843448e0a83f812e0b2b16a99082 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 17:18:49 +0300 Subject: [PATCH 1/5] [SYCL] Use correct macro name in export.hpp Signed-off-by: Alexander Batashev --- sycl/include/CL/sycl/detail/export.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/CL/sycl/detail/export.hpp b/sycl/include/CL/sycl/detail/export.hpp index 68b15af73456a..a2c8420302cc1 100644 --- a/sycl/include/CL/sycl/detail/export.hpp +++ b/sycl/include/CL/sycl/detail/export.hpp @@ -8,7 +8,7 @@ #pragma once -#ifndef SYCL_DEVICE_ONLY +#ifndef __SYCL_DEVICE_ONLY__ #ifndef __SYCL_EXPORT #ifdef _WIN32 From f7a75ea6f02c172dfe6c013748e313200bc4b4a1 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 17:30:06 +0300 Subject: [PATCH 2/5] React to comments Signed-off-by: Alexander Batashev --- sycl/include/CL/sycl/detail/image_ocl_types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/CL/sycl/detail/image_ocl_types.hpp b/sycl/include/CL/sycl/detail/image_ocl_types.hpp index bd569523da2a5..2dd20bf60e412 100644 --- a/sycl/include/CL/sycl/detail/image_ocl_types.hpp +++ b/sycl/include/CL/sycl/detail/image_ocl_types.hpp @@ -185,7 +185,7 @@ struct opencl_image_type; // Creation of dummy ocl types for host_image targets. // These dummy ocl types are needed by the compiler parser for the compilation -// of host application code with SYCL_DEVICE_ONLY macro set. +// of host application code with __SYCL_DEVICE_ONLY__ macro set. template struct opencl_image_type { using type = From d24d3c953643308e16bf5ee3c82fc5f5e1c020e4 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 18:55:12 +0300 Subject: [PATCH 3/5] Fix some errors Signed-off-by: Alexander Batashev --- sycl/include/CL/sycl/detail/export.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sycl/include/CL/sycl/detail/export.hpp b/sycl/include/CL/sycl/detail/export.hpp index a2c8420302cc1..932b7393c46df 100644 --- a/sycl/include/CL/sycl/detail/export.hpp +++ b/sycl/include/CL/sycl/detail/export.hpp @@ -25,14 +25,18 @@ #else #define __SYCL_EXPORT __declspec(dllimport) #define __SYCL_EXPORT_DEPRECATED(x) __declspec(dllimport, deprecated(x)) -#endif -#else +#endif //__SYCL_BUILD_SYCL_DLL +#else // _WIN32 #define DLL_LOCAL __attribute__((visibility("hidden"))) #define __SYCL_EXPORT __attribute__((visibility("default"))) #define __SYCL_EXPORT_DEPRECATED(x) \ __attribute__((visibility("default"), deprecated(x))) +#endif // _WIN32 +#endif // __SYCL_EXPORT +#else +#ifndef __SYCL_EXPORT +#define __SYCL_EXPORT #endif -#endif -#endif +#endif // __SYCL_DEVICE_ONLY__ From dcde50e383593a5671689fc06078517ac2fec9df Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 19:01:37 +0300 Subject: [PATCH 4/5] clang-format Signed-off-by: Alexander Batashev --- sycl/include/CL/sycl/detail/export.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/CL/sycl/detail/export.hpp b/sycl/include/CL/sycl/detail/export.hpp index 932b7393c46df..17453214b7d49 100644 --- a/sycl/include/CL/sycl/detail/export.hpp +++ b/sycl/include/CL/sycl/detail/export.hpp @@ -26,7 +26,7 @@ #define __SYCL_EXPORT __declspec(dllimport) #define __SYCL_EXPORT_DEPRECATED(x) __declspec(dllimport, deprecated(x)) #endif //__SYCL_BUILD_SYCL_DLL -#else // _WIN32 +#else // _WIN32 #define DLL_LOCAL __attribute__((visibility("hidden"))) From 7a16ea24a18b987836f862350aac062ee0ffda89 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 22:59:23 +0300 Subject: [PATCH 5/5] More fixes Signed-off-by: Alexander Batashev --- sycl/include/CL/sycl/detail/export.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/include/CL/sycl/detail/export.hpp b/sycl/include/CL/sycl/detail/export.hpp index 17453214b7d49..47d21bd894f0a 100644 --- a/sycl/include/CL/sycl/detail/export.hpp +++ b/sycl/include/CL/sycl/detail/export.hpp @@ -38,5 +38,6 @@ #else #ifndef __SYCL_EXPORT #define __SYCL_EXPORT +#define __SYCL_EXPORT_DEPRECATED(x) #endif #endif // __SYCL_DEVICE_ONLY__