aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-02-21 10:15:12 +0000
committerManuel Bottini <manuel.bottini@arm.com>2021-02-22 09:40:57 +0000
commit669d17d9055089be1a20f6984630b95019fe2e78 (patch)
tree707707234f795d0defe658f46f33522bb0bbc98e
parent1055dc14c7812ea322947e5b4a0733fb7b206715 (diff)
downloadComputeLibrary-669d17d9055089be1a20f6984630b95019fe2e78.tar.gz
Disable strict overflow warning for tensor_elem_at
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: I7a3d59d837396f8a30677f427c5570e514f8e071 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5118 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
-rw-r--r--tests/validation/reference/Utils.h7
1 files changed, 6 insertions, 1 deletions
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 <typename T>
T tensor_elem_at(const SimpleTensor<T> &src, Coordinates coord, BorderMode border_mode, T constant_border_value)
@@ -84,6 +87,8 @@ T tensor_elem_at(const SimpleTensor<T> &src, Coordinates coord, BorderMode borde
return src[coord2index(src.shape(), coord)];
}
+#pragma GCC diagnostic pop
+
template <typename T>
T bilinear_policy(const SimpleTensor<T> &in, Coordinates id, float xn, float yn, BorderMode border_mode, T constant_border_value);