blob: 92a79908816e2ea23613fa2c129af892a799ba09 [file] [log] [blame]
Teresa Charlin4de9f672019-04-10 13:59:49 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "ExecutionFrame.hpp"
7
8using namespace std;
9
10namespace armnn
11{
12ExecutionFrame::ExecutionFrame() {}
13
14IExecutionFrame* ExecutionFrame::ExecuteWorkloads(IExecutionFrame* previousFrame)
15{
Jan Eilers8eb25602020-03-09 12:13:48 +000016 IgnoreUnused(previousFrame);
Teresa Charlin4de9f672019-04-10 13:59:49 +010017 for (auto& workload: m_WorkloadQueue)
18 {
19 workload->Execute();
20 }
21 return m_NextExecutionFrame;
22}
23
24void ExecutionFrame::PostAllocationConfigure()
25{
26 for (auto&& workloadPtr: m_WorkloadQueue)
27 {
28 workloadPtr.get()->PostAllocationConfigure();
29 }
30}
31
32void ExecutionFrame::RegisterDebugCallback(const DebugCallbackFunction& func)
33{
34 for (auto&& workloadPtr: m_WorkloadQueue)
35 {
36 workloadPtr.get()->RegisterDebugCallback(func);
37 }
38}
39
40void ExecutionFrame::AddWorkloadToQueue(std::unique_ptr<IWorkload> workload)
41{
42 m_WorkloadQueue.push_back(move(workload));
43}
44
45void ExecutionFrame::SetNextExecutionFrame(IExecutionFrame* nextExecutionFrame)
46{
47 m_NextExecutionFrame = nextExecutionFrame;
48}
49
50}