File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
sycl/source/detail/program_manager Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -559,15 +559,13 @@ static RT::PiProgram loadDeviceLibFallback(
559
559
std::map<DeviceLibExt, RT::PiProgram> &CachedLibPrograms) {
560
560
561
561
const char *LibFileName = getDeviceLibFilename (Extension);
562
- std::map<DeviceLibExt, RT::PiProgram>::iterator LibProgIt;
563
- bool NotExists = false ;
564
- std::tie (LibProgIt, NotExists) =
565
- CachedLibPrograms.insert ({Extension, nullptr });
562
+ auto CacheResult = CachedLibPrograms.insert ({Extension, nullptr });
563
+ bool Cached = !CacheResult.second ;
564
+ std::map<DeviceLibExt, RT::PiProgram>::iterator LibProgIt = CacheResult.first ;
566
565
RT::PiProgram &LibProg = LibProgIt->second ;
567
566
568
- if (!NotExists) {
567
+ if (Cached)
569
568
return LibProg;
570
- }
571
569
572
570
if (!loadDeviceLib (Context, LibFileName, LibProg)) {
573
571
CachedLibPrograms.erase (LibProgIt);
You can’t perform that action at this time.
0 commit comments