ArmNN
 20.02
ClDepthToSpaceWorkload Class Reference

#include <ClDepthToSpaceWorkload.hpp>

Inheritance diagram for ClDepthToSpaceWorkload:
BaseWorkload< DepthToSpaceQueueDescriptor > IWorkload

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file ClDepthToSpaceWorkload.hpp.

Constructor & Destructor Documentation

◆ ClDepthToSpaceWorkload()

ClDepthToSpaceWorkload ( const DepthToSpaceQueueDescriptor descriptor,
const WorkloadInfo info 
)

Definition at line 39 of file ClDepthToSpaceWorkload.cpp.

References BaseWorkload< DepthToSpaceQueueDescriptor >::m_Data, and QueueDescriptor::ValidateInputsOutputs().

41  : BaseWorkload<DepthToSpaceQueueDescriptor>(desc, info)
42 {
43  m_Data.ValidateInputsOutputs("ClDepthToSpaceWorkload", 1, 1);
44 
45  arm_compute::DataLayout aclDataLayout = ConvertDataLayout(m_Data.m_Parameters.m_DataLayout);
46 
47  arm_compute::ICLTensor& input =
48  boost::polymorphic_pointer_downcast<IClTensorHandle>(m_Data.m_Inputs[0])->GetTensor();
49  input.info()->set_data_layout(aclDataLayout);
50 
51  int32_t blockSize = boost::numeric_cast<int32_t>(desc.m_Parameters.m_BlockSize);
52 
53  arm_compute::ICLTensor& output =
54  boost::polymorphic_pointer_downcast<IClTensorHandle>(m_Data.m_Outputs[0])->GetTensor();
55  output.info()->set_data_layout(aclDataLayout);
56 
57  m_Layer.configure(&input, &output, blockSize);
58 }
DataLayout
Definition: Types.hpp:49
const DepthToSpaceQueueDescriptor m_Data
Definition: Workload.hpp:46
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:33
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 60 of file ClDepthToSpaceWorkload.cpp.

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

61 {
62  ARMNN_SCOPED_PROFILING_EVENT_CL("ClDepthToSpaceWorkload_Execute");
63  RunClFunction(m_Layer, CHECK_LOCATION());
64 }
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
#define CHECK_LOCATION()
Definition: Exceptions.hpp:192

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