ArmNN
 24.08
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:
17  TosaRefBaseWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info)
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
armnn::TosaRefBaseWorkload::SupportsTensorHandleReplacement
virtual bool SupportsTensorHandleReplacement() const override
Definition: TosaRefBaseWorkload.hpp:21
armnn::TosaRefBaseWorkload::ReplaceInputTensorHandle
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: TosaRefBaseWorkload.hpp:27
armnn::TosaRefBaseWorkload::TosaRefBaseWorkload
TosaRefBaseWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: TosaRefBaseWorkload.hpp:17
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
Workload.hpp
armnn::QueueDescriptor
Definition: WorkloadData.hpp:24
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::BaseWorkload
Definition: Workload.hpp:33
armnn::BaseWorkload::m_Data
QueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::TosaRefBaseWorkload
Definition: TosaRefBaseWorkload.hpp:14
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::TosaRefBaseWorkload::ReplaceOutputTensorHandle
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: TosaRefBaseWorkload.hpp:33
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26