diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2020-09-11 16:17:48 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-09-14 17:14:30 +0000 |
commit | 589e3e81a86c83456580e112978bf7a0ed5f43ac (patch) | |
tree | 0b273313f7bb8fd34696abd129bd3402d737ef4a /src/armnnOnnxParser/OnnxParser.cpp | |
parent | 04a729708f986b1a69c1efc42d5cf18271cfae1e (diff) | |
download | armnn-589e3e81a86c83456580e112978bf7a0ed5f43ac.tar.gz |
IVGCVSW-5302 Remove some boost::numeric_cast from parsers
* Replaced with armnn/utility/NumericCast.hpp
* Exclusions in armnnCaffeParser
* Three excluded as requires float implementation in NumericCast.hpp
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ib468b606238694334a8319d0ed5db381ce37a915
Diffstat (limited to 'src/armnnOnnxParser/OnnxParser.cpp')
-rw-r--r-- | src/armnnOnnxParser/OnnxParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/armnnOnnxParser/OnnxParser.cpp b/src/armnnOnnxParser/OnnxParser.cpp index a07a899488..01ad12448f 100644 --- a/src/armnnOnnxParser/OnnxParser.cpp +++ b/src/armnnOnnxParser/OnnxParser.cpp @@ -6,10 +6,10 @@ #include <armnn/Descriptors.hpp> #include <armnn/utility/Assert.hpp> +#include <armnn/utility/NumericCast.hpp> #include <VerificationHelpers.hpp> #include <boost/format.hpp> -#include <boost/numeric/conversion/cast.hpp> #include <google/protobuf/text_format.h> #include <google/protobuf/io/zero_copy_stream_impl.h> @@ -350,7 +350,7 @@ TensorInfo ComputeReshapeInfo(const TensorShape& targetShapeTensor, % CHECK_LOCATION().AsString())); } - auto targetNumElements = boost::numeric_cast<unsigned int>(std::accumulate(targetDims.begin(), targetDims.end(), + auto targetNumElements = armnn::numeric_cast<unsigned int>(std::accumulate(targetDims.begin(), targetDims.end(), -1, std::multiplies<int32_t>())); auto stretchIndex = static_cast<size_t>(std::distance(targetDims.begin(), stretchDim)); outDims[stretchIndex] = inShape.GetNumElements() / targetNumElements; |