From 669d17d9055089be1a20f6984630b95019fe2e78 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Sun, 21 Feb 2021 10:15:12 +0000 Subject: Disable strict overflow warning for tensor_elem_at Signed-off-by: Giorgio Arena Change-Id: I7a3d59d837396f8a30677f427c5570e514f8e071 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5118 Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini --- tests/validation/reference/Utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/validation/reference/Utils.h b/tests/validation/reference/Utils.h index 17ef235754..8e15faab8f 100644 --- a/tests/validation/reference/Utils.h +++ b/tests/validation/reference/Utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -56,6 +56,9 @@ inline bool is_valid_pixel_index(int x, int y, int width, int height, int border return ((x >= -border_size) && (y >= -border_size) && (x < (width + border_size)) && (y < height + border_size)); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-overflow" + // Return a tensor element at a specified coordinate with different border modes template T tensor_elem_at(const SimpleTensor &src, Coordinates coord, BorderMode border_mode, T constant_border_value) @@ -84,6 +87,8 @@ T tensor_elem_at(const SimpleTensor &src, Coordinates coord, BorderMode borde return src[coord2index(src.shape(), coord)]; } +#pragma GCC diagnostic pop + template T bilinear_policy(const SimpleTensor &in, Coordinates id, float xn, float yn, BorderMode border_mode, T constant_border_value); -- cgit v1.2.1