File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -653,14 +653,13 @@ void fillPlatformAndDeviceCache(plugin &Plugin) {
653
653
654
654
if (PiDevices.size () != 0 ) {
655
655
std::vector<DeviceImplPtr> DeviceCache;
656
+ const std::lock_guard<std::mutex> Guard (
657
+ GlobalHandler::instance ().getPlatformMapMutex ());
656
658
for (const RT::PiDevice &PiDevice : PiDevices) {
657
659
std::shared_ptr<device_impl> Device =
658
- PlatformImpl->getOrMakeDeviceImpl (PiDevice, PlatformImpl);
659
- const std::lock_guard<std::mutex> Guard (
660
- GlobalHandler::instance ().getPlatformMapMutex ());
660
+ std::make_shared<device_impl>(PiDevice, PlatformImpl);
661
661
DeviceCache.emplace_back (Device);
662
662
}
663
-
664
663
PlatformDeviceCache[PlatformImpl] = DeviceCache;
665
664
}
666
665
DeviceNum += UnfilteredDeviceCount;
You can’t perform that action at this time.
0 commit comments