From 1c4bd510a03e7357307c16d3e54f105c2345bb92 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 23 Aug 2019 09:43:55 +0900 Subject: [PATCH] static_cast for ARMComputeAxis constructor (#6833) - This patch fixes aarch64 tizen build error - assert for range check - static_cast of size_t(64) parameter into uint32_t Signed-off-by: Chunseok Lee --- runtimes/neurun/backend/acl_common/IACLTensor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtimes/neurun/backend/acl_common/IACLTensor.cc b/runtimes/neurun/backend/acl_common/IACLTensor.cc index cfddc1b..89972e2 100644 --- a/runtimes/neurun/backend/acl_common/IACLTensor.cc +++ b/runtimes/neurun/backend/acl_common/IACLTensor.cc @@ -36,7 +36,8 @@ size_t IACLTensor::dimension(size_t index) const // Assume that the front is higher dimensional. // i.g. N: 0, C: 1, H: 2, W: 3 for NCHW layout // NOTE This tensor must not be applied dim correction - const ARMComputeAxis reversed{(num_dimensions() - index) - 1}; + assert(num_dimensions() > index); + const ARMComputeAxis reversed{(static_cast(num_dimensions() - index) - 1)}; return info()->dimension(reversed.value()); } -- 2.7.4