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 371c628 commit 7627f88Copy full SHA for 7627f88
sycl/source/detail/device_global_map.hpp
@@ -30,10 +30,14 @@ class DeviceGlobalMap {
30
DeviceGlobalMap(const DeviceGlobalMap &) = delete;
31
DeviceGlobalMap &operator=(const DeviceGlobalMap &) = delete;
32
33
- ~DeviceGlobalMap() noexcept(false) {
34
- if (!MOwnerControlledCleanup)
35
- for (auto &DeviceGlobalIt : MDeviceGlobals)
36
- DeviceGlobalIt.second->cleanup();
+ ~DeviceGlobalMap() {
+ try {
+ if (!MOwnerControlledCleanup)
+ for (auto &DeviceGlobalIt : MDeviceGlobals)
37
+ DeviceGlobalIt.second->cleanup();
38
+ } catch (std::exception &e) {
39
+ __SYCL_REPORT_EXCEPTION_TO_STREAM("exception in ~DeviceGlobalMap", e);
40
+ }
41
}
42
43
void initializeEntries(const RTDeviceBinaryImage *Img) {
0 commit comments