aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Helpers.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2018-04-30 17:29:41 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:51:17 +0000
commit563494c2f447e201e88e6d7133a41e12971777eb (patch)
tree716ae5e4978ce378ad14f53591087a7a42f6fe58 /arm_compute/core/Helpers.h
parentb7f5d172ccdb1d884388dd6e0e54f74241afca67 (diff)
downloadComputeLibrary-563494c2f447e201e88e6d7133a41e12971777eb.tar.gz
COMPMID-1084 Rework the way validation is performed for NHWC data layout
Change-Id: I00b95f560548da76718298b642c8166f92421097 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129520 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/Helpers.h')
-rw-r--r--arm_compute/core/Helpers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arm_compute/core/Helpers.h b/arm_compute/core/Helpers.h
index 4acb176250..21f3c38116 100644
--- a/arm_compute/core/Helpers.h
+++ b/arm_compute/core/Helpers.h
@@ -527,11 +527,11 @@ inline void permute(Dimensions<T> &dimensions, const PermutationVector &perm)
*/
inline void permute(TensorShape &shape, const PermutationVector &perm)
{
- auto shape_copy = utility::make_array<TensorShape::num_max_dimensions>(shape.begin(), shape.end());
+ TensorShape shape_copy = shape;
for(unsigned int i = 0; i < perm.num_dimensions(); ++i)
{
size_t dimension_val = (perm[i] < shape.num_dimensions()) ? shape_copy[perm[i]] : 1;
- shape.set(i, dimension_val);
+ shape.set(i, dimension_val, false); // Avoid changes in _num_dimension
}
}