ArmNN
 24.02
RefBaseWorkload.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  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
armnn::RefBaseWorkload::ReplaceOutputTensorHandle
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: RefBaseWorkload.hpp:31
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::RefBaseWorkload::SupportsTensorHandleReplacement
virtual bool SupportsTensorHandleReplacement() const override
Definition: RefBaseWorkload.hpp:20
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::RefBaseWorkload::ReplaceInputTensorHandle
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: RefBaseWorkload.hpp:25
armnn::RefBaseWorkload::RefBaseWorkload
RefBaseWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: RefBaseWorkload.hpp:16
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::RefBaseWorkload
Definition: RefBaseWorkload.hpp:13
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26