From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_data_layout_utils_8hpp_source.xhtml | 123 +++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 20.02/_data_layout_utils_8hpp_source.xhtml (limited to '20.02/_data_layout_utils_8hpp_source.xhtml') diff --git a/20.02/_data_layout_utils_8hpp_source.xhtml b/20.02/_data_layout_utils_8hpp_source.xhtml new file mode 100644 index 0000000000..f84eeaf3b4 --- /dev/null +++ b/20.02/_data_layout_utils_8hpp_source.xhtml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/test/DataLayoutUtils.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
DataLayoutUtils.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/Tensor.hpp>
9 #include <armnn/Types.hpp>
10 
11 #include <armnnUtils/Permute.hpp>
12 
13 template<typename T>
14 void PermuteTensorNchwToNhwc(armnn::TensorInfo& tensorInfo, std::vector<T>& tensorData)
15 {
16  const armnn::PermutationVector nchwToNhwc = { 0, 3, 1, 2 };
17 
18  tensorInfo = armnnUtils::Permuted(tensorInfo, nchwToNhwc);
19 
20  std::vector<T> tmp(tensorData.size());
21  armnnUtils::Permute(tensorInfo.GetShape(), nchwToNhwc, tensorData.data(), tmp.data(), sizeof(T));
22  tensorData = tmp;
23 }
24 
25 template<typename T>
26 void PermuteTensorNhwcToNchw(armnn::TensorInfo& tensorInfo, std::vector<T>& tensorData)
27 {
28  const armnn::PermutationVector nhwcToNchw = { 0, 2, 3, 1 };
29 
30  tensorInfo = armnnUtils::Permuted(tensorInfo, nhwcToNchw);
31 
32  std::vector<T> tmp(tensorData.size());
33  armnnUtils::Permute(tensorInfo.GetShape(), nhwcToNchw, tensorData.data(), tmp.data(), sizeof(T));
34 
35  tensorData = tmp;
36 }
+
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
+ +
void PermuteTensorNchwToNhwc(armnn::TensorInfo &tensorInfo, std::vector< T > &tensorData)
+
void Permute(const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize)
Definition: Permute.cpp:121
+ + + +
armnn::TensorShape Permuted(const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings)
Definition: Permute.cpp:98
+
void PermuteTensorNhwcToNchw(armnn::TensorInfo &tensorInfo, std::vector< T > &tensorData)
+
+
+ + + + -- cgit v1.2.1