From 4646d2e026a0fa92085fcba2f4aec5ec148956aa Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 19 Jun 2019 12:28:47 +0100 Subject: COMPMID-2072: Use a constexpr for num_elems_processed_per_iteration where possible Change-Id: I26cb699ae3a77003ef7d05ac30d3ed518214e25f Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/1375 Comments-Addressed: Arm Jenkins Reviewed-by: Manuel Bottini Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez --- src/core/CL/kernels/CLCol2ImKernel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/CL/kernels/CLCol2ImKernel.cpp') diff --git a/src/core/CL/kernels/CLCol2ImKernel.cpp b/src/core/CL/kernels/CLCol2ImKernel.cpp index d748745999..8726f024d0 100644 --- a/src/core/CL/kernels/CLCol2ImKernel.cpp +++ b/src/core/CL/kernels/CLCol2ImKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -35,9 +35,10 @@ #include -using namespace arm_compute; using namespace arm_compute::misc::shape_calculator; +namespace arm_compute +{ namespace { Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const Size2D &convolved_dims, unsigned int num_groups) @@ -64,7 +65,7 @@ std::pair validate_and_configure_window(ITensorInfo *input, ITen // Output auto inizialitation if not yet initialized auto_init_if_empty(*output, input->clone()->set_tensor_shape(compute_col2im_shape(*input, convolved_dims, true, num_groups)).set_data_layout(DataLayout::NCHW)); - const unsigned int num_elems_read_per_iteration = 8; + constexpr unsigned int num_elems_read_per_iteration = 8; // Configure window Window win = calculate_max_window(*input, Steps(num_elems_read_per_iteration)); @@ -166,3 +167,4 @@ void CLCol2ImKernel::run(const Window &window, cl::CommandQueue &queue) } while(collapsed.slide_window_slice_3D(slice) && collapsed_out.slide_window_slice_4D(slice_out)); } +} // namespace arm_compute -- cgit v1.2.1