aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/backends/IBackendContext.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-11-28 15:45:42 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-12-09 12:00:04 +0000
commite5b8eb9fe8147a0849db08ef0898a0e8bef920b4 (patch)
tree54f039796753b6a395eb9f76e46e11a9413dabad /include/armnn/backends/IBackendContext.hpp
parent3e2969d7195d77796774101580b837681505904a (diff)
downloadarmnn-e5b8eb9fe8147a0849db08ef0898a0e8bef920b4.tar.gz
IVGCVSW-4210 Create a public API for the common backend files
* Create a public API for the common backend files * Move OutputHandler to armnn internal * Remove unused headers Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3e86d908b021e3561befa9d45158d87d2cbb18c0
Diffstat (limited to 'include/armnn/backends/IBackendContext.hpp')
-rw-r--r--include/armnn/backends/IBackendContext.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/armnn/backends/IBackendContext.hpp b/include/armnn/backends/IBackendContext.hpp
new file mode 100644
index 0000000000..de9824956f
--- /dev/null
+++ b/include/armnn/backends/IBackendContext.hpp
@@ -0,0 +1,32 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include <armnn/IRuntime.hpp>
+#include <memory>
+
+namespace armnn
+{
+
+class IBackendContext
+{
+protected:
+ IBackendContext(const IRuntime::CreationOptions&) {}
+
+public:
+ // Before and after Load network events
+ virtual bool BeforeLoadNetwork(NetworkId networkId) = 0;
+ virtual bool AfterLoadNetwork(NetworkId networkId) = 0;
+
+ // Before and after Unload network events
+ virtual bool BeforeUnloadNetwork(NetworkId networkId) = 0;
+ virtual bool AfterUnloadNetwork(NetworkId networkId) = 0;
+
+ virtual ~IBackendContext() {}
+};
+
+using IBackendContextUniquePtr = std::unique_ptr<IBackendContext>;
+
+} // namespace armnn \ No newline at end of file