aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2024-03-14 15:28:43 +0000
committerKevin May <kevin.may@arm.com>2024-03-14 15:28:43 +0000
commitb4474c4e3d03c256c868306b5c9fbc0f96cdfc8f (patch)
tree1788ffaf5ea44cf9fa6a8768feebd3ba652ace7c
parent97d911fd3fea00b05b5c63b419f3b0cbf5aefcbe (diff)
downloadarmnn-b4474c4e3d03c256c868306b5c9fbc0f96cdfc8f.tar.gz
Syntax change to allow building on older compilers (ReduceLayer)
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: If02101d881bb7c937e858e464a043d849ac40ba9
-rw-r--r--src/armnn/layers/ReduceLayer.cpp6
1 files 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<TensorShape> ReduceLayer::InferOutputShapes(const std::vector<Tensor
const TensorShape& input = inputShapes[0];
- if (auto inputDims = input.GetNumDimensions(); inputDims != std::clamp(inputDims, 1u, 4u))
+ auto inputDims = input.GetNumDimensions();
+ if (inputDims != std::clamp(inputDims, 1u, 4u))
{
throw armnn::Exception("ReduceLayer: Reduce supports up to 4D input.");
}