ArmNN
 20.05
ClTransposeWorkload Class Reference

#include <ClTransposeWorkload.hpp>

Inheritance diagram for ClTransposeWorkload:
BaseWorkload< TransposeQueueDescriptor > IWorkload

Public Member Functions

 ClTransposeWorkload (const TransposeQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void Execute () const override
 
- Public Member Functions inherited from BaseWorkload< TransposeQueueDescriptor >
 BaseWorkload (const TransposeQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void PostAllocationConfigure () override
 
const TransposeQueueDescriptorGetData () const
 
profiling::ProfilingGuid GetGuid () const final
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 

Static Public Member Functions

static const std::string & GetName ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< TransposeQueueDescriptor >
const TransposeQueueDescriptor m_Data
 
const profiling::ProfilingGuid m_Guid
 

Detailed Description

Definition at line 23 of file ClTransposeWorkload.hpp.

Constructor & Destructor Documentation

◆ ClTransposeWorkload()

ClTransposeWorkload ( const TransposeQueueDescriptor descriptor,
const WorkloadInfo info 
)

Definition at line 29 of file ClTransposeWorkload.cpp.

References ClTransposeWorkload::GetName(), BaseWorkload< TransposeQueueDescriptor >::m_Data, TransposeDescriptor::m_DimMappings, QueueDescriptor::m_Inputs, QueueDescriptor::m_Outputs, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, and QueueDescriptor::ValidateInputsOutputs().

Referenced by ClTransposeWorkload::GetName().

31  : BaseWorkload<TransposeQueueDescriptor>(descriptor, info)
32 {
34 
35  const arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
36  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
38  // Run the layer.
39  m_PermuteFunction.configure(&input, &output,
40  armcomputetensorutils::BuildArmComputeTransposeVector(mappings));
41 }
static const std::string & GetName()
const TransposeQueueDescriptor m_Data
Definition: Workload.hpp:46
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination, when source and target potentially have different memory layouts e.g.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 43 of file ClTransposeWorkload.cpp.

References ARMNN_SCOPED_PROFILING_EVENT_CL, CHECK_LOCATION, ClTransposeWorkload::GetName(), and armnn::RunClFunction().

Referenced by ClTransposeWorkload::GetName().

44 {
46  RunClFunction(m_PermuteFunction, CHECK_LOCATION());
47 }
static const std::string & GetName()
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
#define CHECK_LOCATION()
Definition: Exceptions.hpp:192

◆ GetName()

static const std::string& GetName ( )
inlinestatic

Definition at line 26 of file ClTransposeWorkload.hpp.

References ClTransposeWorkload::ClTransposeWorkload(), ClTransposeWorkload::Execute(), and armnn::info.

Referenced by ClTransposeWorkload::ClTransposeWorkload(), and ClTransposeWorkload::Execute().

27  {
28  static const std::string name = std::string("ClTransposeWorkload");
29  return name;
30  }

The documentation for this class was generated from the following files: