aboutsummaryrefslogtreecommitdiff
path: root/src/graph/GraphContext.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-08 13:20:04 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitb6eb35371d222c6b7f61210d97ebd7dd9e197458 (patch)
treeaf89729ad68d665916c37abb5fd49e512fa40614 /src/graph/GraphContext.cpp
parent1d1f32ce7ef6acea4afd4cf6a929436640b72ccd (diff)
downloadComputeLibrary-b6eb35371d222c6b7f61210d97ebd7dd9e197458.tar.gz
COMPMID-1478: Stop relying on static default OpenCL objects in cl2.hpp
This causes problems when ACL is used as a shared library on Android. Fixes some problems related to creation / destruction order between the Graph's CL backend and core / runtime Change-Id: I716d63fd42f4586df1ffbb6fa97e4db06d3a781b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143228 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/graph/GraphContext.cpp')
-rw-r--r--src/graph/GraphContext.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/graph/GraphContext.cpp b/src/graph/GraphContext.cpp
index 3f311145bc..5f33ed3537 100644
--- a/src/graph/GraphContext.cpp
+++ b/src/graph/GraphContext.cpp
@@ -22,7 +22,9 @@
* SOFTWARE.
*/
#include "arm_compute/graph/GraphContext.h"
-#include <arm_compute/graph.h>
+
+#include "arm_compute/graph.h"
+#include "arm_compute/graph/Utils.h"
namespace arm_compute
{
@@ -33,6 +35,12 @@ GraphContext::GraphContext()
{
}
+GraphContext::~GraphContext()
+{
+ _memory_managers.clear();
+ release_default_graph_context(*this);
+}
+
const GraphConfig &GraphContext::config() const
{
return _config;
@@ -82,4 +90,4 @@ void GraphContext::finalize()
}
}
} // namespace graph
-} // namespace arm_compute \ No newline at end of file
+} // namespace arm_compute