blob: 67ab039ef3bc8082caef9b17d9e03509d4ec04de [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5
6#include "RefResizeBilinearUint8Workload.hpp"
7
8#include "RefWorkloadUtils.hpp"
9#include "ResizeBilinear.hpp"
10
11#include "Profiling.hpp"
12
13#include <vector>
14
15namespace armnn
16{
17
18void RefResizeBilinearUint8Workload::Execute() const
19{
20 ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefResizeBilinearUint8Workload_Execute");
21
22 const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]);
23 const TensorInfo& outputInfo = GetTensorInfo(m_Data.m_Outputs[0]);
24
25 auto dequant = Dequantize(GetInputTensorDataU8(0, m_Data), inputInfo);
26
27 std::vector<float> results(outputInfo.GetNumElements());
28 ResizeBilinear(dequant.data(), inputInfo, results.data(), outputInfo);
29
30 Quantize(GetOutputTensorDataU8(0, m_Data), results.data(), outputInfo);
31}
32
33} //namespace armnn