mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Fix for SYCL queue initialisation.
This commit is contained in:
parent
1b95717358
commit
1b345b0895
@ -26,19 +26,21 @@ struct SyclDevice {
|
|||||||
mutable std::map<const void *, std::shared_ptr<void>> buffer_map;
|
mutable std::map<const void *, std::shared_ptr<void>> buffer_map;
|
||||||
/// creating device by using selector
|
/// creating device by using selector
|
||||||
template<typename dev_Selector> SyclDevice(dev_Selector s)
|
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
|
#if EXCEPTIONS_ENABLED
|
||||||
|
m_queue(cl::sycl::queue(s, [=](cl::sycl::exception_list l) {
|
||||||
|
for (const auto& e : l) {
|
||||||
try {
|
try {
|
||||||
std::rethrow_exception(e);
|
std::rethrow_exception(e);
|
||||||
} catch (cl::sycl::exception e) {
|
} catch (cl::sycl::exception e) {
|
||||||
std::cout << e.what() << std::endl;
|
std::cout << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
assert(false && "SyclDevice: Unhandled exception cought!");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
})) {}
|
}))
|
||||||
|
#else
|
||||||
|
m_queue(cl::sycl::queue(s))
|
||||||
|
#endif
|
||||||
|
{}
|
||||||
// destructor
|
// destructor
|
||||||
~SyclDevice() { deallocate_all(); }
|
~SyclDevice() { deallocate_all(); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user