arm_compute v17.04
[platform/upstream/armcl.git] / src / core / CL / kernels / CLNonMaximaSuppression3x3Kernel.cpp
index e4ba9bd..6a96b0e 100644 (file)
@@ -54,15 +54,19 @@ void CLNonMaximaSuppression3x3Kernel::configure(const ICLTensor *input, ICLTenso
     _kernel                          = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("non_max_suppression", build_opts));
 
     // Configure kernel window
-    constexpr unsigned int processed_elements = 8;
-    constexpr unsigned int written_elements   = 8;
-    constexpr unsigned int read_elements      = 16;
-    constexpr unsigned int read_rows          = 3;
-    Window                 win                = calculate_max_window(*input->info(), Steps(processed_elements), border_undefined, border_size());
+    constexpr unsigned int num_elems_processed_per_iteration = 8;
+    constexpr unsigned int num_elems_written_per_iteration   = 8;
+    constexpr unsigned int num_elems_read_per_iteration      = 16;
+    constexpr unsigned int num_rows_read_per_iteration       = 3;
+
+    Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration), border_undefined, border_size());
+
+    AccessWindowRectangle  input_access(input->info(), -border_size().left, -border_size().top, num_elems_read_per_iteration, num_rows_read_per_iteration);
+    AccessWindowHorizontal output_access(output->info(), 0, num_elems_written_per_iteration);
 
-    AccessWindowRectangle  input_access(input->info(), -border_size().left, -border_size().top, read_elements, read_rows);
-    AccessWindowHorizontal output_access(output->info(), 0, written_elements);
     update_window_and_padding(win, input_access, output_access);
+
     output_access.set_valid_region(win, input->info()->valid_region(), border_undefined, border_size());
+
     ICLKernel::configure(win);
 }