diff options
author | Mehdi Goli <mehdi.goli@codeplay.com> | 2016-11-18 16:34:54 +0000 |
---|---|---|
committer | Mehdi Goli <mehdi.goli@codeplay.com> | 2016-11-18 16:34:54 +0000 |
commit | 15e226d7d3b80d89d04a5b51baaf5b5d2aaad589 (patch) | |
tree | 720065f8fb029ca7d93e0aa7a66f6330404d5067 /unsupported/test/cxx11_tensor_device_sycl.cpp | |
parent | 622805a0c5d216141eca3090e80d58c159e175ee (diff) |
adding Benoit changes on the TensorDeviceSycl.h
Diffstat (limited to 'unsupported/test/cxx11_tensor_device_sycl.cpp')
-rw-r--r-- | unsupported/test/cxx11_tensor_device_sycl.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/unsupported/test/cxx11_tensor_device_sycl.cpp b/unsupported/test/cxx11_tensor_device_sycl.cpp index a51062d23..2f8cfa081 100644 --- a/unsupported/test/cxx11_tensor_device_sycl.cpp +++ b/unsupported/test/cxx11_tensor_device_sycl.cpp @@ -41,18 +41,15 @@ void test_device_sycl(const Eigen::SyclDevice &sycl_device) { template <typename DataType, int DataLayout> void test_device_exceptions(const Eigen::SyclDevice &sycl_device) { - bool threw_exception = false; + VERIFY(sycl_device.ok()); int sizeDim1 = 100; array<int, 1> tensorDims = {{sizeDim1}}; DataType* gpu_data = static_cast<DataType*>(sycl_device.allocate(sizeDim1*sizeof(DataType))); TensorMap<Tensor<DataType, 1,DataLayout>> in(gpu_data, tensorDims); TensorMap<Tensor<DataType, 1,DataLayout>> out(gpu_data, tensorDims); - try { - out.device(sycl_device) = in / in.constant(0); - } catch(...) { - threw_exception = true; - } - VERIFY(threw_exception); + + out.device(sycl_device) = in / in.constant(0); + VERIFY(!sycl_device.ok()); sycl_device.deallocate(gpu_data); } |