arm_compute v17.04
[platform/upstream/armcl.git] / src / core / CL / kernels / CLNonLinearFilterKernel.cpp
index 31066ec..6afa582 100644 (file)
@@ -81,13 +81,17 @@ void CLNonLinearFilterKernel::configure(const ICLTensor *input, ICLTensor *outpu
     _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(ss.str(), build_opts));
 
     // Configure kernel window
-    constexpr unsigned int processed_elements(8);
-    constexpr unsigned int read_elements(16);
-    Window                 win = calculate_max_window(*input->info(), processed_elements, border_undefined, border_size());
-    AccessWindowHorizontal output_access(output->info(), 0, processed_elements);
-    update_window_and_padding(win,
-                              AccessWindowRectangle(input->info(), -border_size().left, -border_size().top, read_elements, mask_size),
-                              output_access);
+    constexpr unsigned int num_elems_processed_per_iteration = 8;
+    constexpr unsigned int num_elems_read_per_iteration      = 16;
+    const unsigned int     num_rows_read_per_iteration       = mask_size;
+
+    Window win = calculate_max_window(*input->info(), 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_processed_per_iteration);
+
+    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);