ArmNN
 22.05
RefSpaceToBatchNdWorkload.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 "SpaceToBatchNd.hpp"
8 
9 #include "RefWorkloadUtils.hpp"
10 #include <ResolveType.hpp>
11 
12 namespace armnn
13 {
14 
16 {
18 }
19 
21 {
22  Execute(workingMemDescriptor.m_Inputs, workingMemDescriptor.m_Outputs);
23 }
24 
25 void RefSpaceToBatchNdWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
26 {
27  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefSpaceToBatchNdWorkload_Execute");
28 
29  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
30  std::unique_ptr<Decoder<float>> decoder = MakeDecoder<float>(inputInfo, inputs[0]->Map());
31 
32  const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
33  std::unique_ptr<Encoder<float>> encoder = MakeEncoder<float>(outputInfo, outputs[0]->Map());
34 
35  SpaceToBatchNd(inputInfo, outputInfo, m_Data.m_Parameters, *decoder, *encoder);
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