File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed 
sycl/source/detail/program_manager Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -2469,14 +2469,15 @@ std::vector<DeviceGlobalMapEntry *> ProgramManager::getDeviceGlobalEntries(
24692469std::vector<DeviceGlobalMapEntry *>
24702470ProgramManager::getProfileCounterDeviceGlobalEntries (
24712471    const  context_impl *CtxImpl) {
2472-   const   std::vector<DeviceGlobalMapEntry *> ProfileCounters =
2472+   std::vector<DeviceGlobalMapEntry *> ProfileCounters =
24732473      ProgramManager::getInstance ().m_DeviceGlobals .getProfileCounterEntries ();
2474-   std::vector<DeviceGlobalMapEntry *> FoundEntries;
2475-   for  (const  auto  &DGEntry : ProfileCounters) {
2476-     if  (DGEntry->isAvailableInContext (CtxImpl))
2477-       FoundEntries.push_back (DGEntry);
2478-   }
2479-   return  FoundEntries;
2474+   const  auto  NewEnd = std::remove_if (
2475+       ProfileCounters.begin (), ProfileCounters.end (),
2476+       [CtxImpl](const  DeviceGlobalMapEntry *DGEntry) {
2477+         return  !DGEntry->isAvailableInContext (CtxImpl);
2478+       });
2479+   ProfileCounters.erase (NewEnd, ProfileCounters.end ());
2480+   return  ProfileCounters;
24802481}
24812482
24822483void  ProgramManager::addOrInitHostPipeEntry (const  void  *HostPipePtr,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments