File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 17
17
18
18
#include < cassert>
19
19
#include < cuda.h>
20
- #include < memory>
21
20
22
21
ur_event_handle_t_::ur_event_handle_t_ (ur_command_t Type,
23
22
ur_context_handle_t Context,
@@ -292,17 +291,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle(
292
291
293
292
std::unique_ptr<ur_event_handle_t_> EventPtr{nullptr };
294
293
295
- try {
296
- EventPtr =
297
- std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeWithNative (
298
- hContext, reinterpret_cast <CUevent>(hNativeEvent)));
299
- } catch (const std::bad_alloc &) {
300
- return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY;
301
- } catch (...) {
302
- return UR_RESULT_ERROR_UNKNOWN;
303
- }
304
-
305
- *phEvent = EventPtr.release ();
294
+ *phEvent = ur_event_handle_t_::makeWithNative (
295
+ hContext, reinterpret_cast <CUevent>(hNativeEvent));
306
296
307
297
return UR_RESULT_SUCCESS;
308
298
}
You can’t perform that action at this time.
0 commit comments