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 <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5651
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/tests/validation/reference/Remap.cpp b/tests/validation/reference/Remap.cpp
index 5c4d3c1..33c5a7d 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 @@
         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<int>(std::floor(map_x[idx])));
-        src_idx.set(1, static_cast<int>(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<int>(std::floor(map_x[idx])));
+                    src_idx.set(1, static_cast<int>(std::floor(map_y[idx])));
+                    out[idx] = in[coord2index(in.shape(), src_idx)];
                     break;
                 }
                 case InterpolationPolicy::BILINEAR: