diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2017-10-12 17:28:51 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 02aabcca4904adba592fc9840085c87f336d11fb (patch) | |
tree | dbf947425cc91f6d31ad180a312ef1ad97ed34ee /src/core/CL/kernels | |
parent | 6681d24ccc084a0d98d84edadc8aeb5416159261 (diff) | |
download | ComputeLibrary-02aabcca4904adba592fc9840085c87f336d11fb.tar.gz |
COMPMID-583 - Implemented reference implementation and validation tests (NEON and CL) for Histogram
Change-Id: Iccf6b4483cb8394dab2f861a737583126f9bed81
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/91601
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLHistogramKernel.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/CL/kernels/CLHistogramKernel.cpp b/src/core/CL/kernels/CLHistogramKernel.cpp index 87ee5fb74e..7b715abb36 100644 --- a/src/core/CL/kernels/CLHistogramKernel.cpp +++ b/src/core/CL/kernels/CLHistogramKernel.cpp @@ -115,18 +115,20 @@ void CLHistogramKernel::run(const Window &window, cl::CommandQueue &queue) ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(ICLKernel::window(), window); - if(_input->info()->dimension(0) < pixels_per_item) - { - return; - } - + // TODO (COMPMID-679): Add CLMemFill _output->map(queue, true); ARM_COMPUTE_ERROR_ON(_output->buffer() == nullptr); memset(_output->buffer(), 0, _output->size()); _output->unmap(queue); - Window slice = window.first_slice_window_2D(); - cl::NDRange lws = cl::NDRange(local_x_size, 1); + if(_input->info()->dimension(0) < pixels_per_item) + { + return; + } + + Window slice = window.first_slice_window_2D(); + const unsigned int gws_x = (window.x().end() - window.x().start()) / window.x().step(); + cl::NDRange lws = (local_x_size < gws_x) ? cl::NDRange(local_x_size, 1) : cl::NDRange(1, 1); do { |