From c1294faa1d60274aa14567338fc2a449c70c1801 Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Fri, 17 Nov 2017 11:47:41 +0000 Subject: 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 Reviewed-by: Anthony Barbier --- tests/validation/CL/BatchNormalizationLayer.cpp | 2 +- tests/validation/CPP/BatchNormalizationLayer.cpp | 4 ++-- tests/validation/Helpers.h | 2 +- tests/validation/NEON/BatchNormalizationLayer.cpp | 2 +- 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(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 batch_normalization_layer(const SimpleTensor &src, const Simp const auto cols = static_cast(src.shape()[0]); const auto rows = static_cast(src.shape()[1]); const auto depth = static_cast(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 batch_normalization_layer(const SimpleTensor &src, const Simp const auto cols = static_cast(src.shape()[0]); const auto rows = static_cast(src.shape()[1]); const auto depth = static_cast(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 std::pair get_batchnormalization_layer_test_bounds(int fixed_point_position = 1) { - bool is_float = std::is_floating_point::value; + const bool is_float = std::is_floating_point::value; std::pair 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(shape0, dt, 1, fixed_point_position); -- cgit v1.2.1