ArmNN
 24.11
RefGatherWorkload Class Reference

#include <RefGatherWorkload.hpp>

Inheritance diagram for RefGatherWorkload:
[legend]
Collaboration diagram for RefGatherWorkload:
[legend]

Public Member Functions

void Execute () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
- Public Member Functions inherited from RefBaseWorkload< GatherQueueDescriptor >
 RefBaseWorkload (const GatherQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual bool SupportsTensorHandleReplacement () const override
 
void ReplaceInputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
void ReplaceOutputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
- Public Member Functions inherited from BaseWorkload< GatherQueueDescriptor >
 BaseWorkload (const GatherQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual const std::string & GetName () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const GatherQueueDescriptorGetData () const
 
arm::pipe::ProfilingGuid GetGuid () const final
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual arm::pipe::ProfilingGuid GetGuid () const =0
 
virtual bool SupportsTensorHandleReplacement () const =0
 
virtual const std::string & GetName () const =0
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< GatherQueueDescriptor >
GatherQueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 
const std::string m_Name
 

Detailed Description

Definition at line 19 of file RefGatherWorkload.hpp.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 17 of file RefGatherWorkload.cpp.

18 {
19  auto inputDataType = GetTensorInfo(m_Data.m_Inputs[0]).GetDataType();
20  if(inputDataType == DataType::Signed64)
21  {
22  Execute<double_t>(m_Data.m_Inputs, m_Data.m_Outputs);
23  }
24  else
25  {
26  Execute<float>(m_Data.m_Inputs, m_Data.m_Outputs);
27  }
28 }

References TensorInfo::GetDataType(), armnn::GetTensorInfo(), BaseWorkload< GatherQueueDescriptor >::m_Data, QueueDescriptor::m_Inputs, QueueDescriptor::m_Outputs, and armnn::Signed64.

◆ ExecuteAsync()

void ExecuteAsync ( ExecutionData executionData)
overridevirtual

Implements IWorkload.

Definition at line 30 of file RefGatherWorkload.cpp.

31 {
32  auto* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
33  auto inputDataType = GetTensorInfo(workingMemDescriptor->m_Inputs[0]).GetDataType();
34  if(inputDataType == DataType::Signed64)
35  {
36  Execute<double_t>(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
37  }
38  else
39  {
40  Execute<float>(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
41  }
42 }

References TensorInfo::GetDataType(), armnn::GetTensorInfo(), ExecutionData::m_Data, and armnn::Signed64.


The documentation for this class was generated from the following files:
armnn::GetTensorInfo
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
Definition: RefWorkloadUtils.hpp:33
armnn::TensorInfo::GetDataType
DataType GetDataType() const
Definition: Tensor.hpp:200
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::BaseWorkload< GatherQueueDescriptor >::m_Data
GatherQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::DataType::Signed64
@ Signed64
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26