| 21 | } |
| 22 | |
| 23 | std::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 | |
| 37 | void *EventPool::Create() |
| 38 | { |
nothing calls this directly
no outgoing calls
no test coverage detected