From 960b0849e037641b74e57105a55d107da7dbe9b0 Mon Sep 17 00:00:00 2001 From: steniu01 Date: Fri, 23 Jun 2017 11:44:34 +0100 Subject: COMPMID-250 make BorderSize explicit and fix float value validation bug Change-Id: I747fdef3b5ad83a9c00dc42796debe86b6cd972e Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78686 Tested-by: Kaizen Reviewed-by: Moritz Pflanzer --- src/runtime/CL/functions/CLBox3x3.cpp | 2 +- src/runtime/CL/functions/CLDerivative.cpp | 2 +- src/runtime/CL/functions/CLDilate.cpp | 2 +- src/runtime/CL/functions/CLErode.cpp | 2 +- src/runtime/CL/functions/CLFillBorder.cpp | 2 +- src/runtime/CL/functions/CLHarrisCorners.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/runtime/CL') diff --git a/src/runtime/CL/functions/CLBox3x3.cpp b/src/runtime/CL/functions/CLBox3x3.cpp index 8de6807c73..20d5dae94e 100644 --- a/src/runtime/CL/functions/CLBox3x3.cpp +++ b/src/runtime/CL/functions/CLBox3x3.cpp @@ -36,5 +36,5 @@ void CLBox3x3::configure(ICLTensor *input, ICLTensor *output, BorderMode border_ auto k = arm_compute::cpp14::make_unique(); k->configure(input, output, border_mode == BorderMode::UNDEFINED); _kernel = std::move(k); - _border_handler.configure(input, 1, border_mode, PixelValue(constant_border_value)); + _border_handler.configure(input, BorderSize(1), border_mode, PixelValue(constant_border_value)); } diff --git a/src/runtime/CL/functions/CLDerivative.cpp b/src/runtime/CL/functions/CLDerivative.cpp index c51cb4c333..9357de52f1 100644 --- a/src/runtime/CL/functions/CLDerivative.cpp +++ b/src/runtime/CL/functions/CLDerivative.cpp @@ -36,5 +36,5 @@ void CLDerivative::configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *o auto k = arm_compute::cpp14::make_unique(); k->configure(input, output_x, output_y, border_mode == BorderMode::UNDEFINED); _kernel = std::move(k); - _border_handler.configure(input, 1, border_mode, PixelValue(constant_border_value)); + _border_handler.configure(input, BorderSize(1), border_mode, PixelValue(constant_border_value)); } diff --git a/src/runtime/CL/functions/CLDilate.cpp b/src/runtime/CL/functions/CLDilate.cpp index 345f47763c..0a4abe30c2 100644 --- a/src/runtime/CL/functions/CLDilate.cpp +++ b/src/runtime/CL/functions/CLDilate.cpp @@ -36,5 +36,5 @@ void CLDilate::configure(ICLTensor *input, ICLTensor *output, BorderMode border_ auto k = arm_compute::cpp14::make_unique(); k->configure(input, output, border_mode == BorderMode::UNDEFINED); _kernel = std::move(k); - _border_handler.configure(input, 1, border_mode, PixelValue(constant_border_value)); + _border_handler.configure(input, BorderSize(1), border_mode, PixelValue(constant_border_value)); } diff --git a/src/runtime/CL/functions/CLErode.cpp b/src/runtime/CL/functions/CLErode.cpp index b4c50e465a..c41371cf9e 100644 --- a/src/runtime/CL/functions/CLErode.cpp +++ b/src/runtime/CL/functions/CLErode.cpp @@ -36,5 +36,5 @@ void CLErode::configure(ICLTensor *input, ICLTensor *output, BorderMode border_m auto k = arm_compute::cpp14::make_unique(); k->configure(input, output, border_mode == BorderMode::UNDEFINED); _kernel = std::move(k); - _border_handler.configure(input, 1, border_mode, PixelValue(constant_border_value)); + _border_handler.configure(input, BorderSize(1), border_mode, PixelValue(constant_border_value)); } diff --git a/src/runtime/CL/functions/CLFillBorder.cpp b/src/runtime/CL/functions/CLFillBorder.cpp index 9e59b771d8..172f09da1a 100644 --- a/src/runtime/CL/functions/CLFillBorder.cpp +++ b/src/runtime/CL/functions/CLFillBorder.cpp @@ -33,6 +33,6 @@ using namespace arm_compute; void CLFillBorder::configure(ICLTensor *tensor, unsigned int border_width, BorderMode border_mode, const PixelValue &constant_border_value) { auto k = arm_compute::cpp14::make_unique(); - k->configure(tensor, border_width, border_mode, constant_border_value); + k->configure(tensor, BorderSize(border_width), border_mode, constant_border_value); _kernel = std::move(k); } diff --git a/src/runtime/CL/functions/CLHarrisCorners.cpp b/src/runtime/CL/functions/CLHarrisCorners.cpp index 2db277fa4d..e1c44416ae 100644 --- a/src/runtime/CL/functions/CLHarrisCorners.cpp +++ b/src/runtime/CL/functions/CLHarrisCorners.cpp @@ -100,8 +100,8 @@ void CLHarrisCorners::configure(ICLImage *input, float threshold, float min_dist } // Configure border filling before harris score - _border_gx.configure(&_gx, block_size / 2, border_mode, constant_border_value); - _border_gy.configure(&_gy, block_size / 2, border_mode, constant_border_value); + _border_gx.configure(&_gx, BorderSize(block_size / 2), border_mode, constant_border_value); + _border_gy.configure(&_gy, BorderSize(block_size / 2), border_mode, constant_border_value); // Normalization factor const float norm_factor = 1.0f / (255.0f * pow(4.0f, gradient_size / 2) * block_size); -- cgit v1.2.1