aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSanghoon Lee <sanghoon.lee@arm.com>2017-11-17 11:47:41 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitc1294faa1d60274aa14567338fc2a449c70c1801 (patch)
tree684bbe751ab80a3fea065a44d3bb87804fe1c9b1 /tests
parent41caa625231c24533a514606bbf2683f7d4964ad (diff)
downloadComputeLibrary-c1294faa1d60274aa14567338fc2a449c70c1801.tar.gz
COMPMID-494: Fixing values to const
Change-Id: I21a4191b032df17611e01d20d89cc21e8eaf68fc Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/109605 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/validation/CL/BatchNormalizationLayer.cpp2
-rw-r--r--tests/validation/CPP/BatchNormalizationLayer.cpp4
-rw-r--r--tests/validation/Helpers.h2
-rw-r--r--tests/validation/NEON/BatchNormalizationLayer.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/CL/BatchNormalizationLayer.cpp b/tests/validation/CL/BatchNormalizationLayer.cpp
index c29a400402..6884131582 100644
--- a/tests/validation/CL/BatchNormalizationLayer.cpp
+++ b/tests/validation/CL/BatchNormalizationLayer.cpp
@@ -59,7 +59,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::Ran
shape0, shape1, epsilon, dt)
{
// Set fixed point position data type allowed
- int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0;
+ const int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0;
// Create tensors
CLTensor src = create_tensor<CLTensor>(shape0, dt, 1, fixed_point_position);
diff --git a/tests/validation/CPP/BatchNormalizationLayer.cpp b/tests/validation/CPP/BatchNormalizationLayer.cpp
index 37e2d55bf1..e4446d1694 100644
--- a/tests/validation/CPP/BatchNormalizationLayer.cpp
+++ b/tests/validation/CPP/BatchNormalizationLayer.cpp
@@ -44,7 +44,7 @@ SimpleTensor<T> batch_normalization_layer(const SimpleTensor<T> &src, const Simp
const auto cols = static_cast<int>(src.shape()[0]);
const auto rows = static_cast<int>(src.shape()[1]);
const auto depth = static_cast<int>(src.shape()[2]);
- int upper_dims = src.shape().total_size() / (cols * rows * depth);
+ const int upper_dims = src.shape().total_size() / (cols * rows * depth);
for(int r = 0; r < upper_dims; ++r)
{
@@ -88,7 +88,7 @@ SimpleTensor<T> batch_normalization_layer(const SimpleTensor<T> &src, const Simp
const auto cols = static_cast<int>(src.shape()[0]);
const auto rows = static_cast<int>(src.shape()[1]);
const auto depth = static_cast<int>(src.shape()[2]);
- int upper_dims = src.shape().total_size() / (cols * rows * depth);
+ const int upper_dims = src.shape().total_size() / (cols * rows * depth);
for(int r = 0; r < upper_dims; ++r)
{
diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h
index 6b1c4b9026..b5e156c5f7 100644
--- a/tests/validation/Helpers.h
+++ b/tests/validation/Helpers.h
@@ -186,7 +186,7 @@ void fill_lookuptable(T &&table)
template <typename T>
std::pair<T, T> get_batchnormalization_layer_test_bounds(int fixed_point_position = 1)
{
- bool is_float = std::is_floating_point<T>::value;
+ const bool is_float = std::is_floating_point<T>::value;
std::pair<T, T> bounds;
// Set initial values
diff --git a/tests/validation/NEON/BatchNormalizationLayer.cpp b/tests/validation/NEON/BatchNormalizationLayer.cpp
index b401f5585e..a1421d0b17 100644
--- a/tests/validation/NEON/BatchNormalizationLayer.cpp
+++ b/tests/validation/NEON/BatchNormalizationLayer.cpp
@@ -61,7 +61,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::Ran
shape0, shape1, epsilon, dt)
{
// Set fixed point position data type allowed
- int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0;
+ const int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0;
// Create tensors
Tensor src = create_tensor<Tensor>(shape0, dt, 1, fixed_point_position);