IVGCVSW-4489 Remove remaining occurrence of boost::format
authorMatthew Sloyan <matthew.sloyan@arm.com>
Mon, 12 Oct 2020 14:03:01 +0000 (15:03 +0100)
committerJim Flynn <jim.flynn@arm.com>
Tue, 13 Oct 2020 08:30:07 +0000 (08:30 +0000)
 * Replaced with fmt::format in Descriptors.cpp.
 * Removed remaining boost/format headers in ArmNN codebase.
 * Removed additional boost header in Network.cpp

Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ib98b83bf4ec99ef98ce7a3635ec0dd478c3e43e1

13 files changed:
src/armnn/Descriptors.cpp
src/armnn/Network.cpp
src/armnnUtils/ParserPrototxtFixture.hpp
src/armnnUtils/PrototxtConversions.cpp
src/backends/cl/ClWorkloadFactory.cpp
src/backends/cl/test/OpenClTimerTest.cpp
src/backends/neon/NeonTimer.cpp
src/backends/reference/workloads/RefStridedSliceWorkload.cpp
src/profiling/SendThread.cpp
tests/CaffePreprocessor.cpp
tests/ImagePreprocessor.cpp
tests/InferenceTest.cpp
tests/YoloDatabase.cpp

index c6fbfff..881023e 100644 (file)
@@ -12,7 +12,7 @@
 #include <array>
 #include <vector>
 
-#include <boost/format.hpp>
+#include <fmt/format.h>
 
 namespace armnn
 {
@@ -23,9 +23,11 @@ PermutationVector::PermutationVector(const ValueType *dimMappings, const SizeTyp
 
     if (numDimMappings > MaxNumOfTensorDimensions)
     {
-        boost::format fmt("The number of mappings (%1%) cannot be greater "
-                          "than the maximum number of dimensions supported (%2%)");
-        throw InvalidArgumentException(boost::str(fmt % numDimMappings % MaxNumOfTensorDimensions));
+        throw InvalidArgumentException(
+            fmt::format("The number of mappings ({0}) cannot be greater "
+                        "than the maximum number of dimensions supported ({1})",
+                        numDimMappings,
+                        MaxNumOfTensorDimensions));
     }
 
     if ((dimMappings == nullptr) && (numDimMappings != 0))
@@ -38,8 +40,12 @@ PermutationVector::PermutationVector(const ValueType *dimMappings, const SizeTyp
         const ValueType dstIndex = dimMappings[i];
         if (dstIndex >= numDimMappings)
         {
-            boost::format fmt("Dimension mapping at index %1% is invalid: %2% is outside of the valid range [0,%3%]");
-            throw InvalidArgumentException(boost::str(fmt % i % dstIndex % (numDimMappings - 1)));
+            throw InvalidArgumentException(
+                fmt::format("Dimension mapping at index {0} is invalid: "
+                            "{1} is outside of the valid range [0,{2}]",
+                            i,
+                            dstIndex,
+                            (numDimMappings - 1)));
         }
     }
 
index 668b634..373f999 100644 (file)
@@ -35,9 +35,6 @@
 #include <vector>
 #include <algorithm>
 
-#include <boost/format.hpp>
-#include <boost/numeric/conversion/converter_policies.hpp>
-
 namespace armnn
 {
 
index cf28fcf..782c181 100644 (file)
@@ -11,7 +11,6 @@
 #include <Network.hpp>
 #include <VerificationHelpers.hpp>
 
-#include <boost/format.hpp>
 #include <fmt/format.h>
 
 #include <iomanip>
index 8681da1..c3ba289 100644 (file)
@@ -6,8 +6,6 @@
 #include "PrototxtConversions.hpp"
 #include "armnn/Tensor.hpp"
 
-#include <boost/format.hpp>
-
 #include <iomanip>
 #include <sstream>
 #include <string>
index f6650dc..cb4aa92 100644 (file)
@@ -27,8 +27,6 @@
 #include <arm_compute/runtime/CL/CLBufferAllocator.h>
 #include <arm_compute/runtime/CL/CLScheduler.h>
 
-#include <boost/format.hpp>
-
 namespace armnn
 {
 
index 6e9d2c8..68a356a 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <arm_compute/runtime/CL/CLScheduler.h>
 
-#include <boost/format.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include <iostream>
index 1079a0d..5cce051 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <memory>
 
-#include <boost/format.hpp>
-
 namespace armnn
 {
 namespace
index e994a09..6a29439 100644 (file)
@@ -7,8 +7,6 @@
 #include "RefWorkloadUtils.hpp"
 #include "StridedSlice.hpp"
 
-#include <boost/format.hpp>
-
 namespace armnn
 {
 
index 16ef239..1a0e359 100644 (file)
@@ -12,8 +12,6 @@
 
 #include <Processes.hpp>
 
-#include <boost/format.hpp>
-
 #include <cstring>
 
 namespace armnn
index e531a31..54ce833 100644 (file)
@@ -7,8 +7,6 @@
 
 #include <armnn/utility/NumericCast.hpp>
 
-#include <boost/format.hpp>
-
 #include <iostream>
 #include <fcntl.h>
 #include <array>
index 4557cad..e6dbfb5 100644 (file)
@@ -11,8 +11,6 @@
 #include <armnnUtils/Permute.hpp>
 #include <armnn/utility/NumericCast.hpp>
 
-#include <boost/format.hpp>
-
 #include <iostream>
 #include <fcntl.h>
 #include <array>
index 6420544..b3b38d1 100644 (file)
@@ -8,7 +8,6 @@
 #include <Filesystem.hpp>
 
 #include "../src/armnn/Profiling.hpp"
-#include <boost/format.hpp>
 #include <boost/program_options.hpp>
 
 #include <fstream>
index 8b2c630..fe7410b 100644 (file)
@@ -14,8 +14,6 @@
 #include <tuple>
 #include <utility>
 
-#include <boost/format.hpp>
-
 #include "InferenceTestImage.hpp"
 
 namespace