ArmNN
 24.02
IBackendContext.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 <armnn/IRuntime.hpp>
9 #include <memory>
10 
11 namespace armnn
12 {
13 
15 {
16 protected:
18 
19 public:
20  /// Before and after Load network events
21  virtual bool BeforeLoadNetwork(NetworkId networkId) = 0;
22  virtual bool AfterLoadNetwork(NetworkId networkId) = 0;
23 
24  /// Before and after Unload network events
25  virtual bool BeforeUnloadNetwork(NetworkId networkId) = 0;
26  virtual bool AfterUnloadNetwork(NetworkId networkId) = 0;
27 
28  // After Enqueue workload events
29  virtual bool AfterEnqueueWorkload(NetworkId networkId) = 0;
30 
31  virtual ~IBackendContext() {}
32 };
33 
34 using IBackendContextUniquePtr = std::unique_ptr<IBackendContext>;
35 
37 {
38 public:
39  virtual ~IBackendModelContext() {}
40 };
41 
42 } // namespace armnn
armnn::IBackendContext::AfterLoadNetwork
virtual bool AfterLoadNetwork(NetworkId networkId)=0
IRuntime.hpp
armnn::IBackendContext::BeforeLoadNetwork
virtual bool BeforeLoadNetwork(NetworkId networkId)=0
Before and after Load network events.
armnn::IBackendModelContext
Definition: IBackendContext.hpp:36
armnn::IBackendContext::AfterUnloadNetwork
virtual bool AfterUnloadNetwork(NetworkId networkId)=0
armnn::IBackendContext::~IBackendContext
virtual ~IBackendContext()
Definition: IBackendContext.hpp:31
armnn::IBackendContextUniquePtr
std::unique_ptr< IBackendContext > IBackendContextUniquePtr
Definition: IBackendContext.hpp:34
armnn::NetworkId
int NetworkId
Definition: IRuntime.hpp:35
armnn::IBackendContext::IBackendContext
IBackendContext(const IRuntime::CreationOptions &)
Definition: IBackendContext.hpp:17
armnn::IBackendContext
Definition: IBackendContext.hpp:14
armnn::IBackendContext::BeforeUnloadNetwork
virtual bool BeforeUnloadNetwork(NetworkId networkId)=0
Before and after Unload network events.
armnn::IRuntime::CreationOptions
Definition: IRuntime.hpp:78
armnn::IBackendModelContext::~IBackendModelContext
virtual ~IBackendModelContext()
Definition: IBackendContext.hpp:39
BackendOptions.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::IBackendContext::AfterEnqueueWorkload
virtual bool AfterEnqueueWorkload(NetworkId networkId)=0