From f3c52596a87eb4ccada601fc57f612bab137415d Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 12 May 2021 15:39:07 +0100 Subject: Remove padding from NERemapKernel Use of out_of_tensor function to check if parallel instructons can be used safely Reverting to serial computation otherwise Resolves: COMPMID-4449 Change-Id: I23a986612e3c5d0367e23e56f1aeedbb1330cffc Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5651 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- tests/validation/reference/Remap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/validation/reference/Remap.cpp b/tests/validation/reference/Remap.cpp index 5c4d3c186b..33c5a7de68 100644 --- a/tests/validation/reference/Remap.cpp +++ b/tests/validation/reference/Remap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -52,15 +52,15 @@ SimpleTensor remap(const SimpleTensor &in, SimpleTensor &map_x, Sim const Coordinates id_out = index2coord(out.shape(), idx); valid_mask[idx] = 1; Coordinates src_idx = id_out; // need to setup all coordinates and not just xy - src_idx.set(0, static_cast(std::floor(map_x[idx]))); - src_idx.set(1, static_cast(std::floor(map_y[idx]))); if((0 <= map_y[idx]) && (map_y[idx] < height) && (0 <= map_x[idx]) && (map_x[idx] < width)) { switch(policy) { case InterpolationPolicy::NEAREST_NEIGHBOR: { - out[idx] = tensor_elem_at(in, src_idx, border_mode, constant_border_value); + src_idx.set(0, static_cast(std::floor(map_x[idx]))); + src_idx.set(1, static_cast(std::floor(map_y[idx]))); + out[idx] = in[coord2index(in.shape(), src_idx)]; break; } case InterpolationPolicy::BILINEAR: -- cgit v1.2.1