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_space_to_depth_workload_8cpp_source.xhtml | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 20.02/_cl_space_to_depth_workload_8cpp_source.xhtml (limited to '20.02/_cl_space_to_depth_workload_8cpp_source.xhtml') diff --git a/20.02/_cl_space_to_depth_workload_8cpp_source.xhtml b/20.02/_cl_space_to_depth_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..8c0cad4ae1 --- /dev/null +++ b/20.02/_cl_space_to_depth_workload_8cpp_source.xhtml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + +ArmNN: src/backends/cl/workloads/ClSpaceToDepthWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ClSpaceToDepthWorkload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "ClWorkloadUtils.hpp"
8 
12 #include <cl/ClTensorHandle.hpp>
13 #include <boost/polymorphic_pointer_cast.hpp>
14 
15 namespace armnn
16 {
17 using namespace armcomputetensorutils;
18 
20  const WorkloadInfo& info)
22 {
23  m_Data.ValidateInputsOutputs("ClSpaceToDepthWorkload", 1, 1);
24 
25  arm_compute::DataLayout aclDataLayout = ConvertDataLayout(m_Data.m_Parameters.m_DataLayout);
26 
27  arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
28  input.info()->set_data_layout(aclDataLayout);
29 
30  int32_t blockSize = boost::numeric_cast<int32_t>(desc.m_Parameters.m_BlockSize);
31 
32  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
33  output.info()->set_data_layout(aclDataLayout);
34 
35  m_Layer.configure(&input, &output, blockSize);
36 }
37 
39 {
40  ARMNN_SCOPED_PROFILING_EVENT_CL("ClSpaceToDepthWorkload_Execute");
41  RunClFunction(m_Layer, CHECK_LOCATION());
42 }
43 
45  const TensorInfo& output,
46  const SpaceToDepthDescriptor& desc)
47 {
48  DataLayout dataLayout = desc.m_DataLayout;
49  const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input, dataLayout);
50 
51  int32_t blockSize = boost::numeric_cast<int32_t>(desc.m_BlockSize);
52 
53  const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output, dataLayout);
54 
55  const arm_compute::Status aclStatus = arm_compute::CLSpaceToDepthLayer::validate(&aclInputInfo,
56  &aclOutputInfo,
57  blockSize);
58  return aclStatus;
59 }
60 
61 } //namespace armnn
arm_compute::Status ClSpaceToDepthWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &desc)
+
DataLayout
Definition: Types.hpp:49
+ + +
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
ClSpaceToDepthWorkload(const SpaceToDepthQueueDescriptor &descriptor, const WorkloadInfo &info)
+
const SpaceToDepthQueueDescriptor 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.
+ + + +
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
+ + +
+
+ + + + -- cgit v1.2.1