Aron Virginas-Tar | 73f6642 | 2019-09-23 19:11:59 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "RefDepthToSpaceWorkload.hpp" |
| 7 | |
| 8 | #include "DepthToSpace.hpp" |
| 9 | #include "RefWorkloadUtils.hpp" |
| 10 | |
| 11 | namespace armnn |
| 12 | { |
| 13 | |
| 14 | void RefDepthToSpaceWorkload::Execute() const |
| 15 | { |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 16 | Execute(m_Data.m_Inputs, m_Data.m_Outputs); |
| 17 | } |
| 18 | |
| 19 | void RefDepthToSpaceWorkload::ExecuteAsync(WorkingMemDescriptor &workingMemDescriptor) |
| 20 | { |
| 21 | Execute(workingMemDescriptor.m_Inputs, workingMemDescriptor.m_Outputs); |
| 22 | } |
| 23 | |
| 24 | void RefDepthToSpaceWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const |
| 25 | { |
Aron Virginas-Tar | 73f6642 | 2019-09-23 19:11:59 +0100 | [diff] [blame] | 26 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefDepthToSpaceWorkload_Execute"); |
| 27 | |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 28 | const TensorInfo inputInfo = GetTensorInfo(inputs[0]); |
Aron Virginas-Tar | 73f6642 | 2019-09-23 19:11:59 +0100 | [diff] [blame] | 29 | |
| 30 | DepthToSpace(inputInfo, |
| 31 | m_Data.m_Parameters, |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 32 | inputs[0]->Map(), |
| 33 | outputs[0]->Map(), |
Aron Virginas-Tar | 73f6642 | 2019-09-23 19:11:59 +0100 | [diff] [blame] | 34 | GetDataTypeSize(inputInfo.GetDataType())); |
| 35 | } |
| 36 | |
| 37 | } // namespace armnn |