diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2021-05-12 15:39:07 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-05-18 09:53:11 +0000 |
commit | f3c52596a87eb4ccada601fc57f612bab137415d (patch) | |
tree | 5c842e9ec9d93390179ecc9e8dfd0207e0fb42df /tests/validation | |
parent | 494b97a8297c18d0d610a54189c8f848e2cf5446 (diff) | |
download | ComputeLibrary-f3c52596a87eb4ccada601fc57f612bab137415d.tar.gz |
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>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/reference/Remap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<T> remap(const SimpleTensor<T> &in, SimpleTensor<float> &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<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: |