blob: 6fca42d2ed1b2f2b435fc6321673efbbb529b164 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <armnn/BackendOptions.hpp>
#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;
// After Enqueue workload events
virtual bool AfterEnqueueWorkload(NetworkId networkId) = 0;
virtual ~IBackendContext() {}
};
using IBackendContextUniquePtr = std::unique_ptr<IBackendContext>;
class IBackendModelContext
{
public:
virtual ~IBackendModelContext() {}
};
} // namespace armnn
|