Finn Williams | 73c547d | 2022-02-15 20:47:34 +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 RefBaseWorkload : public BaseWorkload<QueueDescriptor> |
| 14 | { |
| 15 | public: |
| 16 | RefBaseWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info) |
| 17 | : BaseWorkload<QueueDescriptor>(descriptor, info) |
| 18 | {} |
| 19 | |
| 20 | virtual bool SupportsTensorHandleReplacement() const override |
| 21 | { |
| 22 | return true; |
| 23 | } |
| 24 | // Replace input tensor handle with the given TensorHandle |
| 25 | void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 26 | { |
| 27 | this->m_Data.m_Inputs[slot] = tensorHandle; |
| 28 | } |
| 29 | |
| 30 | // Replace output tensor handle with the given TensorHandle |
| 31 | void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 32 | { |
| 33 | this->m_Data.m_Outputs[slot] = tensorHandle; |
| 34 | } |
| 35 | }; |
| 36 | } //namespace armnn |