aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/TensorShape.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-10-09 11:04:30 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commita3b4ce2b848442c4f8bb349307e1fc4a164c3a33 (patch)
tree6ce7914b33250f423623b6935aa6ce87afd57b54 /arm_compute/core/TensorShape.h
parente472082f831815c217677e3f1802ecaae1348e65 (diff)
downloadComputeLibrary-a3b4ce2b848442c4f8bb349307e1fc4a164c3a33.tar.gz
COMPMID-556: A tensor cannot be of dimension 0
It should always be at least 1. Change-Id: I5b9012a227ccd28c20baf2dce84e8a2be3bd789c Reviewed-on: http://mpd-gerrit.cambridge.arm.com/90746 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/TensorShape.h')
-rw-r--r--arm_compute/core/TensorShape.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arm_compute/core/TensorShape.h b/arm_compute/core/TensorShape.h
index 8d15c50220..3b395e74ce 100644
--- a/arm_compute/core/TensorShape.h
+++ b/arm_compute/core/TensorShape.h
@@ -164,7 +164,7 @@ private:
/** Remove trailing dimensions of size 1 from the reported number of dimensions. */
void apply_dimension_correction()
{
- for(int i = static_cast<int>(_num_dimensions) - 1; i >= 0; --i)
+ for(int i = static_cast<int>(_num_dimensions) - 1; i > 0; --i)
{
if(_id[i] == 1)
{