aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Layer.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/armnn/Layer.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/armnn/Layer.cpp')
-rw-r--r--src/armnn/Layer.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp
index c8d5a1690d..d06b0459f6 100644
--- a/src/armnn/Layer.cpp
+++ b/src/armnn/Layer.cpp
@@ -10,7 +10,7 @@
#include <backendsCommon/WorkloadData.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
-#include <boost/format.hpp>
+#include <fmt/format.h>
#include <numeric>
@@ -159,8 +159,7 @@ void OutputSlot::ValidateConnectionIndex(unsigned int index) const
{
if (armnn::numeric_cast<std::size_t>(index) >= m_Connections.size())
{
- throw InvalidArgumentException(
- boost::str(boost::format("GetConnection: Invalid index %1% provided") % index));
+ throw InvalidArgumentException((fmt::format("GetConnection: Invalid index {} provided", index)));
}
}
@@ -350,14 +349,12 @@ void Layer::VerifyLayerConnections(unsigned int expectedConnections, const Check
if (GetInputSlot(i).GetConnection() == nullptr)
{
throw LayerValidationException(
- boost::str(
- boost::format(
- "Input connection #%1% must be connected "
- "for %2% layer %3% %4%")
- % i
- % GetLayerTypeAsCString(this->GetType())
- % GetNameStr()
- % location.AsString()));
+ fmt::format("Input connection #{0} must be connected "
+ "for {1} layer {2} {3}",
+ i,
+ GetLayerTypeAsCString(this->GetType()),
+ GetNameStr(),
+ location.AsString()));
}
}
}
@@ -375,16 +372,14 @@ std::vector<TensorShape> Layer::InferOutputShapes(const std::vector<TensorShape>
if (GetNumInputSlots() != GetNumOutputSlots())
{
throw UnimplementedException(
- boost::str(
- boost::format(
- "Default implementation for InferOutputShapes can only be used for "
- "layers with the same number of input and output slots. This doesn't "
- "hold for %1% layer %2% (#inputs=%3% #outputs=%4%) %5%")
- % GetLayerTypeAsCString(this->GetType())
- % GetNameStr()
- % GetNumInputSlots()
- % GetNumOutputSlots()
- % CHECK_LOCATION().AsString()));
+ fmt::format("Default implementation for InferOutputShapes can only be used for "
+ "layers with the same number of input and output slots. This doesn't "
+ "hold for {0} layer {1} (#inputs={2} #outputs={3}) {4}",
+ GetLayerTypeAsCString(this->GetType()),
+ GetNameStr(),
+ GetNumInputSlots(),
+ GetNumOutputSlots(),
+ CHECK_LOCATION().AsString()));
}
return inputShapes;
}