blob: b12c99f733503e8a3e855cef673ac3c1992df004 [file] [log] [blame]
David Beck1b61be52018-11-08 09:19:14 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <armnn/IRuntime.hpp>
8#include <memory>
9
10namespace armnn
11{
12
13class IBackendContext
14{
15protected:
16 IBackendContext(const IRuntime::CreationOptions&) {}
17
18public:
Ryan OShea2bbfaa72020-02-12 16:15:27 +000019 /// Before and after Load network events
David Beck1b61be52018-11-08 09:19:14 +000020 virtual bool BeforeLoadNetwork(NetworkId networkId) = 0;
21 virtual bool AfterLoadNetwork(NetworkId networkId) = 0;
22
Ryan OShea2bbfaa72020-02-12 16:15:27 +000023 /// Before and after Unload network events
David Beck1b61be52018-11-08 09:19:14 +000024 virtual bool BeforeUnloadNetwork(NetworkId networkId) = 0;
25 virtual bool AfterUnloadNetwork(NetworkId networkId) = 0;
26
27 virtual ~IBackendContext() {}
28};
29
30using IBackendContextUniquePtr = std::unique_ptr<IBackendContext>;
31
32} // namespace armnn