5 #if !defined(ARMNN_DISABLE_THREADS)
15 #include <condition_variable>
16 #include <unordered_map>
25 namespace experimental
27 class IAsyncExecutionCallback;
28 class IWorkingMemHandle;
35 std::vector<std::shared_ptr<IWorkingMemHandle>> memHandles);
42 void LoadMemHandles(std::vector<std::shared_ptr<IWorkingMemHandle>> memHandles);
50 std::shared_ptr<IAsyncExecutionCallback> cb);
60 using ExecutionQueue =
std::queue<
std::shared_ptr<ExecutionTuple>>;
62 void ProcessExecPriorities(uint32_t index);
66 ExecutionQueue m_HighPriorityQueue;
67 ExecutionQueue m_MediumPriorityQueue;
68 ExecutionQueue m_LowPriorityQueue;
72 std::condition_variable m_ThreadPoolEvent;
73 std::mutex m_ThreadPoolMutex;
76 bool m_TerminatePool = false;
79 std::vector<
std::unique_ptr<
std::thread>> m_Threads;