aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLFastCorners.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-09-18 17:43:33 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit5701e2a41ddf0a12042ac648993fc39701961f66 (patch)
treedd66e82e7f7fdc30a636e748a774422bc1bec40d /src/runtime/CL/functions/CLFastCorners.cpp
parente938175997b973e1ea288f5b95cc8710e6abc7aa (diff)
downloadComputeLibrary-5701e2a41ddf0a12042ac648993fc39701961f66.tar.gz
COMPMID-534: Port MemoryManager to CL functions (Images)
Adds support for: -CLCannyEdge -CLFastCorners -CLGaussian5x5 -CLHarrisCorners -CLSobel3x3 -CLSobel5x5 Change-Id: I712a76d4ceda915b5cf85a4d12c1b7a059d4d909 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88118 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/CL/functions/CLFastCorners.cpp')
-rw-r--r--src/runtime/CL/functions/CLFastCorners.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLFastCorners.cpp b/src/runtime/CL/functions/CLFastCorners.cpp
index d2903fb849..7a0dd09fbe 100644
--- a/src/runtime/CL/functions/CLFastCorners.cpp
+++ b/src/runtime/CL/functions/CLFastCorners.cpp
@@ -36,8 +36,9 @@
using namespace arm_compute;
-CLFastCorners::CLFastCorners()
- : _fast_corners_kernel(),
+CLFastCorners::CLFastCorners(std::shared_ptr<IMemoryManager> memory_manager)
+ : _memory_group(std::move(memory_manager)),
+ _fast_corners_kernel(),
_suppr_func(),
_copy_array_kernel(),
_output(),
@@ -70,6 +71,7 @@ void CLFastCorners::configure(const ICLImage *input, float threshold, bool nonma
const bool update_number = (nullptr != _num_corners);
+ _memory_group.manage(&_output);
_fast_corners_kernel.configure(input, &_output, threshold, nonmax_suppression, border_mode);
if(!_non_max)
@@ -79,6 +81,7 @@ void CLFastCorners::configure(const ICLImage *input, float threshold, bool nonma
else
{
_suppr.allocator()->init(tensor_info);
+ _memory_group.manage(&_suppr);
_suppr_func.configure(&_output, &_suppr, border_mode);
_copy_array_kernel.configure(&_suppr, update_number, corners, &_num_buffer);
@@ -94,6 +97,8 @@ void CLFastCorners::run()
{
cl::CommandQueue q = CLScheduler::get().queue();
+ _memory_group.acquire();
+
if(_non_max)
{
ARM_COMPUTE_ERROR_ON_MSG(_output.cl_buffer().get() == nullptr, "Unconfigured function");
@@ -124,4 +129,6 @@ void CLFastCorners::run()
}
q.flush();
+
+ _memory_group.release();
}