ArmNN
 22.11
TosaRefBaseWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 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 template <typename QueueDescriptor>
14 class TosaRefBaseWorkload : public BaseWorkload<QueueDescriptor>
15 {
16 public:
18  : BaseWorkload<QueueDescriptor>(descriptor, info)
19  {}
20 
21  virtual bool SupportsTensorHandleReplacement() const override
22  {
23  return true;
24  }
25 
26  // Replace input tensor handle with the given TensorHandle
27  void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
28  {
29  this->m_Data.m_Inputs[slot] = tensorHandle;
30  }
31 
32  // Replace output tensor handle with the given TensorHandle
33  void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
34  {
35  this->m_Data.m_Outputs[slot] = tensorHandle;
36  }
37 };
38 
39 } //namespace armnn
virtual bool SupportsTensorHandleReplacement() const override
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Copyright (c) 2021 ARM Limited and Contributors.
QueueDescriptor m_Data
Definition: Workload.hpp:83
TosaRefBaseWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
std::vector< ITensorHandle * > m_Outputs
Contains information about TensorInfos of a layer.
std::vector< ITensorHandle * > m_Inputs
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override