ArmNN
 22.05.01
RefDequantizeWorkload.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 #include "RefWorkloadUtils.hpp"
8 #include "Encoders.hpp"
9 #include "Decoders.hpp"
10 #include "Dequantize.hpp"
11 
12 namespace armnn
13 {
14 
16 {
18 }
19 
21 {
22  Execute(workingMemDescriptor.m_Inputs, workingMemDescriptor.m_Outputs);
23 }
24 
25 void RefDequantizeWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
26 {
27  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefDequantizeWorkload_Execute");
28 
29  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
30  const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
31 
32  auto inputDecoder = MakeDecoder<float>(inputInfo, inputs[0]->Map());
33  auto outputEncoder = MakeEncoder<float>(outputInfo, outputs[0]->Map());
34 
35  Dequantize(*inputDecoder, *outputEncoder, inputInfo, outputInfo);
36 }
37 
38 } // namespace armnn
CPU Execution: Reference C++ kernels.
Copyright (c) 2021 ARM Limited and Contributors.
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
void ExecuteAsync(WorkingMemDescriptor &workingMemDescriptor) override
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers