aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/CLScheduler.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-01-08 15:55:21 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commitfd14f9e5ff091f6ddcbf332709ba408527294508 (patch)
treecedbe46434b4327c6ed46491d225936fd0a24f4e /src/runtime/CL/CLScheduler.cpp
parentabd03cfc7ba96462bc5a1ca6f4faa9ca22792158 (diff)
downloadComputeLibrary-fd14f9e5ff091f6ddcbf332709ba408527294508.tar.gz
COMPMID-783: Segfault in OCLGrind
Enforce clFinish to be called on destruction of the CLScheduler to ensure that no leftovers are in the queue which might lead to the retain of the queue and its deferred destruction. Change-Id: Ic71933f65cdccd74f4f01a6e2ec1a049995f5b50 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115389 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/CLScheduler.cpp')
-rw-r--r--src/runtime/CL/CLScheduler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runtime/CL/CLScheduler.cpp b/src/runtime/CL/CLScheduler.cpp
index bf13a25693..c947b7acc4 100644
--- a/src/runtime/CL/CLScheduler.cpp
+++ b/src/runtime/CL/CLScheduler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016, 2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -35,6 +35,11 @@ CLScheduler::CLScheduler()
{
}
+CLScheduler::~CLScheduler()
+{
+ _queue.finish();
+}
+
CLScheduler &CLScheduler::get()
{
std::call_once(_initialize_symbols, opencl_is_available);