From ebcebf1dee7f8314976b1e0cabd62b4cf893d765 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 21 Oct 2020 00:04:14 +0100 Subject: COMPMID-3638: Move NEON kernels Signed-off-by: Michalis Spyrou Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285 Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- src/runtime/NEON/functions/NEHOGDescriptor.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/runtime/NEON/functions/NEHOGDescriptor.cpp') diff --git a/src/runtime/NEON/functions/NEHOGDescriptor.cpp b/src/runtime/NEON/functions/NEHOGDescriptor.cpp index 10765f9b86..689e64fae7 100644 --- a/src/runtime/NEON/functions/NEHOGDescriptor.cpp +++ b/src/runtime/NEON/functions/NEHOGDescriptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Arm Limited. + * Copyright (c) 2016-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -28,8 +28,14 @@ #include "arm_compute/core/Size2D.h" #include "arm_compute/core/Validate.h" #include "arm_compute/runtime/NEON/NEScheduler.h" +#include "src/core/NEON/kernels/NEDerivativeKernel.h" +#include "src/core/NEON/kernels/NEFillBorderKernel.h" +#include "src/core/NEON/kernels/NEHOGDescriptorKernel.h" +#include "support/MemorySupport.h" -using namespace arm_compute; +namespace arm_compute +{ +NEHOGDescriptor::~NEHOGDescriptor() = default; NEHOGDescriptor::NEHOGDescriptor(std::shared_ptr memory_manager) : _memory_group(std::move(memory_manager)), _gradient(), _orient_bin(), _block_norm(), _mag(), _phase(), _hog_space() @@ -82,10 +88,12 @@ void NEHOGDescriptor::configure(ITensor *input, ITensor *output, const IHOG *hog _memory_group.manage(&_hog_space); // Initialise orientation binning kernel - _orient_bin.configure(&_mag, &_phase, &_hog_space, hog->info()); + _orient_bin = arm_compute::support::cpp14::make_unique(); + _orient_bin->configure(&_mag, &_phase, &_hog_space, hog->info()); // Initialize HOG norm kernel - _block_norm.configure(&_hog_space, output, hog->info()); + _block_norm = arm_compute::support::cpp14::make_unique(); + _block_norm->configure(&_hog_space, output, hog->info()); // Allocate intermediate tensors _mag.allocator()->allocate(); @@ -101,8 +109,9 @@ void NEHOGDescriptor::run() _gradient.run(); // Run orientation binning kernel - NEScheduler::get().schedule(&_orient_bin, Window::DimY); + NEScheduler::get().schedule(_orient_bin.get(), Window::DimY); // Run block normalization kernel - NEScheduler::get().schedule(&_block_norm, Window::DimY); + NEScheduler::get().schedule(_block_norm.get(), Window::DimY); } +} // namespace arm_compute -- cgit v1.2.1