blob: a92f35a173c68f79b4006785f54f935c476ef177 [file] [log] [blame]
Teresa Charlin98b0dcb2022-01-18 22:09:29 +00001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include <armnn/backends/Workload.hpp>
9
10namespace armnn
11{
12template <typename QueueDescriptor>
13class NeonBaseWorkload : public BaseWorkload<QueueDescriptor>
14{
15public:
16 NeonBaseWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info)
17 : BaseWorkload<QueueDescriptor>(descriptor, info)
18 {}
19
20 // Replace input tensor handle with the given TensorHandle and call Reconfigure()
21 void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
22 {
23 this->m_Data.m_Inputs[slot] = tensorHandle;
24 Reconfigure();
25 }
26
27 // Replace output tensor handle with the given TensorHandle and call Reconfigure()
28 void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
29 {
30 this->m_Data.m_Outputs[slot] = tensorHandle;
31 Reconfigure();
32 }
33
34 // Reconfigure the workload configuration. Throw armnn::UnimplementedException by default.
35 virtual void Reconfigure()
36 {
37 throw armnn::UnimplementedException("Reconfigure not implemented for this workload");
38 }
39};
40} //namespace armnn