From d57430dd73ab2f88aa5e45c370f6ab91103ff18a Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Tue, 8 Nov 2016 17:08:02 +0000 Subject: Converting all sycl buffers to uninitialised device only buffers; adding memcpyHostToDevice and memcpyDeviceToHost on syclDevice; modifying all examples to obey the new rules; moving sycl queue creating to the device based on Benoit suggestion; removing the sycl specefic condition for returning m_result in TensorReduction.h according to Benoit suggestion. --- unsupported/test/cxx11_tensor_device_sycl.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'unsupported/test/cxx11_tensor_device_sycl.cpp') diff --git a/unsupported/test/cxx11_tensor_device_sycl.cpp b/unsupported/test/cxx11_tensor_device_sycl.cpp index f54fc8786..7f79753c5 100644 --- a/unsupported/test/cxx11_tensor_device_sycl.cpp +++ b/unsupported/test/cxx11_tensor_device_sycl.cpp @@ -20,20 +20,12 @@ #include "main.h" #include -void test_device_sycl() { - cl::sycl::gpu_selector s; - cl::sycl::queue q(s, [=](cl::sycl::exception_list l) { - for (const auto& e : l) { - try { - std::rethrow_exception(e); - } catch (cl::sycl::exception e) { - std::cout << e.what() << std::endl; - } - } - }); - Eigen::SyclDevice sycl_device(q); - printf("Helo from ComputeCpp: Device Exists\n"); +void test_device_sycl(const Eigen::SyclDevice &sycl_device) { + std::cout <<"Helo from ComputeCpp: the requested device exists and the device name is : " + << sycl_device.m_queue.get_device(). template get_info() <