ArmNN
 24.08
RefPooling2dWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include "Pooling2d.hpp"
9 #include "RefWorkloadUtils.hpp"
10 
11 #include "Profiling.hpp"
12 #include "BaseIterator.hpp"
13 
14 namespace armnn
15 {
17 {
19 }
20 
22 {
23  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
24  Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
25 }
26 
27 void RefPooling2dWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
28 {
29  ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefPooling2dWorkload_Execute");
30 
31  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
32  const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
33 
34  auto inputDecoder = MakeDecoder<float>(inputInfo, inputs[0] ->Map());
35  auto outputEncoder = MakeEncoder<float>(outputInfo, outputs[0]->Map());
36 
37  Pooling2d(*inputDecoder,
38  *outputEncoder,
39  inputInfo,
40  outputInfo,
42 }
43 } //namespace armnn
BaseIterator.hpp
armnn::Pooling2d
void Pooling2d(Decoder< float > &rInputDecoder, Encoder< float > &rOutputEncoder, const TensorInfo &inputInfo, const TensorInfo &outputInfo, const Pooling2dDescriptor &params)
Computes the Pooling2d operation.
Definition: Pooling2d.cpp:142
armnn::experimental::ExecutionData::m_Data
void * m_Data
Definition: ExecutionData.hpp:16
armnn::TensorInfo
Definition: Tensor.hpp:152
Profiling.hpp
ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
Definition: RefWorkloadUtils.hpp:22
RefPooling2dWorkload.hpp
armnn::RefPooling2dWorkload::ExecuteAsync
void ExecuteAsync(ExecutionData &executionData) override
Definition: RefPooling2dWorkload.cpp:21
armnn::QueueDescriptorWithParameters::m_Parameters
LayerDescriptor m_Parameters
Definition: WorkloadData.hpp:66
armnn::GetTensorInfo
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
Definition: RefWorkloadUtils.hpp:33
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
RefWorkloadUtils.hpp
armnn::BaseWorkload< Pooling2dQueueDescriptor >::m_Data
Pooling2dQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::RefPooling2dWorkload::Execute
void Execute() const override
Definition: RefPooling2dWorkload.cpp:16
armnn::LayerType::Map
@ Map
armnn::experimental::WorkingMemDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkingMemDescriptor.hpp:20
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::experimental::WorkingMemDescriptor
Definition: WorkingMemDescriptor.hpp:18
Pooling2d.hpp
armnn::experimental::WorkingMemDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkingMemDescriptor.hpp:21
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26
armnn::experimental::ExecutionData
Definition: ExecutionData.hpp:14