Teresa Charlin | 98b0dcb | 2022-01-18 22:09:29 +0000 | [diff] [blame] | 1 | // |
| 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 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | template <typename QueueDescriptor> |
| 13 | class NeonBaseWorkload : public BaseWorkload<QueueDescriptor> |
| 14 | { |
| 15 | public: |
| 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 |