11 namespace experimental
19 #if !defined(ARMNN_DISABLE_THREADS)
20 std::lock_guard<std::mutex> hold(m_Mutex);
24 m_StartTime = timeTaken.first;
25 m_EndTime = timeTaken.second;
26 m_NotificationQueue.push(m_InferenceId);
28 #if !defined(ARMNN_DISABLE_THREADS)
29 m_Condition.notify_all();
50 auto cb = std::make_unique<AsyncExecutionCallback>(m_NotificationQueue
51 #
if !defined(ARMNN_DISABLE_THREADS)
57 m_Callbacks.insert({id, std::move(cb)});
59 return m_Callbacks.at(
id);
64 #if !defined(ARMNN_DISABLE_THREADS)
65 std::unique_lock<std::mutex> lock(m_Mutex);
67 m_Condition.wait(lock, [
this] {
return !m_NotificationQueue.empty(); });
70 m_NotificationQueue.pop();
72 std::shared_ptr<AsyncExecutionCallback> callback = m_Callbacks.at(
id);
73 m_Callbacks.erase(
id);