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/_prototxt_conversions_8cpp_source.xhtml | 120 ++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 20.02/_prototxt_conversions_8cpp_source.xhtml (limited to '20.02/_prototxt_conversions_8cpp_source.xhtml') diff --git a/20.02/_prototxt_conversions_8cpp_source.xhtml b/20.02/_prototxt_conversions_8cpp_source.xhtml new file mode 100644 index 0000000000..e1362960c5 --- /dev/null +++ b/20.02/_prototxt_conversions_8cpp_source.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +ArmNN: src/armnnUtils/PrototxtConversions.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
PrototxtConversions.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "armnn/Tensor.hpp"
8 
9 #include <boost/format.hpp>
10 
11 #include <iomanip>
12 #include <sstream>
13 #include <string>
14 
15 namespace armnnUtils
16 {
17 
18 /// Converts an int value into the Prototxt octal representation
19 std::string ConvertInt32ToOctalString(int value)
20 {
21  std::stringstream ss;
22  std::string returnString;
23  for (int i = 0; i < 4; ++i)
24  {
25  ss << "\\";
26  ss << std::setw(3) << std::setfill('0') << std::oct << ((value >> (i * 8)) & 0xFF);
27  }
28 
29  ss >> returnString;
30  return returnString;
31 }
32 
33 /// Converts an TensorShape into Prototxt representation
35 {
36  std::stringstream ss;
37  for (unsigned int i = 0 ; i < shape.GetNumDimensions() ; i++)
38  {
39  ss << "dim {\n";
40  ss << "size: " << std::to_string(shape[i]) << "\n";
41  ss << "}\n";
42  }
43  return ss.str();
44 
45 }
46 } // namespace armnnUtils
+ +
std::string ConvertInt32ToOctalString(int value)
Converts an int value into the Prototxt octal representation.
+
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:43
+ +
std::string ConvertTensorShapeToString(const armnn::TensorShape &shape)
Converts an TensorShape into Prototxt representation.
+ +
+
+ + + + -- cgit v1.2.1