blob: 3661fc7d46a14fadc689f55719309698ed290a88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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&) {};
};
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;
};
}
|