From b4474c4e3d03c256c868306b5c9fbc0f96cdfc8f Mon Sep 17 00:00:00 2001 From: Kevin May Date: Thu, 14 Mar 2024 15:28:43 +0000 Subject: Syntax change to allow building on older compilers (ReduceLayer) Signed-off-by: Kevin May Change-Id: If02101d881bb7c937e858e464a043d849ac40ba9 --- src/armnn/layers/ReduceLayer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/armnn/layers/ReduceLayer.cpp b/src/armnn/layers/ReduceLayer.cpp index bebd043e9b..9fbbc39bd1 100644 --- a/src/armnn/layers/ReduceLayer.cpp +++ b/src/armnn/layers/ReduceLayer.cpp @@ -51,7 +51,8 @@ void ReduceLayer::ValidateTensorShapesFromInputs() const TensorInfo& input = GetInputSlot(0).GetTensorInfo(); - if (auto inputDims = input.GetNumDimensions(); inputDims != std::clamp(inputDims, 1u, 4u)) + auto inputDims = input.GetNumDimensions(); + if (inputDims != std::clamp(inputDims, 1u, 4u)) { throw armnn::LayerValidationException("ReduceLayer: Reduce supports up to 4D input."); } @@ -71,7 +72,8 @@ std::vector ReduceLayer::InferOutputShapes(const std::vector