Disable strict overflow warning for tensor_elem_at
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Change-Id: I7a3d59d837396f8a30677f427c5570e514f8e071
diff --git a/tests/validation/reference/Utils.h b/tests/validation/reference/Utils.h
index 17ef235..8e15faa 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 @@
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 @@
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);