ArmNN
 25.11
Loading...
Searching...
No Matches
RefResizeWorkload.cpp
Go to the documentation of this file.
1//
2// Copyright © 2019-2024 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7
9#include "Resize.hpp"
10#include "BaseIterator.hpp"
11#include "Profiling.hpp"
12
13#include "Decoders.hpp"
14#include "Encoders.hpp"
15
16namespace armnn
17{
18
20{
21 Execute(m_Data.m_Inputs, m_Data.m_Outputs);
22}
23
24void RefResizeWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
25{
26 ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefResizeWorkload_Execute");
27
28 const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
29 const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
30
31 std::unique_ptr<Decoder<float>> decoderPtr = MakeDecoder<float>(inputInfo, inputs[0]->Map());
32 Decoder<float> &decoder = *decoderPtr;
33 std::unique_ptr<Encoder<float>> encoderPtr = MakeEncoder<float>(outputInfo, outputs[0]->Map());
34 Encoder<float> &encoder = *encoderPtr;
35
36 Resize(decoder,
37 inputInfo,
38 encoder,
39 outputInfo,
44}
45
46} //namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
void Execute() const override
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< Decoder< T > > MakeDecoder(const TensorInfo &info, const void *data=nullptr)
std::unique_ptr< Encoder< T > > MakeEncoder(const TensorInfo &info, void *data=nullptr)
armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)
bool m_HalfPixelCenters
Half Pixel Centers.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
ResizeMethod m_Method
The Interpolation method to use (Bilinear, NearestNeighbor).
bool m_AlignCorners
Aligned corners.