We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b78698e commit 9116e73Copy full SHA for 9116e73
dpctl/memory/_opaque_smart_ptr.hpp
@@ -35,6 +35,9 @@
35
#include <memory>
36
#include <sycl/sycl.hpp>
37
38
+#include <exception>
39
+#include <iostream>
40
+
41
namespace
42
{
43
@@ -48,7 +51,13 @@ class USMDeleter
48
51
USMDeleter(const ::sycl::context &context) : _context(context) {}
49
52
template <typename T> void operator()(T *ptr) const
50
53
- ::sycl::free(ptr, _context);
54
+ try {
55
+ ::sycl::free(ptr, _context);
56
+ } catch (const std::exception &e) {
57
+ std::cout << "Call to sycl::free caught an exception: " << e.what()
58
+ << std::endl;
59
+ // std::terminate();
60
+ }
61
}
62
63
private:
0 commit comments