aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
diff options
context:
space:
mode:
authorGravatar Luke Iwanski <luke@codeplay.com>2016-11-08 21:56:31 +0000
committerGravatar Luke Iwanski <luke@codeplay.com>2016-11-08 21:56:31 +0000
commit1b345b08959429f4905eee4dfbe0d5bd1bb95a4e (patch)
treecbc69e18d06fb953d3e906c8547c3561d36559e4 /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
parent1b95717358d889dd7cc375999fa04b0fdbf30da9 (diff)
Fix for SYCL queue initialisation.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
index 0abc6fe30..84dede904 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
@@ -26,19 +26,21 @@ struct SyclDevice {
mutable std::map<const void *, std::shared_ptr<void>> buffer_map;
/// creating device by using selector
template<typename dev_Selector> SyclDevice(dev_Selector s)
- :m_queue(cl::sycl::queue(s, [=](cl::sycl::exception_list l) {
- for (const auto& e : l) {
+ :
#if EXCEPTIONS_ENABLED
+ m_queue(cl::sycl::queue(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;
}
+ }
+ }))
#else
- assert(false && "SyclDevice: Unhandled exception cought!");
+ m_queue(cl::sycl::queue(s))
#endif
- }
- })) {}
+ {}
// destructor
~SyclDevice() { deallocate_all(); }