IVGCVSW-5297 Remove boost::format from rest of ArmNN.
* Replacing calls to boost:format with fmt:format.
* TensorUtils.cpp added outputShape.reserve call.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I4b2ed0f72039df824a2adca9309b8a9bbb158c5b
diff --git a/src/armnnUtils/TensorUtils.cpp b/src/armnnUtils/TensorUtils.cpp
index adaf811..2890399 100644
--- a/src/armnnUtils/TensorUtils.cpp
+++ b/src/armnnUtils/TensorUtils.cpp
@@ -9,7 +9,7 @@
#include <armnn/utility/Assert.hpp>
#include <armnn/utility/NumericCast.hpp>
-#include <boost/format.hpp>
+#include <fmt/format.h>
using namespace armnn;
@@ -88,11 +88,10 @@
if (axis < -armnn::numeric_cast<int>(outputDim) || axis > armnn::numeric_cast<int>(tensorShape.GetNumDimensions()))
{
- throw InvalidArgumentException(
- boost::str(boost::format("Invalid expansion axis %1% for %2%D input tensor. %3%") %
- axis %
- tensorShape.GetNumDimensions() %
- CHECK_LOCATION().AsString()));
+ throw InvalidArgumentException(fmt::format("Invalid expansion axis {} for {}D input tensor. {}",
+ axis,
+ tensorShape.GetNumDimensions(),
+ CHECK_LOCATION().AsString()));
}
if (axis < 0)
@@ -101,6 +100,7 @@
}
std::vector<unsigned int> outputShape;
+ outputShape.reserve(tensorShape.GetNumDimensions());
for (unsigned int i = 0; i < tensorShape.GetNumDimensions(); ++i)
{
outputShape.push_back(tensorShape[i]);