MCPcopy Create free account
hub / github.com/XpuOS/xsched / Instance

Method Instance

platforms/levelzero/hal/src/pool.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23std::shared_ptr<EventPool> EventPool::Instance(ze_context_handle_t ctx)
24{
25 static std::mutex mtx;
26 static std::map<ze_context_handle_t, std::shared_ptr<EventPool>> pools;
27
28 std::lock_guard<std::mutex> lock(mtx);
29 auto it = pools.find(ctx);
30 if (it != pools.end()) return it->second;
31
32 auto event_pool = std::make_shared<EventPool>(ctx);
33 pools[ctx] = event_pool;
34 return event_pool;
35}
36
37void *EventPool::Create()
38{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected