aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClBackendContext.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/cl/ClBackendContext.hpp')
-rw-r--r--src/backends/cl/ClBackendContext.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/backends/cl/ClBackendContext.hpp b/src/backends/cl/ClBackendContext.hpp
new file mode 100644
index 0000000000..24497c2249
--- /dev/null
+++ b/src/backends/cl/ClBackendContext.hpp
@@ -0,0 +1,36 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include <backendsCommon/IBackendContext.hpp>
+#include <unordered_set>
+#include <mutex>
+
+namespace armnn
+{
+
+class ClBackendContext : public IBackendContext
+{
+public:
+ ClBackendContext(const IRuntime::CreationOptions& options);
+
+ bool BeforeLoadNetwork(NetworkId networkId) override;
+ bool AfterLoadNetwork(NetworkId networkId) override;
+
+ bool BeforeUnloadNetwork(NetworkId networkId) override;
+ bool AfterUnloadNetwork(NetworkId networkId) override;
+
+ ~ClBackendContext() override;
+
+private:
+ std::mutex m_Mutex;
+ struct ClContextControlWrapper;
+ std::unique_ptr<ClContextControlWrapper> m_ClContextControlWrapper;
+
+ std::unordered_set<NetworkId> m_NetworkIds;
+
+};
+
+} // namespace armnn \ No newline at end of file