ArmNN
 22.11
RefDepthToSpaceWorkload.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 
8 #include "DepthToSpace.hpp"
9 #include "RefWorkloadUtils.hpp"
10 
11 namespace armnn
12 {
13 
15 {
17 }
18 
20 {
21  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
22  Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
23 }
24 
25 void RefDepthToSpaceWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
26 {
27  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefDepthToSpaceWorkload_Execute");
28 
29  const TensorInfo inputInfo = GetTensorInfo(inputs[0]);
30 
31  DepthToSpace(inputInfo,
33  inputs[0]->Map(),
34  outputs[0]->Map(),
35  GetDataTypeSize(inputInfo.GetDataType()));
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(ExecutionData &executionData) override
DataType GetDataType() const
Definition: Tensor.hpp:198
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
constexpr unsigned int GetDataTypeSize(DataType dataType)
Definition: TypesUtils.hpp:151