File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ device_impl::device_impl(pi_native_handle InteropDeviceHandle,
58
58
nullptr );
59
59
60
60
MIsRootDevice = (nullptr == parent);
61
- if (!MIsRootDevice && ! InteroperabilityConstructor) {
61
+ if (!InteroperabilityConstructor) {
62
62
// TODO catch an exception and put it to list of asynchronous exceptions
63
63
// Interoperability Constructor already calls DeviceRetain in
64
64
// piextDeviceFromNative.
@@ -77,7 +77,7 @@ device_impl::device_impl(pi_native_handle InteropDeviceHandle,
77
77
}
78
78
79
79
device_impl::~device_impl () {
80
- if (!MIsRootDevice && ! MIsHostDevice) {
80
+ if (!MIsHostDevice) {
81
81
// TODO catch an exception and put it to list of asynchronous exceptions
82
82
const detail::plugin &Plugin = getPlugin ();
83
83
RT::PiResult Err = Plugin.call_nocheck <PiApiKind::piDeviceRelease>(MDevice);
@@ -98,10 +98,9 @@ cl_device_id device_impl::get() const {
98
98
PI_INVALID_DEVICE);
99
99
100
100
const detail::plugin &Plugin = getPlugin ();
101
- if (!MIsRootDevice) {
102
- // TODO catch an exception and put it to list of asynchronous exceptions
103
- Plugin.call <PiApiKind::piDeviceRetain>(MDevice);
104
- }
101
+
102
+ // TODO catch an exception and put it to list of asynchronous exceptions
103
+ Plugin.call <PiApiKind::piDeviceRetain>(MDevice);
105
104
return pi ::cast<cl_device_id >(getNative ());
106
105
}
107
106
You can’t perform that action at this time.
0 commit comments