From 5ee66eae5dff60f615dfe9427cf1c4116d95f478 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 7 Sep 2017 17:29:16 +0100 Subject: COMPMID-462: Implement TensorReshape for NEON and CL. Change-Id: I11b39c2ceca26ade73822e29a384ef866ae05729 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87707 Reviewed-by: Pablo Tello Tested-by: Kaizen --- arm_compute/core/Helpers.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arm_compute/core/Helpers.h') 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" -- cgit v1.2.1