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/CLHOGDescriptor.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL/functions/CLHOGDescriptor.cpp') diff --git a/src/runtime/CL/functions/CLHOGDescriptor.cpp b/src/runtime/CL/functions/CLHOGDescriptor.cpp index 21fa6690ea..80026532ab 100644 --- a/src/runtime/CL/functions/CLHOGDescriptor.cpp +++ b/src/runtime/CL/functions/CLHOGDescriptor.cpp @@ -28,14 +28,26 @@ #include "arm_compute/core/Size2D.h" #include "arm_compute/core/Validate.h" #include "arm_compute/runtime/CL/CLScheduler.h" +#include "src/core/CL/kernels/CLFillBorderKernel.h" +#include "src/core/CL/kernels/CLHOGDescriptorKernel.h" +#include "src/core/CL/kernels/CLMagnitudePhaseKernel.h" +#include "support/MemorySupport.h" using namespace arm_compute; CLHOGDescriptor::CLHOGDescriptor(std::shared_ptr memory_manager) - : _memory_group(std::move(memory_manager)), _gradient(), _orient_bin(), _block_norm(), _mag(), _phase(), _hog_space() + : _memory_group(std::move(memory_manager)), + _gradient(), + _orient_bin(support::cpp14::make_unique()), + _block_norm(support::cpp14::make_unique()), + _mag(), + _phase(), + _hog_space() { } +CLHOGDescriptor::~CLHOGDescriptor() = default; + void CLHOGDescriptor::configure(ICLTensor *input, ICLTensor *output, const IHOG *hog, BorderMode border_mode, uint8_t constant_border_value) { configure(CLKernelLibrary::get().get_compile_context(), input, output, hog, border_mode, constant_border_value); @@ -87,10 +99,10 @@ void CLHOGDescriptor::configure(const CLCompileContext &compile_context, ICLTens _memory_group.manage(&_hog_space); // Initialise orientation binning kernel - _orient_bin.configure(compile_context, &_mag, &_phase, &_hog_space, hog->info()); + _orient_bin->configure(compile_context, &_mag, &_phase, &_hog_space, hog->info()); // Initialize HOG norm kernel - _block_norm.configure(compile_context, &_hog_space, output, hog->info()); + _block_norm->configure(compile_context, &_hog_space, output, hog->info()); // Allocate intermediate tensors _mag.allocator()->allocate(); @@ -106,8 +118,8 @@ void CLHOGDescriptor::run() _gradient.run(); // Run orientation binning - CLScheduler::get().enqueue(_orient_bin, false); + CLScheduler::get().enqueue(*_orient_bin, false); // Run block normalization - CLScheduler::get().enqueue(_block_norm); + CLScheduler::get().enqueue(*_block_norm); } \ No newline at end of file -- cgit v1.2.1