mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-21 20:09:06 +08:00
Use try/catch only when exceptions are enabled.
This commit is contained in:
parent
d57430dd73
commit
1b95717358
@ -28,11 +28,15 @@ struct SyclDevice {
|
||||
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
|
||||
try {
|
||||
std::rethrow_exception(e);
|
||||
} catch (cl::sycl::exception e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
#else
|
||||
assert(false && "SyclDevice: Unhandled exception cought!");
|
||||
#endif
|
||||
}
|
||||
})) {}
|
||||
// destructor
|
||||
|
Loading…
x
Reference in New Issue
Block a user