From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/classarmnn_1_1_cl_constant_workload.xhtml | 242 ++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 21.02/classarmnn_1_1_cl_constant_workload.xhtml (limited to '21.02/classarmnn_1_1_cl_constant_workload.xhtml') diff --git a/21.02/classarmnn_1_1_cl_constant_workload.xhtml b/21.02/classarmnn_1_1_cl_constant_workload.xhtml new file mode 100644 index 0000000000..d65dddb1cc --- /dev/null +++ b/21.02/classarmnn_1_1_cl_constant_workload.xhtml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + +ArmNN: ClConstantWorkload Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ClConstantWorkload Class Reference
+
+
+ +

#include <ClConstantWorkload.hpp>

+
+Inheritance diagram for ClConstantWorkload:
+
+
+ + +BaseWorkload< ConstantQueueDescriptor > +IWorkload + +
+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ClConstantWorkload (const ConstantQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
 
void Execute () const override
 
- Public Member Functions inherited from BaseWorkload< ConstantQueueDescriptor >
 BaseWorkload (const ConstantQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void PostAllocationConfigure () override
 
const ConstantQueueDescriptorGetData () 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< ConstantQueueDescriptor >
const ConstantQueueDescriptor m_Data
 
const profiling::ProfilingGuid m_Guid
 
+

Detailed Description

+
+

Definition at line 17 of file ClConstantWorkload.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ClConstantWorkload()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ClConstantWorkload (const ConstantQueueDescriptordescriptor,
const WorkloadInfoinfo,
const arm_compute::CLCompileContext & clCompileContext 
)
+
+ +

Definition at line 44 of file ClConstantWorkload.cpp.

+
47  : BaseWorkload<ConstantQueueDescriptor>(descriptor, info)
48  , m_RanOnce(false)
49 {
50 }
+
+
+
+

Member Function Documentation

+ +

◆ Execute()

+ +
+
+ + + + + +
+ + + + + + + +
void Execute () const
+
+overridevirtual
+
+ +

Implements IWorkload.

+ +

Definition at line 52 of file ClConstantWorkload.cpp.

+ +

References ARMNN_ASSERT, ARMNN_ASSERT_MSG, ARMNN_SCOPED_PROFILING_EVENT_CL, armnn::CopyArmComputeClTensorData(), ConstCpuTensorHandle::GetConstTensor(), BaseWorkload< ConstantQueueDescriptor >::m_Data, ConstantQueueDescriptor::m_LayerOutput, and QueueDescriptor::m_Outputs.

+
53 {
54  ARMNN_SCOPED_PROFILING_EVENT_CL("ClConstantWorkload_Execute");
55 
56  // The intermediate tensor held by the corresponding layer output handler can be initialised with the given data
57  // on the first inference, then reused for subsequent inferences.
58  // The initialisation cannot happen at workload construction time since the ACL kernel for the next layer may not
59  // have been configured at the time.
60  if (!m_RanOnce)
61  {
62  const ConstantQueueDescriptor& data = this->m_Data;
63 
64  ARMNN_ASSERT(data.m_LayerOutput != nullptr);
65  arm_compute::CLTensor& output = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetTensor();
66  arm_compute::DataType computeDataType = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetDataType();
67 
68  switch (computeDataType)
69  {
70  case arm_compute::DataType::F16:
71  {
72  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<Half>());
73  break;
74  }
75  case arm_compute::DataType::F32:
76  {
77  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<float>());
78  break;
79  }
80  case arm_compute::DataType::QASYMM8:
81  {
82  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<uint8_t>());
83  break;
84  }
85  case arm_compute::DataType::QASYMM8_SIGNED:
86  {
87  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<int8_t>());
88  break;
89  }
90  case arm_compute::DataType::QSYMM16:
91  {
92  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<int16_t>());
93  break;
94  }
95  case arm_compute::DataType::QSYMM8:
96  case arm_compute::DataType::QSYMM8_PER_CHANNEL:
97  {
98  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<int8_t>());
99  break;
100  }
101  case arm_compute::DataType::S32:
102  {
103  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<int32_t>());
104  break;
105  }
106  default:
107  {
108  ARMNN_ASSERT_MSG(false, "Unknown data type");
109  break;
110  }
111  }
112 
113  m_RanOnce = true;
114  }
115 }
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
const ConstantQueueDescriptor m_Data
Definition: Workload.hpp:46
+
DataType
Definition: Types.hpp:32
+
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
+
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
void CopyArmComputeClTensorData(arm_compute::CLTensor &dstTensor, const T *srcData)
+
half_float::half Half
Definition: Half.hpp:16
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1