diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2019-01-21 15:45:51 +0000 |
---|---|---|
committer | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-01-23 10:12:51 +0000 |
commit | 4057d91322738e446c0c2ce5f3a8cf665d935763 (patch) | |
tree | 352dff895fd187ed83d0448294505a76092c4bab /src/armnnUtils/PrototxtConversions.cpp | |
parent | 4951d84b1174a4bb0a5d9c900740f64201f765bf (diff) | |
download | armnn-4057d91322738e446c0c2ce5f3a8cf665d935763.tar.gz |
IVGCVSW-2515 Fix compilation when TfParser is disabled
Change-Id: Ia0019134f76764cd4fe6ed9dc1423b8aba411d33
Diffstat (limited to 'src/armnnUtils/PrototxtConversions.cpp')
-rw-r--r-- | src/armnnUtils/PrototxtConversions.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/armnnUtils/PrototxtConversions.cpp b/src/armnnUtils/PrototxtConversions.cpp new file mode 100644 index 0000000000..1a6c053355 --- /dev/null +++ b/src/armnnUtils/PrototxtConversions.cpp @@ -0,0 +1,32 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "PrototxtConversions.hpp" + +#include <boost/format.hpp> + +#include <iomanip> +#include <sstream> +#include <string> + +namespace armnnUtils +{ + +/// Converts an int value into the Prototxt octal representation +std::string ConvertInt32ToOctalString(int value) +{ + std::stringstream ss; + std::string returnString; + for (int i = 0; i < 4; ++i) + { + ss << "\\"; + ss << std::setw(3) << std::setfill('0') << std::oct << ((value >> (i * 8)) & 0xFF); + } + + ss >> returnString; + return returnString; +} + +} // namespace armnnUtils |