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/CLWidthConcatenateLayerKernel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/CL/kernels/CLWidthConcatenateLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLWidthConcatenateLayerKernel.cpp b/src/core/CL/kernels/CLWidthConcatenateLayerKernel.cpp index b577944a03..01fef481a8 100644 --- a/src/core/CL/kernels/CLWidthConcatenateLayerKernel.cpp +++ b/src/core/CL/kernels/CLWidthConcatenateLayerKernel.cpp @@ -40,13 +40,14 @@ #include -using namespace arm_compute; +namespace arm_compute +{ namespace { +constexpr unsigned int num_elems_processed_per_iteration = 16; + std::pair validate_and_configure_window(ITensorInfo *input, unsigned int width_offset, ITensorInfo *output) { - const unsigned int num_elems_processed_per_iteration = 16; - // The window needs to be based on input as we copy all the widths of input Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration)); AccessWindowHorizontal input_access(input, 0, num_elems_processed_per_iteration); @@ -98,8 +99,6 @@ void CLWidthConcatenateLayerKernel::configure(const ICLTensor *input, unsigned i _output = output; _width_offset = width_offset; - const unsigned int num_elems_processed_per_iteration = 16; - // Add build options CLBuildOptions build_opts; build_opts.add_option("-DDATA_TYPE=" + get_underlying_cl_type_from_data_type(input->info()->data_type())); @@ -137,3 +136,4 @@ void CLWidthConcatenateLayerKernel::run(const Window &window, cl::CommandQueue & add_4D_tensor_argument(idx, _output, window); enqueue(queue, *this, window); } +} // namespace arm_compute -- cgit v1.2.1