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/_cl_resize_workload_8cpp_source.xhtml | 145 ++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 20.02/_cl_resize_workload_8cpp_source.xhtml (limited to '20.02/_cl_resize_workload_8cpp_source.xhtml') diff --git a/20.02/_cl_resize_workload_8cpp_source.xhtml b/20.02/_cl_resize_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..3f63e38fdc --- /dev/null +++ b/20.02/_cl_resize_workload_8cpp_source.xhtml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + +ArmNN: src/backends/cl/workloads/ClResizeWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ClResizeWorkload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "ClResizeWorkload.hpp"
7 
8 #include "ClWorkloadUtils.hpp"
9 
12 
14 
15 #include <cl/ClTensorHandle.hpp>
16 
17 using namespace armnn::armcomputetensorutils;
18 
19 namespace armnn
20 {
21 
23  const TensorInfo& output,
24  const ResizeDescriptor& descriptor)
25 {
26  arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input);
27  arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
28 
29  arm_compute::DataLayout aclDataLayout = ConvertDataLayout(descriptor.m_DataLayout);
30  aclInputInfo.set_data_layout(aclDataLayout);
31  aclOutputInfo.set_data_layout(aclDataLayout);
32 
33  arm_compute::InterpolationPolicy aclInterpolationPolicy =
35 
36  return arm_compute::CLScale::validate(&aclInputInfo,
37  &aclOutputInfo,
38  aclInterpolationPolicy,
39  arm_compute::BorderMode::REPLICATE,
40  arm_compute::PixelValue(0.f),
41  arm_compute::SamplingPolicy::TOP_LEFT,
42  true,
43  descriptor.m_BilinearAlignCorners);
44 }
45 
47  BaseWorkload<ResizeQueueDescriptor>(descriptor, info)
48 {
49  m_Data.ValidateInputsOutputs("ClResizeWorkload", 1, 1);
50 
51  arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
52  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
53 
54  arm_compute::DataLayout aclDataLayout = ConvertDataLayout(m_Data.m_Parameters.m_DataLayout);
55  input.info()->set_data_layout(aclDataLayout);
56  output.info()->set_data_layout(aclDataLayout);
57 
58  arm_compute::InterpolationPolicy aclInterpolationPolicy =
60 
61  m_ResizeLayer.configure(&input,
62  &output,
63  aclInterpolationPolicy,
64  arm_compute::BorderMode::REPLICATE,
65  arm_compute::PixelValue(0.f),
66  arm_compute::SamplingPolicy::TOP_LEFT,
67  true,
69 };
70 
72 {
73  ARMNN_SCOPED_PROFILING_EVENT_CL("ClResizeWorkload_Execute");
74  RunClFunction(m_ResizeLayer, CHECK_LOCATION());
75 }
76 
77 } //namespace armnn
ClResizeWorkload(const ResizeQueueDescriptor &descriptor, const WorkloadInfo &info)
+
arm_compute::InterpolationPolicy ConvertResizeMethodToAclInterpolationPolicy(ResizeMethod resizeMethod)
+
DataLayout
Definition: Types.hpp:49
+ + + +
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
const ResizeQueueDescriptor m_Data
Definition: Workload.hpp:46
+
ResizeMethod m_Method
The Interpolation method to use (Bilinear, NearestNeighbor).
+ +
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
Copyright (c) 2020 ARM Limited.
+ +
A ResizeDescriptor for the ResizeLayer.
+ + +
bool m_BilinearAlignCorners
Aligned corners for bilinear method.
+
void Execute() const override
+
Status
enumeration
Definition: Types.hpp:26
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:192
+
arm_compute::Status ClResizeWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor)
+ + +
std::vector< ITensorHandle * > m_Outputs
+ + +
Contains information about inputs and outputs to a layer.
+
std::vector< ITensorHandle * > m_Inputs
+
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
+ + +
+
+ + + + -- cgit v1.2.1