ArmNN
 24.08
ExecutionFrame.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019-2021,2023 Arm Ltd and Contributors. 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 }
armnn::IExecutionFrame::PostAllocationConfigure
virtual void PostAllocationConfigure()
Definition: ExecutionFrame.hpp:23
armnn::IExecutionFrame::ExecuteWorkloads
virtual IExecutionFrame * ExecuteWorkloads(IExecutionFrame *previousFrame)=0
armnn::ExecutionFrame::RegisterDebugCallback
void RegisterDebugCallback(const DebugCallbackFunction &func) override
Definition: ExecutionFrame.cpp:32
armnn::WorkloadQueue
std::vector< std::unique_ptr< IWorkload > > WorkloadQueue
Definition: ExecutionFrame.hpp:13
armnn::ExecutionFrame::PostAllocationConfigure
void PostAllocationConfigure() override
Definition: ExecutionFrame.cpp:24
armnn::ExecutionFrame::SetNextExecutionFrame
void SetNextExecutionFrame(IExecutionFrame *nextExecutionFrame)
Definition: ExecutionFrame.cpp:45
Workload.hpp
armnn::ExecutionFrame
Definition: ExecutionFrame.hpp:27
armnn::DebugCallbackFunction
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:398
armnn::ExecutionFrame::AddWorkloadToQueue
void AddWorkloadToQueue(std::unique_ptr< IWorkload > workload)
Definition: ExecutionFrame.cpp:40
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ExecutionFrame::ExecutionFrame
ExecutionFrame()
Definition: ExecutionFrame.cpp:12
armnn::IExecutionFrame::RegisterDebugCallback
virtual void RegisterDebugCallback(const DebugCallbackFunction &)
Definition: ExecutionFrame.hpp:24
armnn::ExecutionFrame::ExecuteWorkloads
IExecutionFrame * ExecuteWorkloads(IExecutionFrame *previousFrame) override
Definition: ExecutionFrame.cpp:14
armnn::IExecutionFrame
ExecutionFrame interface to enqueue a workload computation.
Definition: ExecutionFrame.hpp:16
armnn::IExecutionFrame::~IExecutionFrame
virtual ~IExecutionFrame()
Definition: ExecutionFrame.hpp:20