ArmNN
 22.08
RefSpaceToDepthWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "SpaceToDepth.hpp"
8 
9 #include "RefWorkloadUtils.hpp"
10 #include <ResolveType.hpp>
11 
12 namespace armnn
13 {
14 
16 {
18 }
19 
21 {
22  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
23  Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
24 }
25 
26 void RefSpaceToDepthWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
27 {
28  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefSpaceToDepthWorkload_Execute");
29 
30  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
31  std::unique_ptr<Decoder<float>> decoder = MakeDecoder<float>(inputInfo, inputs[0]->Map());
32 
33  const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
34  std::unique_ptr<Encoder<float>> encoder = MakeEncoder<float>(outputInfo, outputs[0]->Map());
35 
36  SpaceToDepth(inputInfo, outputInfo, m_Data.m_Parameters, *decoder, *encoder);
37 }
38 
39 } //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
std::vector< ITensorHandle * > m_Outputs
void ExecuteAsync(ExecutionData &executionData) override
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers