ArmNN
 21.02
RefTransposeWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "RefWorkloadUtils.hpp"
8 
10 
11 #include <ResolveType.hpp>
12 
13 namespace armnn
14 {
15 
16 template <armnn::DataType DataType>
18 {
19  using T = ResolveType<DataType>;
20 
21  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute");
22 
23  const ITensorHandle* src = m_Data.m_Inputs[0];
24  ITensorHandle* dst = m_Data.m_Outputs[0];
25  const PermutationVector& mappings = m_Data.m_Parameters.m_DimMappings;
26 
27  armnnUtils::Transpose(GetTensorInfo(src).GetShape(), mappings, src->Map(), dst->Map(), sizeof(T));
28 }
29 
36 
37 } //namespace armnn
CPU Execution: Reference C++ kernels.
typename ResolveTypeImpl< DT >::Type ResolveType
Definition: ResolveType.hpp:73
Copyright (c) 2021 ARM Limited and Contributors.
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:173
virtual const void * Map(bool blocking=true) const =0
Map the tensor data for access.
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers