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/_cl_stack_workload_8cpp_source.xhtml | 141 +++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 21.02/_cl_stack_workload_8cpp_source.xhtml (limited to '21.02/_cl_stack_workload_8cpp_source.xhtml') diff --git a/21.02/_cl_stack_workload_8cpp_source.xhtml b/21.02/_cl_stack_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..ad742a3fde --- /dev/null +++ b/21.02/_cl_stack_workload_8cpp_source.xhtml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + +ArmNN: src/backends/cl/workloads/ClStackWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ClStackWorkload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include "ClStackWorkload.hpp"
6 #include "ClWorkloadUtils.hpp"
11 #include <cl/ClTensorHandle.hpp>
12 #include <cl/ClLayerSupport.hpp>
13 
14 #include <arm_compute/core/Types.h>
15 
16 namespace armnn
17 {
18 using namespace armcomputetensorutils;
19 
20 namespace
21 {
22 int CalcAxis(const unsigned int axis, const unsigned int inputDimensions)
23 {
24  const int intAxis = armnn::numeric_cast<int>(axis);
25  return armnn::numeric_cast<int>(inputDimensions) - intAxis;
26 }
27 } //namespace
28 
29 arm_compute::Status ClStackWorkloadValidate(const std::vector<const TensorInfo*>& inputs,
30  const TensorInfo& output,
31  const StackDescriptor& descriptor)
32 {
33  std::vector<arm_compute::ITensorInfo*> aclInputPtrs;
34  arm_compute::TensorInfo aclInputInfo;
35  for (const TensorInfo* input : inputs)
36  {
37  aclInputInfo = BuildArmComputeTensorInfo(*input);
38  aclInputPtrs.emplace_back(&aclInputInfo);
39  }
40  const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
41 
42  int aclAxis = CalcAxis(descriptor.m_Axis, descriptor.m_InputShape.GetNumDimensions());
43 
44  return arm_compute::CLStackLayer::validate(aclInputPtrs, aclAxis, &aclOutputInfo);
45 }
46 
48  const WorkloadInfo& info,
49  const arm_compute::CLCompileContext& clCompileContext)
50 : BaseWorkload<StackQueueDescriptor>(descriptor, info)
51 {
52  std::vector<arm_compute::ICLTensor*> aclInputs;
53  for (auto input : m_Data.m_Inputs)
54  {
55  arm_compute::ICLTensor& aclInput = armnn::PolymorphicPointerDowncast<IClTensorHandle>(input)->GetTensor();
56  aclInputs.emplace_back(&aclInput);
57  }
58  arm_compute::ICLTensor& output = armnn::PolymorphicPointerDowncast<IClTensorHandle>(
59  m_Data.m_Outputs[0])->GetTensor();
60 
61  m_Layer.reset(new arm_compute::CLStackLayer());
62  int aclAxis = CalcAxis(descriptor.m_Parameters.m_Axis, descriptor.m_Parameters.m_InputShape.GetNumDimensions());
63  m_Layer->configure(clCompileContext, aclInputs, aclAxis, &output);
64 }
65 
67 {
68  if (m_Layer)
69  {
70  ARMNN_SCOPED_PROFILING_EVENT_CL("ClStackWorkload_Execute");
71  m_Layer->run();
72  }
73 }
74 
75 } //namespace armnn
uint32_t m_Axis
0-based axis along which to stack the input tensors.
+ +
TensorShape m_InputShape
Required shape of all input tensors.
+
ClStackWorkload(const StackQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
+
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
const StackQueueDescriptor m_Data
Definition: Workload.hpp:46
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+
void Execute() const override
+ + +
A StackDescriptor for the StackLayer.
+ + +
arm_compute::Status ClStackWorkloadValidate(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor)
+ +
Status
enumeration
Definition: Types.hpp:26
+ + +
std::vector< ITensorHandle * > m_Outputs
+ +
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Definition: Tensor.cpp:174
+
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:35
+
Contains information about inputs and outputs to a layer.
+
std::vector< ITensorHandle * > m_Inputs
+ + +
+
+ + + + -- cgit v1.2.1