blob: 74b596fe970cc1812b23ac8e8b695803e2188196 (
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
43
44
45
46
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#pragma once
#include "WorkloadFactory.hpp"
#if ARMCOMPUTENEON_ENABLED || ARMCOMPUTECL_ENABLED
#include "arm_compute/runtime/IAllocator.h"
#include "arm_compute/runtime/BlobLifetimeManager.h"
#include "arm_compute/runtime/MemoryManagerOnDemand.h"
#include "arm_compute/runtime/PoolManager.h"
#include <memory>
#endif
namespace armnn
{
// ARM Compute Base Memory Manager
class AclBaseMemoryManager
{
public:
AclBaseMemoryManager() { }
virtual ~AclBaseMemoryManager() { }
#if ARMCOMPUTENEON_ENABLED || ARMCOMPUTECL_ENABLED
AclBaseMemoryManager(std::unique_ptr<arm_compute::IAllocator> alloc);
void Finalize();
std::shared_ptr<arm_compute::MemoryManagerOnDemand>& Get() { return m_IntraLayerMemoryMgr; }
protected:
mutable std::unique_ptr<arm_compute::IAllocator> m_Allocator;
mutable std::shared_ptr<arm_compute::BlobLifetimeManager> m_IntraLayerLifetimeMgr;
mutable std::shared_ptr<arm_compute::PoolManager> m_IntraLayerPoolMgr;
mutable std::shared_ptr<arm_compute::MemoryManagerOnDemand> m_IntraLayerMemoryMgr;
#endif
};
} //namespace armnn
|