Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion sycl/source/detail/plugin_printers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,26 @@

#include <CL/sycl/detail/pi.hpp>

#include <type_traits>

__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {
namespace detail {
namespace pi {

template <typename T> inline void print(T val) {
template <typename T>
inline typename std::enable_if<!std::is_pointer<T>::value, void>::type
print(T val) {
std::cout << "<unknown> : " << val << std::endl;
}

template <typename T>
inline typename std::enable_if<std::is_pointer<T>::value, void>::type
print(T val) {
std::cout << "<unknown> : " << reinterpret_cast<const void *>(val)
<< std::endl;
}

template <> inline void print<>(PiPlatform val) {
std::cout << "pi_platform : " << val << std::endl;
}
Expand Down