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 --- .../_cl_depth_to_space_workload_8cpp_source.xhtml | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 20.02/_cl_depth_to_space_workload_8cpp_source.xhtml (limited to '20.02/_cl_depth_to_space_workload_8cpp_source.xhtml') diff --git a/20.02/_cl_depth_to_space_workload_8cpp_source.xhtml b/20.02/_cl_depth_to_space_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..4a8ba82be3 --- /dev/null +++ b/20.02/_cl_depth_to_space_workload_8cpp_source.xhtml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + +ArmNN: src/backends/cl/workloads/ClDepthToSpaceWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ClDepthToSpaceWorkload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include "ClWorkloadUtils.hpp"
9 
11 
12 #include <cl/ClTensorHandle.hpp>
13 
14 #include <boost/numeric/conversion/cast.hpp>
15 #include <boost/polymorphic_pointer_cast.hpp>
16 
17 namespace armnn
18 {
19 
20 using namespace armcomputetensorutils;
21 
23  const TensorInfo& output,
24  const DepthToSpaceDescriptor& desc)
25 {
26  DataLayout dataLayout = desc.m_DataLayout;
27  const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input, dataLayout);
28 
29  int32_t blockSize = boost::numeric_cast<int32_t>(desc.m_BlockSize);
30 
31  const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output, dataLayout);
32 
33  const arm_compute::Status aclStatus = arm_compute::CLDepthToSpaceLayer::validate(&aclInputInfo,
34  &aclOutputInfo,
35  blockSize);
36  return aclStatus;
37 }
38 
40  const WorkloadInfo& 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 }
59 
61 {
62  ARMNN_SCOPED_PROFILING_EVENT_CL("ClDepthToSpaceWorkload_Execute");
63  RunClFunction(m_Layer, CHECK_LOCATION());
64 }
65 
66 } // namespace armnn
DataLayout
Definition: Types.hpp:49
+ +
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
const DepthToSpaceQueueDescriptor m_Data
Definition: Workload.hpp:46
+ +
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
Copyright (c) 2020 ARM Limited.
+
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
+ +
ClDepthToSpaceWorkload(const DepthToSpaceQueueDescriptor &descriptor, const WorkloadInfo &info)
+ +
Status
enumeration
Definition: Types.hpp:26
+
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:33
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:192
+
unsigned int m_BlockSize
Scalar specifying the input block size. It must be >= 1.
+
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
+ + +
std::vector< ITensorHandle * > m_Outputs
+ + +
Contains information about inputs and outputs to a layer.
+ +
std::vector< ITensorHandle * > m_Inputs
+
arm_compute::Status ClDepthToSpaceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &desc)
+ +
+
+ + + + -- cgit v1.2.1