diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-09-07 17:29:16 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 5ee66eae5dff60f615dfe9427cf1c4116d95f478 (patch) | |
tree | f2922f584deb20e92404edcd6fba14f6df59c0d8 /arm_compute/core/Helpers.h | |
parent | ce54b56e0d91a8e73f3ecfede6a2b2aa323aa1fd (diff) | |
download | ComputeLibrary-5ee66eae5dff60f615dfe9427cf1c4116d95f478.tar.gz |
COMPMID-462: Implement TensorReshape for NEON and CL.
Change-Id: I11b39c2ceca26ade73822e29a384ef866ae05729
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87707
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'arm_compute/core/Helpers.h')
-rw-r--r-- | arm_compute/core/Helpers.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arm_compute/core/Helpers.h b/arm_compute/core/Helpers.h index f3702e7c93..b6461bc47a 100644 --- a/arm_compute/core/Helpers.h +++ b/arm_compute/core/Helpers.h @@ -472,6 +472,22 @@ bool set_fixed_point_position_if_zero(ITensorInfo &info, int fixed_point_positio * @return The corrispondent valid region */ ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const TensorShape &dst_shape, InterpolationPolicy policy, BorderSize border_size, bool border_undefined); +/** Convert a linear index into n-dimensional coordinates. + * + * @param[in] shape Shape of the n-dimensional tensor. + * @param[in] index Linear index specifying the i-th element. + * + * @return n-dimensional coordinates. + */ +inline Coordinates index2coords(const TensorShape &shape, int index); +/** Convert n-dimensional coordinates into a linear index. + * + * @param[in] shape Shape of the n-dimensional tensor. + * @param[in] coord N-dimensional coordinates. + * + * @return linead index + */ +inline int coords2index(const TensorShape &shape, const Coordinates &coord); } // namespace arm_compute #include "arm_compute/core/Helpers.inl" |