aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/ExecutionFrame.hpp
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2019-04-10 13:59:49 +0100
committerteresa.charlinreyes <teresa.charlinreyes@arm.com>2019-04-23 09:56:18 +0000
commit4de9f67c91b9224f447bd4a50b67129064b8c824 (patch)
tree46553bf229b195ba58bc23d3d967b60cdaedbc49 /src/armnn/ExecutionFrame.hpp
parent8271f8144db825960699fffd190ab3e546ee65fc (diff)
downloadarmnn-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.hpp')
-rw-r--r--src/armnn/ExecutionFrame.hpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/armnn/ExecutionFrame.hpp b/src/armnn/ExecutionFrame.hpp
new file mode 100644
index 0000000000..c7e7780235
--- /dev/null
+++ b/src/armnn/ExecutionFrame.hpp
@@ -0,0 +1,42 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <backendsCommon/Workload.hpp>
+
+namespace armnn
+{
+
+using WorkloadQueue = std::vector< std::unique_ptr<IWorkload> >;
+
+/// ExecutionFrame interface to enqueue a workload computation.
+class IExecutionFrame
+{
+
+public:
+ ~IExecutionFrame() {}
+
+ virtual IExecutionFrame* ExecuteWorkloads(IExecutionFrame* previousFrame) = 0;
+ virtual void PostAllocationConfigure() {};
+ virtual void RegisterDebugCallback(const DebugCallbackFunction& func) {};
+};
+
+class ExecutionFrame: public IExecutionFrame
+{
+public:
+ ExecutionFrame();
+
+ IExecutionFrame* ExecuteWorkloads(IExecutionFrame* previousFrame) override ;
+ void PostAllocationConfigure() override;
+ void RegisterDebugCallback(const DebugCallbackFunction& func) override ;
+ void AddWorkloadToQueue(std::unique_ptr<IWorkload> workload);
+ void SetNextExecutionFrame(IExecutionFrame* nextExecutionFrame);
+private:
+ WorkloadQueue m_WorkloadQueue;
+ IExecutionFrame* m_NextExecutionFrame = nullptr;
+};
+
+} \ No newline at end of file