ArmNN
 22.08
EthosnRefPooling2dWorkload.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 
8 #include "EthosnRefPooling2d.hpp"
10 
11 using namespace armnn::ethosnref;
12 
13 namespace armnn
14 {
16 {
17  ARMNN_SCOPED_PROFILING_EVENT_ETHOSN("EthosnRefPooling2dWorkload_Execute");
18 
19  const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]);
20 
21  if (inputInfo.GetDataType() == DataType::QSymmS16) {
22  const int16_t* inputData = GetInputTensorData<int16_t>(0, m_Data);
23 
24  EthosnRefPooling2d(m_Data, inputData);
25  }
26  else if (inputInfo.GetDataType() == DataType::QSymmS8) {
27  const int8_t* inputData = GetInputTensorData<int8_t>(0, m_Data);
28 
29  EthosnRefPooling2d(m_Data, inputData);
30  }
31  else { // QAsymmU8
32  assert(inputInfo.GetDataType() == DataType::QAsymmU8);
33 
34  const uint8_t* inputData = GetInputTensorData<uint8_t>(0, m_Data);
35 
36  EthosnRefPooling2d(m_Data, inputData);
37  }
38 }
39 } //namespace armnn
Copyright (c) 2021 ARM Limited and Contributors.
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
DataType GetDataType() const
Definition: Tensor.hpp:198
#define ARMNN_SCOPED_PROFILING_EVENT_ETHOSN(name)
void EthosnRefPooling2d(const Pooling2dQueueDescriptor &data, const InputType *inputData)