2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
6 #include "RefPermuteWorkload.hpp"
7 #include "RefWorkloadUtils.hpp"
10 #include "TypeUtils.hpp"
15 template <armnn::DataType DataType>
16 void RefPermuteWorkload<DataType>::Execute() const
18 using T = ResolveType<DataType>;
20 ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute");
22 const ITensorHandle* src = m_Data.m_Inputs[0];
23 const ITensorHandle* dst = m_Data.m_Outputs[0];
24 const PermutationVector& mappings = m_Data.m_Parameters.m_DimMappings;
26 armnnUtils::Permute(GetTensorInfo(dst).GetShape(), mappings, GetConstCpuData<T>(src), GetCpuData<T>(dst));
29 template class RefPermuteWorkload<DataType::Float32>;
30 template class RefPermuteWorkload<DataType::QuantisedAsymm8>;