aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLChannelCombineKernel.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2019-06-19 12:28:47 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2019-07-03 09:36:46 +0000
commit4646d2e026a0fa92085fcba2f4aec5ec148956aa (patch)
tree0847684b138f9b4631cf56e20d0e75ef313607d0 /src/core/CL/kernels/CLChannelCombineKernel.cpp
parentcbe39055f61bc7a3f6aef4588de47d48b77cf354 (diff)
downloadComputeLibrary-4646d2e026a0fa92085fcba2f4aec5ec148956aa.tar.gz
COMPMID-2072: Use a constexpr for num_elems_processed_per_iteration where possible
Change-Id: I26cb699ae3a77003ef7d05ac30d3ed518214e25f Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/1375 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Manuel Bottini <manuel.bottini@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLChannelCombineKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLChannelCombineKernel.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/CL/kernels/CLChannelCombineKernel.cpp b/src/core/CL/kernels/CLChannelCombineKernel.cpp
index c7b1da41dc..11cd8ec5d0 100644
--- a/src/core/CL/kernels/CLChannelCombineKernel.cpp
+++ b/src/core/CL/kernels/CLChannelCombineKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -39,7 +39,12 @@
#include <set>
#include <string>
-using namespace arm_compute;
+namespace arm_compute
+{
+namespace
+{
+constexpr unsigned int num_elems_processed_per_iteration = 16;
+} // namespace
CLChannelCombineKernel::CLChannelCombineKernel()
: _planes{ { nullptr } }, _output(nullptr), _output_multi(nullptr), _x_subsampling{ { 1, 1, 1 } }, _y_subsampling{ { 1, 1, 1 } }
@@ -107,8 +112,6 @@ void CLChannelCombineKernel::configure(const ICLTensor *plane0, const ICLTensor
_kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name));
// Configure window
- constexpr unsigned int num_elems_processed_per_iteration = 16;
-
Window win = calculate_max_window(*output->info(), Steps(num_elems_processed_per_iteration));
AccessWindowHorizontal plane0_access(plane0->info(), 0, num_elems_processed_per_iteration);
@@ -211,8 +214,6 @@ void CLChannelCombineKernel::configure(const ICLImage *plane0, const ICLImage *p
_kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts));
// Configure window
- constexpr unsigned int num_elems_processed_per_iteration = 16;
-
Window win = calculate_max_window(*plane0->info(), Steps(num_elems_processed_per_iteration));
AccessWindowRectangle input_plane0_access(plane0->info(), 0, 0, num_elems_processed_per_iteration, 1.f);
@@ -292,3 +293,4 @@ void CLChannelCombineKernel::run(const Window &window, cl::CommandQueue &queue)
}
while(window.slide_window_slice_2D(slice));
}
+} // namespace arm_compute