From 171214c8ff275c90cd4f7fc23a34ec2c83b5ea39 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Wed, 9 Sep 2020 09:07:37 +0100 Subject: IVGCVSW-5300 Remove some boost::numeric_cast from armnn/backends * Replaced with armnn/utility/NumericCast.hpp * Some exclusions in reference backend * Excluded as requires float implementation in NumericCast.hpp Signed-off-by: Matthew Sloyan Change-Id: I9e4e9cd502c865452128fa04415fd6f250baa855 --- .../reference/workloads/RefL2NormalizationWorkload.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/backends/reference/workloads/RefL2NormalizationWorkload.cpp') diff --git a/src/backends/reference/workloads/RefL2NormalizationWorkload.cpp b/src/backends/reference/workloads/RefL2NormalizationWorkload.cpp index 6fec1abe6f..f80901edc9 100644 --- a/src/backends/reference/workloads/RefL2NormalizationWorkload.cpp +++ b/src/backends/reference/workloads/RefL2NormalizationWorkload.cpp @@ -11,8 +11,7 @@ #include #include - -#include +#include #include @@ -39,26 +38,26 @@ void RefL2NormalizationWorkload::Execute() const const TensorShape& shape = inputInfo.GetShape(); unsigned int paddedShapeArray[4]; - const int idxShift = 4 - boost::numeric_cast(shape.GetNumDimensions()); + const int idxShift = 4 - armnn::numeric_cast(shape.GetNumDimensions()); const unsigned int batches = (idxShift == 0) ? shape[0] : 1; paddedShapeArray[0] = batches; - const int channelsIdx = boost::numeric_cast(dataLayout.GetChannelsIndex()); + const int channelsIdx = armnn::numeric_cast(dataLayout.GetChannelsIndex()); const unsigned int channels = (channelsIdx - idxShift >= 0) - ? shape[boost::numeric_cast(channelsIdx - idxShift)] + ? shape[armnn::numeric_cast(channelsIdx - idxShift)] : 1; paddedShapeArray[channelsIdx] = channels; - const int heightIdx = boost::numeric_cast(dataLayout.GetHeightIndex()); + const int heightIdx = armnn::numeric_cast(dataLayout.GetHeightIndex()); const unsigned int height = (heightIdx - idxShift >= 0) - ? shape[boost::numeric_cast(heightIdx - idxShift)] + ? shape[armnn::numeric_cast(heightIdx - idxShift)] : 1; paddedShapeArray[heightIdx] = height; - const int widthIdx = boost::numeric_cast(dataLayout.GetWidthIndex()); + const int widthIdx = armnn::numeric_cast(dataLayout.GetWidthIndex()); const unsigned int width = (widthIdx - idxShift >= 0) - ? shape[boost::numeric_cast(widthIdx - idxShift)] + ? shape[armnn::numeric_cast(widthIdx - idxShift)] : 1; paddedShapeArray[widthIdx] = width; -- cgit v1.2.1