diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-06-21 18:43:12 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-07-05 15:30:24 +0000 |
commit | 37d080f2f11cfd734104b76512e1fb191486216e (patch) | |
tree | d5df067c826aacc0676e7e9557a54b61a9a3b7eb /arm_compute/core/Dimensions.h | |
parent | 11de30da8a9f79943255ddba7bb70a66b076673b (diff) | |
download | ComputeLibrary-37d080f2f11cfd734104b76512e1fb191486216e.tar.gz |
COMPMID-2378: Sanitize GEMM configuration for NEON
Change-Id: I7859b82b2059e14685f8792424648ac5eacd67f1
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1418
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Dimensions.h')
-rw-r--r-- | arm_compute/core/Dimensions.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arm_compute/core/Dimensions.h b/arm_compute/core/Dimensions.h index 0a9264f6b0..9c38c60779 100644 --- a/arm_compute/core/Dimensions.h +++ b/arm_compute/core/Dimensions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -166,6 +166,27 @@ public: collapse(num_dimensions() - start, start); } + /** Remove dimension of a given index + * + * @note If index is greater than the number of dimensions no operation is performed + * + * @param[in] idx Dimension index to remove + */ + void remove(size_t idx) + { + ARM_COMPUTE_ERROR_ON(_num_dimensions < 1); + if(idx >= _num_dimensions) + { + return; + } + + std::copy(_id.begin() + idx + 1, _id.end(), _id.begin() + idx); + _num_dimensions--; + + // Make sure all empty dimensions are filled with 0 + std::fill(_id.begin() + _num_dimensions, _id.end(), 0); + } + /** Returns a read/write iterator that points to the first element in the dimension array. * * @return an iterator. |