ArmNN
 21.02
ExecutionFrame.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 namespace armnn
11 {
12 
13 using WorkloadQueue = std::vector< std::unique_ptr<IWorkload> >;
14 
15 /// ExecutionFrame interface to enqueue a workload computation.
17 {
18 
19 public:
20  virtual ~IExecutionFrame() {}
21 
22  virtual IExecutionFrame* ExecuteWorkloads(IExecutionFrame* previousFrame) = 0;
23  virtual void PostAllocationConfigure() {};
25 };
26 
28 {
29 public:
31 
32  IExecutionFrame* ExecuteWorkloads(IExecutionFrame* previousFrame) override ;
33  void PostAllocationConfigure() override;
34  void RegisterDebugCallback(const DebugCallbackFunction& func) override ;
35  void AddWorkloadToQueue(std::unique_ptr<IWorkload> workload);
36  void SetNextExecutionFrame(IExecutionFrame* nextExecutionFrame);
37 private:
38  WorkloadQueue m_WorkloadQueue;
39  IExecutionFrame* m_NextExecutionFrame = nullptr;
40 };
41 
42 }
virtual void RegisterDebugCallback(const DebugCallbackFunction &)
Copyright (c) 2021 ARM Limited and Contributors.
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:283
virtual IExecutionFrame * ExecuteWorkloads(IExecutionFrame *previousFrame)=0
ExecutionFrame interface to enqueue a workload computation.
std::vector< std::unique_ptr< IWorkload > > WorkloadQueue
virtual void PostAllocationConfigure()