aboutsummaryrefslogtreecommitdiff
path: root/src/backends/aclCommon/ArmComputeTensorUtils.hpp
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/aclCommon/ArmComputeTensorUtils.hpp
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/aclCommon/ArmComputeTensorUtils.hpp')
-rw-r--r--src/backends/aclCommon/ArmComputeTensorUtils.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backends/aclCommon/ArmComputeTensorUtils.hpp b/src/backends/aclCommon/ArmComputeTensorUtils.hpp
index 67676784ef..011f44dc69 100644
--- a/src/backends/aclCommon/ArmComputeTensorUtils.hpp
+++ b/src/backends/aclCommon/ArmComputeTensorUtils.hpp
@@ -7,6 +7,8 @@
#include <armnn/Tensor.hpp>
#include <armnn/DescriptorsFwd.hpp>
+#include <armnn/utility/NumericCast.hpp>
+
#include <arm_compute/core/ITensor.h>
#include <arm_compute/core/TensorInfo.h>
#include <arm_compute/core/Types.h>
@@ -14,8 +16,6 @@
#include <Half.hpp>
-#include <boost/cast.hpp>
-
namespace armnn
{
class ITensorHandle;
@@ -126,7 +126,7 @@ inline size_t GetTensorOffset(const arm_compute::ITensorInfo& info,
coords.set(2, static_cast<int>(channelIndex));
coords.set(1, static_cast<int>(y));
coords.set(0, static_cast<int>(x));
- return boost::numeric_cast<size_t>(info.offset_element_in_bytes(coords));
+ return armnn::numeric_cast<size_t>(info.offset_element_in_bytes(coords));
}
// Helper function to obtain element offset into data buffer representing tensor data (assuming no strides).
@@ -229,9 +229,9 @@ TensorShape GetTensorShape(const ArmComputeType& shapelike, T initial)
std::vector<unsigned int> s(MaxNumOfTensorDimensions, initial);
for (unsigned int i=0; i < shapelike.num_dimensions(); ++i)
{
- s[(shapelike.num_dimensions()-1)-i] = boost::numeric_cast<unsigned int>(shapelike[i]);
+ s[(shapelike.num_dimensions()-1)-i] = armnn::numeric_cast<unsigned int>(shapelike[i]);
}
- return TensorShape(boost::numeric_cast<unsigned int>(shapelike.num_dimensions()), s.data());
+ return TensorShape(armnn::numeric_cast<unsigned int>(shapelike.num_dimensions()), s.data());
};
/// Get the strides from an ACL strides object