aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2022-05-12 11:00:36 +0100
committerMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2022-05-12 11:01:17 +0100
commit856554e7e0ac2dd20f4aeebf5dd9ab3f0abd94e8 (patch)
tree93718ec3ec1f2afe2b3d4ce1ca06fce6173d4000 /arm_compute
parent58a427f6602c6fc8a5069116b1b2579eaefc7f20 (diff)
downloadComputeLibrary-856554e7e0ac2dd20f4aeebf5dd9ab3f0abd94e8.tar.gz
Revert "Add support for 2d and 3d indices for axis 0"
This reverts commit 0db8b8bbd941b3dab4238c03e734e7ac43c662ed. Relates to [COMPMID-5055] Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> Change-Id: I143e7965e21b956abb05ba5c41e12c5b73b7345a
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/utils/misc/ShapeCalculator.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h
index aa51ad209a..df907c106e 100644
--- a/arm_compute/core/utils/misc/ShapeCalculator.h
+++ b/arm_compute/core/utils/misc/ShapeCalculator.h
@@ -1496,24 +1496,13 @@ inline TensorShape compute_pool3d_shape(const TensorShape &src, Pooling3dLayerIn
inline TensorShape compute_gather_shape(const TensorShape &input_shape, const TensorShape &indices_shape, uint32_t actual_axis)
{
+ ARM_COMPUTE_ERROR_ON(indices_shape.num_dimensions() > 1);
ARM_COMPUTE_ERROR_ON(input_shape.num_dimensions() > 4);
ARM_COMPUTE_ERROR_ON(actual_axis >= input_shape.num_dimensions());
- TensorShape output_shape = input_shape;
- if(indices_shape.num_dimensions() == 1u)
- {
- output_shape[actual_axis] = indices_shape[0];
- }
- else
- {
- const auto inddims{ indices_shape.num_dimensions() };
- output_shape.shift_right(indices_shape.num_dimensions() - 1);
- output_shape[0] = input_shape[0];
- for(size_t idx(1); (idx - 1) < inddims; ++idx)
- {
- output_shape.set(actual_axis + idx, indices_shape[idx - 1], false);
- }
- }
+ TensorShape output_shape = input_shape;
+ output_shape[actual_axis] = indices_shape[0];
+
return output_shape;
}
} // namespace shape_calculator