diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2017-07-21 10:08:48 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | a2611815f278334c801094d095901d36e111c3f9 (patch) | |
tree | 1a2bf86b37614ce5473669b283dc37c708dd4957 /src/core/CL | |
parent | a629da13544c361ba9580a233109b2418fd6bb73 (diff) | |
download | ComputeLibrary-a2611815f278334c801094d095901d36e111c3f9.tar.gz |
COMPMID-417 NEON/CL MeanStdDev bugfix using FillBorderKernel
Change-Id: Ic48ba7f69783d0e1e80611264e2bc67d1732436e
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81293
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/core/CL')
-rw-r--r-- | src/core/CL/kernels/CLMeanStdDevKernel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/CL/kernels/CLMeanStdDevKernel.cpp b/src/core/CL/kernels/CLMeanStdDevKernel.cpp index b0b748f466..1b70d7513f 100644 --- a/src/core/CL/kernels/CLMeanStdDevKernel.cpp +++ b/src/core/CL/kernels/CLMeanStdDevKernel.cpp @@ -40,10 +40,15 @@ using namespace arm_compute; CLMeanStdDevKernel::CLMeanStdDevKernel() - : _input(nullptr), _mean(nullptr), _stddev(nullptr), _global_sum(nullptr), _global_sum_squared(nullptr) + : _input(nullptr), _mean(nullptr), _stddev(nullptr), _global_sum(nullptr), _global_sum_squared(nullptr), _border_size(0) { } +BorderSize CLMeanStdDevKernel::border_size() const +{ + return _border_size; +} + void CLMeanStdDevKernel::configure(const ICLImage *input, float *mean, cl::Buffer *global_sum, float *stddev, cl::Buffer *global_sum_squared) { ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(input); @@ -83,6 +88,9 @@ void CLMeanStdDevKernel::configure(const ICLImage *input, float *mean, cl::Buffe constexpr unsigned int num_elems_processed_per_iteration_x = 8; const unsigned int num_elems_processed_per_iteration_y = input->info()->dimension(1); + _border_size = BorderSize(std::max(static_cast<int>(num_elems_processed_per_iteration_x) - static_cast<int>(input->info()->dimension(0)), + static_cast<int>(input->info()->dimension(0) % num_elems_processed_per_iteration_x))); + Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y)); AccessWindowRectangle input_access(input->info(), 0, 0, num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y); update_window_and_padding(win, input_access); |