diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2019-04-10 13:59:49 +0100 |
---|---|---|
committer | teresa.charlinreyes <teresa.charlinreyes@arm.com> | 2019-04-23 09:56:18 +0000 |
commit | 4de9f67c91b9224f447bd4a50b67129064b8c824 (patch) | |
tree | 46553bf229b195ba58bc23d3d967b60cdaedbc49 /src/armnn/ExecutionFrame.cpp | |
parent | 8271f8144db825960699fffd190ab3e546ee65fc (diff) | |
download | armnn-4de9f67c91b9224f447bd4a50b67129064b8c824.tar.gz |
IVGCVSW-2918 Implement ExecutionFrame.
*Add interface IExecutionFrame.
*Add basic implementation ExecutionFrame.
*Add Unit Test
Change-Id: I960ac84a05c0c9b03735ec5e9c63f6f8f95b57b5
Signed-off-by: Kevin May <kevin.may@arm.com>
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Diffstat (limited to 'src/armnn/ExecutionFrame.cpp')
-rw-r--r-- | src/armnn/ExecutionFrame.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/armnn/ExecutionFrame.cpp b/src/armnn/ExecutionFrame.cpp new file mode 100644 index 0000000000..4d952b22d9 --- /dev/null +++ b/src/armnn/ExecutionFrame.cpp @@ -0,0 +1,49 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "ExecutionFrame.hpp" + +using namespace std; + +namespace armnn +{ +ExecutionFrame::ExecutionFrame() {} + +IExecutionFrame* ExecutionFrame::ExecuteWorkloads(IExecutionFrame* previousFrame) +{ + for (auto& workload: m_WorkloadQueue) + { + workload->Execute(); + } + return m_NextExecutionFrame; +} + +void ExecutionFrame::PostAllocationConfigure() +{ + for (auto&& workloadPtr: m_WorkloadQueue) + { + workloadPtr.get()->PostAllocationConfigure(); + } +} + +void ExecutionFrame::RegisterDebugCallback(const DebugCallbackFunction& func) +{ + for (auto&& workloadPtr: m_WorkloadQueue) + { + workloadPtr.get()->RegisterDebugCallback(func); + } +} + +void ExecutionFrame::AddWorkloadToQueue(std::unique_ptr<IWorkload> workload) +{ + m_WorkloadQueue.push_back(move(workload)); +} + +void ExecutionFrame::SetNextExecutionFrame(IExecutionFrame* nextExecutionFrame) +{ + m_NextExecutionFrame = nextExecutionFrame; +} + +}
\ No newline at end of file |