aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/Box3x3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/reference/Box3x3.cpp')
-rw-r--r--tests/validation/reference/Box3x3.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/validation/reference/Box3x3.cpp b/tests/validation/reference/Box3x3.cpp
index 8d304a8236..153f26a5c6 100644
--- a/tests/validation/reference/Box3x3.cpp
+++ b/tests/validation/reference/Box3x3.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -39,8 +39,9 @@ SimpleTensor<T> box3x3(const SimpleTensor<T> &src, BorderMode border_mode, T con
{
SimpleTensor<T> dst(src.shape(), src.data_type());
const std::array<T, 9> filter{ { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
- const float scale = 1.f / static_cast<float>(filter.size());
- for(int element_idx = 0; element_idx < src.num_elements(); ++element_idx)
+ const float scale = 1.f / static_cast<float>(filter.size());
+ const uint32_t num_elements = src.num_elements();
+ for(uint32_t element_idx = 0; element_idx < num_elements; ++element_idx)
{
const Coordinates id = index2coord(src.shape(), element_idx);
apply_2d_spatial_filter(id, src, dst, TensorShape(3U, 3U), filter.data(), scale, border_mode, constant_border_value);