From bef7fa27b0d231a8649952f60808132d109b6345 Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Wed, 21 Oct 2020 15:58:54 +0100 Subject: COMPMID-3639: (3RDPARTY_UPDATE) Move CL kernels to src Change-Id: I10d27db788e5086adae1841e3e2441cd9b76ef84 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4310 Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLGaussian5x5.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/runtime/CL/functions/CLGaussian5x5.cpp') diff --git a/src/runtime/CL/functions/CLGaussian5x5.cpp b/src/runtime/CL/functions/CLGaussian5x5.cpp index 1fe2fddfb6..f7470d4ecf 100644 --- a/src/runtime/CL/functions/CLGaussian5x5.cpp +++ b/src/runtime/CL/functions/CLGaussian5x5.cpp @@ -24,22 +24,30 @@ #include "arm_compute/runtime/CL/functions/CLGaussian5x5.h" #include "arm_compute/core/CL/ICLTensor.h" -#include "arm_compute/core/CL/kernels/CLGaussian5x5Kernel.h" #include "arm_compute/core/PixelValue.h" #include "arm_compute/core/TensorInfo.h" #include "arm_compute/core/Validate.h" #include "arm_compute/runtime/CL/CLScheduler.h" #include "arm_compute/runtime/ITensorAllocator.h" +#include "src/core/CL/kernels/CLFillBorderKernel.h" +#include "src/core/CL/kernels/CLGaussian5x5Kernel.h" +#include "support/MemorySupport.h" #include using namespace arm_compute; CLGaussian5x5::CLGaussian5x5(std::shared_ptr memory_manager) - : _memory_group(std::move(memory_manager)), _kernel_hor(), _kernel_vert(), _border_handler(), _tmp() + : _memory_group(std::move(memory_manager)), + _kernel_hor(support::cpp14::make_unique()), + _kernel_vert(support::cpp14::make_unique()), + _border_handler(support::cpp14::make_unique()), + _tmp() { } +CLGaussian5x5::~CLGaussian5x5() = default; + void CLGaussian5x5::configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value) { configure(CLKernelLibrary::get().get_compile_context(), input, output, border_mode, constant_border_value); @@ -55,9 +63,9 @@ void CLGaussian5x5::configure(const CLCompileContext &compile_context, ICLTensor _memory_group.manage(&_tmp); // Configure kernels - _kernel_hor.configure(compile_context, input, &_tmp, border_mode == BorderMode::UNDEFINED); - _kernel_vert.configure(compile_context, &_tmp, output, border_mode == BorderMode::UNDEFINED); - _border_handler.configure(compile_context, input, _kernel_hor.border_size(), border_mode, PixelValue(constant_border_value)); + _kernel_hor->configure(compile_context, input, &_tmp, border_mode == BorderMode::UNDEFINED); + _kernel_vert->configure(compile_context, &_tmp, output, border_mode == BorderMode::UNDEFINED); + _border_handler->configure(compile_context, input, _kernel_hor->border_size(), border_mode, PixelValue(constant_border_value)); // Allocate intermediate buffers _tmp.allocator()->allocate(); @@ -65,10 +73,10 @@ void CLGaussian5x5::configure(const CLCompileContext &compile_context, ICLTensor void CLGaussian5x5::run() { - CLScheduler::get().enqueue(_border_handler, false); + CLScheduler::get().enqueue(*_border_handler, false); MemoryGroupResourceScope scope_mg(_memory_group); - CLScheduler::get().enqueue(_kernel_hor, false); - CLScheduler::get().enqueue(_kernel_vert); + CLScheduler::get().enqueue(*_kernel_hor, false); + CLScheduler::get().enqueue(*_kernel_vert); } -- cgit v1.2.1