aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-02-21 10:15:12 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2021-02-21 10:18:41 +0000
commit5dd0db5a34c410ac720a37cfe33ccefaf621d520 (patch)
treef18a53af3976554d7b268c34bb1b2089b0df696b
parentaebca261873f56381f6cfef54591b772c24f581e (diff)
downloadComputeLibrary-5dd0db5a34c410ac720a37cfe33ccefaf621d520.tar.gz
Disable strict overflow warning for tensor_elem_at
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: I7a3d59d837396f8a30677f427c5570e514f8e071
-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);