aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/RefDepthToSpaceWorkload.cpp
blob: 2dddbd7de51e291c97960b341f59c78b853d4e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Copyright © 2019,2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "RefDepthToSpaceWorkload.hpp"

#include "DepthToSpace.hpp"
#include "RefWorkloadUtils.hpp"

namespace armnn
{

void RefDepthToSpaceWorkload::Execute() const
{
    Execute(m_Data.m_Inputs, m_Data.m_Outputs);
}

void RefDepthToSpaceWorkload::ExecuteAsync(ExecutionData& executionData)
{
    WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
    Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
}

void RefDepthToSpaceWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
{
    ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefDepthToSpaceWorkload_Execute");
    const TensorInfo inputInfo = GetTensorInfo(inputs[0]);

    DepthToSpace(inputInfo,
                 m_Data.m_Parameters,
                 inputs[0]->Map(),
                 outputs[0]->Map(),
                 GetDataTypeSize(inputInfo.GetDataType()));
}

} // namespace armnn