File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,10 @@ ThreadPool &GlobalHandler::getHostTaskThreadPool() {
254
254
}
255
255
256
256
KernelNameBasedCacheT *GlobalHandler::createKernelNameBasedCache () {
257
- static std::vector<std::unique_ptr< KernelNameBasedCacheT>>
258
- &KernelNameBasedCaches = getOrCreate (MKernelNameBasedCaches);
257
+ static std::deque< KernelNameBasedCacheT> &KernelNameBasedCaches =
258
+ getOrCreate (MKernelNameBasedCaches);
259
259
LockGuard LG{MKernelNameBasedCaches.Lock };
260
- return KernelNameBasedCaches
261
- .emplace_back (std::make_unique<KernelNameBasedCacheT>())
262
- .get ();
260
+ return &KernelNameBasedCaches.emplace_back ();
263
261
}
264
262
265
263
void GlobalHandler::releaseDefaultContexts () {
Original file line number Diff line number Diff line change 11
11
#include < sycl/detail/spinlock.hpp>
12
12
#include < sycl/detail/util.hpp>
13
13
14
+ #include < deque>
14
15
#include < memory>
15
16
#include < unordered_map>
16
17
@@ -130,8 +131,7 @@ class GlobalHandler {
130
131
InstWithLock<XPTIRegistry> MXPTIRegistry;
131
132
// Thread pool for host task and event callbacks execution
132
133
InstWithLock<ThreadPool> MHostTaskThreadPool;
133
- InstWithLock<std::vector<std::unique_ptr<KernelNameBasedCacheT>>>
134
- MKernelNameBasedCaches;
134
+ InstWithLock<std::deque<KernelNameBasedCacheT>> MKernelNameBasedCaches;
135
135
};
136
136
} // namespace detail
137
137
} // namespace _V1
You can’t perform that action at this time.
0 commit comments