mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Use try/catch only when exceptions are enabled.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user