blob: d777ba59ee6c25f846c9a28ec94275f9ab0ce93f [file] [log] [blame]
telsoa01c577f2c2018-08-31 09:22:23 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa01c577f2c2018-08-31 09:22:23 +01004//
5#pragma once
6
Aron Virginas-Tarf9aeef02018-10-12 15:18:03 +01007#include <arm_compute/runtime/ISimpleLifetimeManager.h>
telsoa01c577f2c2018-08-31 09:22:23 +01008
9namespace armnn
10{
11
12class BlobLifetimeManager : public arm_compute::ISimpleLifetimeManager
13{
14public:
15 BlobLifetimeManager();
16
17 BlobLifetimeManager(const BlobLifetimeManager&) = delete;
18
19 BlobLifetimeManager& operator=(const BlobLifetimeManager&) = delete;
20
21 BlobLifetimeManager(BlobLifetimeManager&&) = default;
22
23 BlobLifetimeManager& operator=(BlobLifetimeManager&&) = default;
24
25 std::unique_ptr<arm_compute::IMemoryPool> create_pool(arm_compute::IAllocator* allocator) override;
26
27 arm_compute::MappingType mapping_type() const override;
28
29private:
30 void update_blobs_and_mappings() override;
31
32 std::vector<size_t> m_BlobSizes;
33};
34
35} // namespace armnn