diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-12-01 16:13:40 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:17 +0000 |
commit | 8795ffb03c1bb84a0d93e4ece153ceaa86118594 (patch) | |
tree | 87d6fec8a6422dd195a79c38bbe170afd7106fc3 /arm_compute/core/Dimensions.h | |
parent | ab4907325ea264efc26b89ebad7e10522cb823e5 (diff) | |
download | ComputeLibrary-8795ffb03c1bb84a0d93e4ece153ceaa86118594.tar.gz |
COMPMID-700: Adds CPPPermute function
Change-Id: I8f6adc67f6e6157710fca540f217d70e6f297217
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111721
Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/Dimensions.h')
-rw-r--r-- | arm_compute/core/Dimensions.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arm_compute/core/Dimensions.h b/arm_compute/core/Dimensions.h index 912b9d57d7..ae8d6c3503 100644 --- a/arm_compute/core/Dimensions.h +++ b/arm_compute/core/Dimensions.h @@ -100,7 +100,20 @@ public: * * @return The size of the requested dimension. */ - T operator[](size_t dimension) const + const T &operator[](size_t dimension) const + { + ARM_COMPUTE_ERROR_ON(dimension >= num_max_dimensions); + return _id[dimension]; + } + /** Generic accessor to get the size of any dimension + * + * @note Precondition: dimension < Dimensions::num_max_dimensions + * + * @param[in] dimension Dimension of the wanted size + * + * @return The size of the requested dimension. + */ + T &operator[](size_t dimension) { ARM_COMPUTE_ERROR_ON(dimension >= num_max_dimensions); return _id[dimension]; |