diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2020-09-08 12:00:32 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2020-09-11 18:24:18 +0100 |
commit | 80c6b146046252af153af27025a28fb59d33c5e6 (patch) | |
tree | 82cc16369d0a163fc4f97a25af13c4d792faecf8 /tests/InferenceModel.hpp | |
parent | 77062ca6f288830a21e4ff4237059623eba25fa2 (diff) | |
download | armnn-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/InferenceModel.hpp')
-rw-r--r-- | tests/InferenceModel.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp index 8ac44f98fb..527cc64d85 100644 --- a/tests/InferenceModel.hpp +++ b/tests/InferenceModel.hpp @@ -10,6 +10,7 @@ #include <armnn/utility/Timer.hpp> #include <armnn/BackendRegistry.hpp> #include <armnn/utility/Assert.hpp> +#include <armnn/utility/NumericCast.hpp> #if defined(ARMNN_SERIALIZER) #include "armnnDeserializer/IDeserializer.hpp" @@ -204,7 +205,7 @@ public: network = parser->CreateNetworkFromBinary(file); } - unsigned int subgraphId = boost::numeric_cast<unsigned int>(params.m_SubgraphId); + unsigned int subgraphId = armnn::numeric_cast<unsigned int>(params.m_SubgraphId); for (const std::string& inputLayerName : params.m_InputBindings) { @@ -487,10 +488,10 @@ public: boost::apply_visitor([expectedOutputDataSize, i](auto&& value) { - const unsigned int actualOutputDataSize = boost::numeric_cast<unsigned int>(value.size()); + const unsigned int actualOutputDataSize = armnn::numeric_cast<unsigned int>(value.size()); if (actualOutputDataSize < expectedOutputDataSize) { - unsigned int outputIndex = boost::numeric_cast<unsigned int>(i); + unsigned int outputIndex = i; throw armnn::Exception( fmt::format("Not enough data for output #{0}: expected " "{1} elements, got {2}", outputIndex, expectedOutputDataSize, actualOutputDataSize)); |