aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEFastCorners.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-09-18 16:04:42 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitd910ffa3ae6433404649f91ac53c8fa08bd6e196 (patch)
treee747f90256abca807c2f112e29f166b751ff8275 /src/runtime/NEON/functions/NEFastCorners.cpp
parent8b3b5facea202a2105081a85cd177666c2fb158d (diff)
downloadComputeLibrary-d910ffa3ae6433404649f91ac53c8fa08bd6e196.tar.gz
COMPMID-534: Port MemoryManager to NEON functions (Images)
Adds support to: -NEHarrisCorners -NEFastCorners Change-Id: I21eeb9961092d20f69e82f447fe1faa48b0f4ad8 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88113 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEFastCorners.cpp')
-rw-r--r--src/runtime/NEON/functions/NEFastCorners.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/runtime/NEON/functions/NEFastCorners.cpp b/src/runtime/NEON/functions/NEFastCorners.cpp
index 265041fc42..4137b1d131 100644
--- a/src/runtime/NEON/functions/NEFastCorners.cpp
+++ b/src/runtime/NEON/functions/NEFastCorners.cpp
@@ -35,8 +35,9 @@
using namespace arm_compute;
-NEFastCorners::NEFastCorners()
- : _fast_corners_kernel(),
+NEFastCorners::NEFastCorners(std::shared_ptr<IMemoryManager> memory_manager)
+ : _memory_group(std::move(memory_manager)),
+ _fast_corners_kernel(),
_border_handler(),
_nonmax_kernel(),
_fill_kernel(),
@@ -59,6 +60,7 @@ void NEFastCorners::configure(IImage *input, float threshold, bool nonmax_suppre
TensorInfo tensor_info(input->info()->tensor_shape(), Format::U8);
_output.allocator()->init(tensor_info);
+ _memory_group.manage(&_output);
// If border is UNDEFINED _fast_corners_kernel will operate in xwindow (3,
// width - 3) and ywindow (3, height -3) so the output image will leave the
@@ -75,6 +77,7 @@ void NEFastCorners::configure(IImage *input, float threshold, bool nonmax_suppre
else
{
_suppressed.allocator()->init(tensor_info);
+ _memory_group.manage(&_suppressed);
_nonmax_kernel.configure(&_output, &_suppressed, BorderMode::UNDEFINED == border_mode);
_fill_kernel.configure(&_suppressed, 1 /* we keep all texels >0 */, corners);
@@ -90,6 +93,8 @@ void NEFastCorners::run()
{
NEScheduler::get().schedule(&_border_handler, Window::DimZ);
+ _memory_group.acquire();
+
NEScheduler::get().schedule(&_fast_corners_kernel, Window::DimY);
if(_non_max)
@@ -98,4 +103,6 @@ void NEFastCorners::run()
}
NEScheduler::get().schedule(&_fill_kernel, Window::DimY);
+
+ _memory_group.release();
}