aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/RefL2NormalizationWorkload.cpp
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-09-09 09:07:37 +0100
committerJan Eilers <jan.eilers@arm.com>2020-09-17 08:31:09 +0000
commit171214c8ff275c90cd4f7fc23a34ec2c83b5ea39 (patch)
tree23fd3ee288d631c8c94bede71f89f0f1e12da862 /src/backends/reference/workloads/RefL2NormalizationWorkload.cpp
parenta25886e0966a6b9433cd23595688fadb88a161b2 (diff)
downloadarmnn-171214c8ff275c90cd4f7fc23a34ec2c83b5ea39.tar.gz
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 <matthew.sloyan@arm.com> Change-Id: I9e4e9cd502c865452128fa04415fd6f250baa855
Diffstat (limited to 'src/backends/reference/workloads/RefL2NormalizationWorkload.cpp')
-rw-r--r--src/backends/reference/workloads/RefL2NormalizationWorkload.cpp17
1 files changed, 8 insertions, 9 deletions
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 <Profiling.hpp>
#include <armnnUtils/DataLayoutIndexed.hpp>
-
-#include <boost/numeric/conversion/cast.hpp>
+#include <armnn/utility/NumericCast.hpp>
#include <cmath>
@@ -39,26 +38,26 @@ void RefL2NormalizationWorkload::Execute() const
const TensorShape& shape = inputInfo.GetShape();
unsigned int paddedShapeArray[4];
- const int idxShift = 4 - boost::numeric_cast<int>(shape.GetNumDimensions());
+ const int idxShift = 4 - armnn::numeric_cast<int>(shape.GetNumDimensions());
const unsigned int batches = (idxShift == 0) ? shape[0] : 1;
paddedShapeArray[0] = batches;
- const int channelsIdx = boost::numeric_cast<int>(dataLayout.GetChannelsIndex());
+ const int channelsIdx = armnn::numeric_cast<int>(dataLayout.GetChannelsIndex());
const unsigned int channels = (channelsIdx - idxShift >= 0)
- ? shape[boost::numeric_cast<unsigned int>(channelsIdx - idxShift)]
+ ? shape[armnn::numeric_cast<unsigned int>(channelsIdx - idxShift)]
: 1;
paddedShapeArray[channelsIdx] = channels;
- const int heightIdx = boost::numeric_cast<int>(dataLayout.GetHeightIndex());
+ const int heightIdx = armnn::numeric_cast<int>(dataLayout.GetHeightIndex());
const unsigned int height = (heightIdx - idxShift >= 0)
- ? shape[boost::numeric_cast<unsigned int>(heightIdx - idxShift)]
+ ? shape[armnn::numeric_cast<unsigned int>(heightIdx - idxShift)]
: 1;
paddedShapeArray[heightIdx] = height;
- const int widthIdx = boost::numeric_cast<int>(dataLayout.GetWidthIndex());
+ const int widthIdx = armnn::numeric_cast<int>(dataLayout.GetWidthIndex());
const unsigned int width = (widthIdx - idxShift >= 0)
- ? shape[boost::numeric_cast<unsigned int>(widthIdx - idxShift)]
+ ? shape[armnn::numeric_cast<unsigned int>(widthIdx - idxShift)]
: 1;
paddedShapeArray[widthIdx] = width;