aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/TensorUtils.cpp
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2020-09-09 12:48:16 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2020-10-02 15:30:11 +0000
commit5b5c222f6b0c40a8e0f9ef9dedccd6f0f18c4c2c (patch)
tree6ad0552e5efeb7ae3474a7f5019bc2fb33fced03 /src/armnnUtils/TensorUtils.cpp
parent24ac85943b609e48fc36d16570ca4b5b90d31a6a (diff)
downloadarmnn-5b5c222f6b0c40a8e0f9ef9dedccd6f0f18c4c2c.tar.gz
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
Diffstat (limited to 'src/armnnUtils/TensorUtils.cpp')
-rw-r--r--src/armnnUtils/TensorUtils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/armnnUtils/TensorUtils.cpp b/src/armnnUtils/TensorUtils.cpp
index adaf8114f1..2890399cd8 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 @@ TensorShape ExpandDims(const TensorShape& tensorShape, int axis)
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 @@ TensorShape ExpandDims(const TensorShape& tensorShape, int axis)
}
std::vector<unsigned int> outputShape;
+ outputShape.reserve(tensorShape.GetNumDimensions());
for (unsigned int i = 0; i < tensorShape.GetNumDimensions(); ++i)
{
outputShape.push_back(tensorShape[i]);