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 fff258a commit c2464eeCopy full SHA for c2464ee
offload/plugins-nextgen/common/include/PluginInterface.h
@@ -1295,7 +1295,10 @@ struct GenericPluginTy {
1295
return *Devices[DeviceId];
1296
}
1297
const GenericDeviceTy &getDevice(int32_t DeviceId) const {
1298
- return const_cast<GenericPluginTy *>(this)->getDevice(DeviceId);
+ assert(isValidDeviceId(DeviceId) && "Invalid device id");
1299
+ assert(Devices[DeviceId] && "Device is uninitialized");
1300
+
1301
+ return *Devices[DeviceId];
1302
1303
1304
/// Get the number of active devices.
0 commit comments