aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
diff options
context:
space:
mode:
authorGravatar Mehdi Goli <mehdi.goli@codeplay.com>2019-07-01 16:27:28 +0100
committerGravatar Mehdi Goli <mehdi.goli@codeplay.com>2019-07-01 16:27:28 +0100
commit9ea490c82c2603c6185c06e993943099b287a405 (patch)
tree2bf8f48fdd5281d589d0567aa192278998d5e064 /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
parent81a03bec75aac90aa343fccf6a7daf735e28c20d (diff)
[SYCL] :
* Modifying TensorDeviceSYCL to use `EIGEN_THROW_X`. * Modifying TensorMacro to use `EIGEN_TRY/CATCH(X)` macro. * Modifying TensorReverse.h to use `EIGEN_DEVICE_REF` instead of `&`. * Fixing the SYCL device macro in SpecialFunctionsImpl.h.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
index 93efe2f82..6f8b6f193 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
@@ -16,6 +16,7 @@
#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_SYCL_H
#include <unordered_set>
+
namespace Eigen {
namespace TensorSycl {
@@ -676,21 +677,12 @@ class QueueInterface {
}
}
- bool sycl_async_handler(cl::sycl::exception_list l) const {
+ bool sycl_async_handler(cl::sycl::exception_list exceptions) const {
bool exception_caught = false;
- for (const auto &e : l) {
+ for (const auto &e : exceptions) {
if (e) {
exception_caught = true;
-#ifdef EIGEN_EXCEPTIONS
- try {
- std::rethrow_exception(e);
- } catch (const cl::sycl::exception &e) {
- std::cerr << e.what() << std::endl;
- }
-#else
- std::cerr << "Error detected inside Sycl device." << std::endl;
- abort();
-#endif
+ EIGEN_THROW_X(e);
}
}
return exception_caught;