aboutsummaryrefslogtreecommitdiff
path: root/tests/MnistDatabase.cpp
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-09-08 12:00:32 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2020-09-11 18:24:18 +0100
commit80c6b146046252af153af27025a28fb59d33c5e6 (patch)
tree82cc16369d0a163fc4f97a25af13c4d792faecf8 /tests/MnistDatabase.cpp
parent77062ca6f288830a21e4ff4237059623eba25fa2 (diff)
downloadarmnn-80c6b146046252af153af27025a28fb59d33c5e6.tar.gz
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
Diffstat (limited to 'tests/MnistDatabase.cpp')
-rw-r--r--tests/MnistDatabase.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/MnistDatabase.cpp b/tests/MnistDatabase.cpp
index 9abc3a6d2b..bbeb8caf55 100644
--- a/tests/MnistDatabase.cpp
+++ b/tests/MnistDatabase.cpp
@@ -6,8 +6,6 @@
#include <armnn/Logging.hpp>
-#include <boost/numeric/conversion/cast.hpp>
-
#include <fstream>
#include <vector>
@@ -94,7 +92,8 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns
for (unsigned int i = 0; i < col * row; ++i)
{
- inputImageData[i] = boost::numeric_cast<float>(I[i]);
+ // Static_cast of unsigned char is safe with float
+ inputImageData[i] = static_cast<float>(I[i]);
if(m_ScaleValues)
{