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 ++-- src/runtime/NEON/functions/NEDerivative.cpp | 2 +- src/runtime/NEON/functions/NEFillBorder.cpp | 2 +- src/runtime/NEON/functions/NENonMaximaSuppression3x3.cpp | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/runtime') 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); diff --git a/src/runtime/NEON/functions/NEDerivative.cpp b/src/runtime/NEON/functions/NEDerivative.cpp index 2887c13233..c50db14746 100644 --- a/src/runtime/NEON/functions/NEDerivative.cpp +++ b/src/runtime/NEON/functions/NEDerivative.cpp @@ -42,7 +42,7 @@ void NEDerivative::configure(ITensor *input, ITensor *output_x, ITensor *output_ ARM_COMPUTE_ERROR_ON((output_x == nullptr) && (output_y == nullptr)); _kernel.configure(input, output_x, output_y, border_mode == BorderMode::UNDEFINED); - _border_handler.configure(input, 1, border_mode, PixelValue(constant_border_value)); + _border_handler.configure(input, BorderSize(1), border_mode, PixelValue(constant_border_value)); } void NEDerivative::run() diff --git a/src/runtime/NEON/functions/NEFillBorder.cpp b/src/runtime/NEON/functions/NEFillBorder.cpp index e884f4a668..44e49520dc 100644 --- a/src/runtime/NEON/functions/NEFillBorder.cpp +++ b/src/runtime/NEON/functions/NEFillBorder.cpp @@ -30,7 +30,7 @@ using namespace arm_compute; void NEFillBorder::configure(ITensor *input, unsigned int border_width, BorderMode border_mode, const PixelValue &constant_border_value) { - _border_handler.configure(input, border_width, border_mode, constant_border_value); + _border_handler.configure(input, BorderSize(border_width), border_mode, constant_border_value); } void NEFillBorder::run() diff --git a/src/runtime/NEON/functions/NENonMaximaSuppression3x3.cpp b/src/runtime/NEON/functions/NENonMaximaSuppression3x3.cpp index a7b3759a45..e92d567d52 100644 --- a/src/runtime/NEON/functions/NENonMaximaSuppression3x3.cpp +++ b/src/runtime/NEON/functions/NENonMaximaSuppression3x3.cpp @@ -38,10 +38,10 @@ void NENonMaximaSuppression3x3::configure(ITensor *input, ITensor *output, Borde if(border_mode != BorderMode::UNDEFINED) { - _border_handler.configure(input, 1, BorderMode::CONSTANT, 0); + _border_handler.configure(input, BorderSize(1), BorderMode::CONSTANT, 0); } else { - _border_handler.configure(input, 1, BorderMode::UNDEFINED, 0); + _border_handler.configure(input, BorderSize(1), BorderMode::UNDEFINED, 0); } } -- cgit v1.2.1