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 --- src/backends/reference/workloads/DetectionPostProcess.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backends/reference/workloads/DetectionPostProcess.cpp') diff --git a/src/backends/reference/workloads/DetectionPostProcess.cpp b/src/backends/reference/workloads/DetectionPostProcess.cpp index 61a504ec6b..ce07110da9 100644 --- a/src/backends/reference/workloads/DetectionPostProcess.cpp +++ b/src/backends/reference/workloads/DetectionPostProcess.cpp @@ -6,6 +6,7 @@ #include "DetectionPostProcess.hpp" #include +#include #include @@ -67,7 +68,7 @@ std::vector NonMaxSuppression(unsigned int numBoxes, } // Sort the indices based on scores. - unsigned int numAboveThreshold = boost::numeric_cast(scoresAboveThreshold.size()); + unsigned int numAboveThreshold = armnn::numeric_cast(scoresAboveThreshold.size()); std::vector sortedIndices = GenerateRangeK(numAboveThreshold); TopKSort(numAboveThreshold, sortedIndices.data(), scoresAboveThreshold.data(), numAboveThreshold); @@ -267,7 +268,7 @@ void DetectionPostProcess(const TensorInfo& boxEncodingsInfo, } // Select max detection numbers of the highest score across all classes - unsigned int numSelected = boost::numeric_cast(selectedBoxesAfterNms.size()); + unsigned int numSelected = armnn::numeric_cast(selectedBoxesAfterNms.size()); unsigned int numOutput = std::min(desc.m_MaxDetections, numSelected); // Sort the max scores among the selected indices. @@ -311,7 +312,7 @@ void DetectionPostProcess(const TensorInfo& boxEncodingsInfo, desc.m_MaxDetections, desc.m_NmsIouThreshold); - unsigned int numSelected = boost::numeric_cast(selectedIndices.size()); + unsigned int numSelected = armnn::numeric_cast(selectedIndices.size()); unsigned int numOutput = std::min(desc.m_MaxDetections, numSelected); AllocateOutputData(detectionBoxesInfo.GetShape()[1], numOutput, boxCorners, selectedIndices, -- cgit v1.2.1