ArmNN
 20.02
ClBackendContext.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 #include <unordered_set>
9 #include <mutex>
10 
11 #include <arm_compute/runtime/CL/CLTuner.h>
12 
13 namespace armnn
14 {
15 
17 {
18 public:
20 
21  bool BeforeLoadNetwork(NetworkId networkId) override;
22  bool AfterLoadNetwork(NetworkId networkId) override;
23 
24  bool BeforeUnloadNetwork(NetworkId networkId) override;
25  bool AfterUnloadNetwork(NetworkId networkId) override;
26 
27  ~ClBackendContext() override;
28 
29 private:
30  std::mutex m_Mutex;
31  struct ClContextControlWrapper;
32  std::unique_ptr<ClContextControlWrapper> m_ClContextControlWrapper;
33 
34  std::unordered_set<NetworkId> m_NetworkIds;
35 
36  std::unique_ptr<arm_compute::CLTuner> m_Tuner;
37  std::string m_TuningFile;
38 };
39 
40 } // namespace armnn
bool BeforeLoadNetwork(NetworkId networkId) override
Before and after Load network events.
bool AfterUnloadNetwork(NetworkId networkId) override
int NetworkId
Definition: IRuntime.hpp:19
Copyright (c) 2020 ARM Limited.
ClBackendContext(const IRuntime::CreationOptions &options)
bool AfterLoadNetwork(NetworkId networkId) override
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
bool BeforeUnloadNetwork(NetworkId networkId) override
Before and after Unload network events.