ArmNN  NotReleased
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 
8 #include <boost/format.hpp>
9 
10 #include <iomanip>
11 #include <sstream>
12 #include <string>
13 
14 namespace armnnUtils
15 {
16 
18 std::string ConvertInt32ToOctalString(int value)
19 {
20  std::stringstream ss;
21  std::string returnString;
22  for (int i = 0; i < 4; ++i)
23  {
24  ss << "\\";
25  ss << std::setw(3) << std::setfill('0') << std::oct << ((value >> (i * 8)) & 0xFF);
26  }
27 
28  ss >> returnString;
29  return returnString;
30 }
31 
32 } // namespace armnnUtils
std::string ConvertInt32ToOctalString(int value)
Converts an int value into the Prototxt octal representation.