IVGCVSW-5299 Remove some boost::numeric_cast from armnn/tests
* Replaced with armnn/utility/NumericCast.hpp
* Removed combinations without float implementation in NumericCast.hpp
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ia4ec605f063cdb0071fff302ef48c610f9f9505e
diff --git a/tests/ImagePreprocessor.cpp b/tests/ImagePreprocessor.cpp
index 5a42b8a..4557cad 100644
--- a/tests/ImagePreprocessor.cpp
+++ b/tests/ImagePreprocessor.cpp
@@ -9,8 +9,8 @@
#include <armnn/TypesUtils.hpp>
#include <armnnUtils/Permute.hpp>
+#include <armnn/utility/NumericCast.hpp>
-#include <boost/numeric/conversion/cast.hpp>
#include <boost/format.hpp>
#include <iostream>
@@ -21,7 +21,7 @@
unsigned int ImagePreprocessor<TDataType>::GetLabelAndResizedImageAsFloat(unsigned int testCaseId,
std::vector<float> & result)
{
- testCaseId = testCaseId % boost::numeric_cast<unsigned int>(m_ImageSet.size());
+ testCaseId = testCaseId % armnn::numeric_cast<unsigned int>(m_ImageSet.size());
const ImageSet& imageSet = m_ImageSet[testCaseId];
const std::string fullPath = m_BinaryDirectory + imageSet.first;
@@ -38,7 +38,7 @@
// duplicate data across the batch
for (unsigned int i = 1; i < m_BatchSize; i++)
{
- result.insert(result.end(), result.begin(), result.begin() + boost::numeric_cast<int>(GetNumImageElements()));
+ result.insert(result.end(), result.begin(), result.begin() + armnn::numeric_cast<int>(GetNumImageElements()));
}
if (m_DataFormat == DataFormat::NCHW)