From ac2770a4bb6461bfbddec928bb6208f26f898f02 Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Wed, 1 Apr 2020 16:51:23 +0100 Subject: IVGCVSW-4485 Remove Boost assert * Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff --- src/armnn/layers/ElementwiseBaseLayer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/armnn/layers/ElementwiseBaseLayer.cpp') diff --git a/src/armnn/layers/ElementwiseBaseLayer.cpp b/src/armnn/layers/ElementwiseBaseLayer.cpp index 761814176d..2c1e8717f4 100644 --- a/src/armnn/layers/ElementwiseBaseLayer.cpp +++ b/src/armnn/layers/ElementwiseBaseLayer.cpp @@ -8,8 +8,7 @@ #include "InternalTypes.hpp" #include "armnn/Exceptions.hpp" #include - -#include +#include namespace armnn { @@ -22,12 +21,12 @@ ElementwiseBaseLayer::ElementwiseBaseLayer(unsigned int numInputSlots, unsigned std::vector ElementwiseBaseLayer::InferOutputShapes(const std::vector& inputShapes) const { - BOOST_ASSERT(inputShapes.size() == 2); + ARMNN_ASSERT(inputShapes.size() == 2); auto& input0 = inputShapes[0]; auto& input1 = inputShapes[1]; // Get the max of the inputs. - BOOST_ASSERT(input0.GetNumDimensions() == input1.GetNumDimensions()); + ARMNN_ASSERT(input0.GetNumDimensions() == input1.GetNumDimensions()); unsigned int numDims = input0.GetNumDimensions(); std::vector dims(numDims); @@ -38,7 +37,7 @@ std::vector ElementwiseBaseLayer::InferOutputShapes(const std::vect #if !NDEBUG // Validate inputs are broadcast compatible. - BOOST_ASSERT_MSG(dim0 == dim1 || dim0 == 1 || dim1 == 1, + ARMNN_ASSERT_MSG(dim0 == dim1 || dim0 == 1 || dim1 == 1, "Dimensions should either match or one should be of size 1."); #endif @@ -57,7 +56,7 @@ void ElementwiseBaseLayer::ValidateTensorShapesFromInputs() GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() }); - BOOST_ASSERT(inferredShapes.size() == 1); + ARMNN_ASSERT(inferredShapes.size() == 1); std::string msg = GetLayerTypeAsCString(GetType()); msg += "Layer: TensorShape set on OutputSlot[0] does not match the inferred shape."; -- cgit v1.2.1