From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/classarmnn_1_1_cl_constant_workload.xhtml | 234 ++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 20.02/classarmnn_1_1_cl_constant_workload.xhtml (limited to '20.02/classarmnn_1_1_cl_constant_workload.xhtml') diff --git a/20.02/classarmnn_1_1_cl_constant_workload.xhtml b/20.02/classarmnn_1_1_cl_constant_workload.xhtml new file mode 100644 index 0000000000..23048993f4 --- /dev/null +++ b/20.02/classarmnn_1_1_cl_constant_workload.xhtml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + +ArmNN: ClConstantWorkload Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ClConstantWorkload Class Reference
+
+
+ +

#include <ClConstantWorkload.hpp>

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

+Public Member Functions

 ClConstantWorkload (const ConstantQueueDescriptor &descriptor, const WorkloadInfo &info)
 
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 12 of file ClConstantWorkload.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ClConstantWorkload()

+ +
+
+ + + + + + + + + + + + + + + + + + +
ClConstantWorkload (const ConstantQueueDescriptordescriptor,
const WorkloadInfoinfo 
)
+
+ +

Definition at line 18 of file ClConstantWorkload.cpp.

+
19  : BaseWorkload<ConstantQueueDescriptor>(descriptor, info)
20  , m_RanOnce(false)
21 {
22 }
+
+
+
+

Member Function Documentation

+ +

◆ Execute()

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

Implements IWorkload.

+ +

Definition at line 24 of file ClConstantWorkload.cpp.

+ +

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

+
25 {
26  ARMNN_SCOPED_PROFILING_EVENT_CL("ClConstantWorkload_Execute");
27 
28  // The intermediate tensor held by the corresponding layer output handler can be initialised with the given data
29  // on the first inference, then reused for subsequent inferences.
30  // The initialisation cannot happen at workload construction time since the ACL kernel for the next layer may not
31  // have been configured at the time.
32  if (!m_RanOnce)
33  {
34  const ConstantQueueDescriptor& data = this->m_Data;
35 
36  BOOST_ASSERT(data.m_LayerOutput != nullptr);
37  arm_compute::CLTensor& output = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetTensor();
38  arm_compute::DataType computeDataType = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetDataType();
39 
40  switch (computeDataType)
41  {
42  case arm_compute::DataType::F16:
43  {
44  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<Half>());
45  break;
46  }
47  case arm_compute::DataType::F32:
48  {
49  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<float>());
50  break;
51  }
52  case arm_compute::DataType::QASYMM8:
53  {
54  CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor<uint8_t>());
55  break;
56  }
57  default:
58  {
59  BOOST_ASSERT_MSG(false, "Unknown data type");
60  break;
61  }
62  }
63 
64  m_RanOnce = true;
65  }
66 }
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
const ConstantQueueDescriptor m_Data
Definition: Workload.hpp:46
+
DataType
Definition: Types.hpp:32
+
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