aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/WorkloadUtils.cpp
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-09-09 09:07:37 +0100
committerJan Eilers <jan.eilers@arm.com>2020-09-17 08:31:09 +0000
commit171214c8ff275c90cd4f7fc23a34ec2c83b5ea39 (patch)
tree23fd3ee288d631c8c94bede71f89f0f1e12da862 /src/backends/backendsCommon/WorkloadUtils.cpp
parenta25886e0966a6b9433cd23595688fadb88a161b2 (diff)
downloadarmnn-171214c8ff275c90cd4f7fc23a34ec2c83b5ea39.tar.gz
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 <matthew.sloyan@arm.com> Change-Id: I9e4e9cd502c865452128fa04415fd6f250baa855
Diffstat (limited to 'src/backends/backendsCommon/WorkloadUtils.cpp')
-rw-r--r--src/backends/backendsCommon/WorkloadUtils.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backends/backendsCommon/WorkloadUtils.cpp b/src/backends/backendsCommon/WorkloadUtils.cpp
index 37915cfc4d..5886630cd9 100644
--- a/src/backends/backendsCommon/WorkloadUtils.cpp
+++ b/src/backends/backendsCommon/WorkloadUtils.cpp
@@ -6,8 +6,7 @@
#include <backendsCommon/WorkloadUtils.hpp>
#include <armnn/Utils.hpp>
-
-#include <boost/numeric/conversion/cast.hpp>
+#include <armnn/utility/NumericCast.hpp>
namespace armnn
{
@@ -194,12 +193,12 @@ armnn::ConstTensor ConvertWeightTensorFromArmnnToAcl(const ConstCpuTensorHandle*
int32_t ConvertMaskToACLFormat(int32_t mask, int32_t numDim)
{
int32_t reversedMask = 0;
- for (unsigned int i = 0; i < boost::numeric_cast<unsigned int>(numDim); ++i)
+ for (unsigned int i = 0; i < armnn::numeric_cast<unsigned int>(numDim); ++i)
{
// Check if bit set in mask for each dimension
int32_t bit = (mask & 1 << i) != 0;
// Increment the new mask with the bits reversed
- reversedMask += (bit << std::max(numDim-(boost::numeric_cast<int>(i)+1), 0));
+ reversedMask += (bit << std::max(numDim-(armnn::numeric_cast<int>(i)+1), 0));
}
return reversedMask;