From 77eae0a4541aaf59543e3f608e7a7b6d582918d5 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 13 Jan 2021 09:47:33 +0300 Subject: [PATCH 1/2] [SYCL][NFC] Fix warning in self-build Implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension --- sycl/source/detail/plugin_printers.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/plugin_printers.hpp b/sycl/source/detail/plugin_printers.hpp index 133de20b35d61..160cacefaccd3 100644 --- a/sycl/source/detail/plugin_printers.hpp +++ b/sycl/source/detail/plugin_printers.hpp @@ -18,7 +18,8 @@ namespace detail { namespace pi { template inline void print(T val) { - std::cout << " : " << val << std::endl; + std::cout << " : " << reinterpret_cast(val) + << std::endl; } template <> inline void print<>(PiPlatform val) { From 54315df5be74f19ae4e13a12a89dc85c8d25cda4 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 13 Jan 2021 11:28:22 +0300 Subject: [PATCH 2/2] Build fix --- sycl/source/detail/plugin_printers.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/plugin_printers.hpp b/sycl/source/detail/plugin_printers.hpp index 160cacefaccd3..dbbd827d09c11 100644 --- a/sycl/source/detail/plugin_printers.hpp +++ b/sycl/source/detail/plugin_printers.hpp @@ -12,12 +12,22 @@ #include +#include + __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace pi { -template inline void print(T val) { +template +inline typename std::enable_if::value, void>::type +print(T val) { + std::cout << " : " << val << std::endl; +} + +template +inline typename std::enable_if::value, void>::type +print(T val) { std::cout << " : " << reinterpret_cast(val) << std::endl; }