aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Helpers.inl
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2020-06-11 10:47:53 +0100
committerSiCong Li <sicong.li@arm.com>2020-06-12 14:14:16 +0000
commite1536a82dd872651551e3ce25b2bae5da8abaf14 (patch)
tree88fafd0589f868b3bb3f6a44232bf002570de215 /arm_compute/core/Helpers.inl
parent11c562c94fa6a0399aff798bfd970ed8c1942730 (diff)
downloadComputeLibrary-e1536a82dd872651551e3ce25b2bae5da8abaf14.tar.gz
COMPMID-3510 Fix definition of Softmax "Axis"
* Move helper function dim_index_2_num_dims from header to inl file Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I204756997316eae8cc2c9d4ba6a91d5974c75965 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3325 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Helpers.inl')
-rw-r--r--arm_compute/core/Helpers.inl5
1 files changed, 5 insertions, 0 deletions
diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl
index 233d46bb86..30461f3b84 100644
--- a/arm_compute/core/Helpers.inl
+++ b/arm_compute/core/Helpers.inl
@@ -29,6 +29,11 @@
namespace arm_compute
{
+inline size_t dim_index_2_num_dims(int32_t dim_axis, int32_t num_dims)
+{
+ return static_cast<size_t>(wrap_around(dim_axis, num_dims)) + 1;
+}
+
inline uint8_t pixel_area_c1u8_clamp(const uint8_t *first_pixel_ptr, size_t stride, size_t width, size_t height, float wr, float hr, int x, int y)
{
ARM_COMPUTE_ERROR_ON(first_pixel_ptr == nullptr);