diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-12-14 17:11:20 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-12-14 19:45:00 +0000 |
commit | 555f1c2241d6fa8c84926a72a0c54e4158817df4 (patch) | |
tree | 0ec5da469c28559d8c5df9848cfa3ada6e0646e8 /arm_compute/runtime/ISimpleLifetimeManager.h | |
parent | b4af2c6738614850aaca3754904f0e8e3b17f0b2 (diff) | |
download | ComputeLibrary-555f1c2241d6fa8c84926a72a0c54e4158817df4.tar.gz |
COMPMID-1710: Account alignment for blob-base allocations
Change-Id: I290d33e25a5966d25a91df39ebc01c28bfa31f78
Reviewed-on: https://review.mlplatform.org/402
Reviewed-by: Anthony Barbier <Anthony.barbier@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/ISimpleLifetimeManager.h')
-rw-r--r-- | arm_compute/runtime/ISimpleLifetimeManager.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arm_compute/runtime/ISimpleLifetimeManager.h b/arm_compute/runtime/ISimpleLifetimeManager.h index f2eb4f5904..4384283b94 100644 --- a/arm_compute/runtime/ISimpleLifetimeManager.h +++ b/arm_compute/runtime/ISimpleLifetimeManager.h @@ -58,7 +58,7 @@ public: // Inherited methods overridden: void register_group(IMemoryGroup *group) override; void start_lifetime(void *obj) override; - void end_lifetime(void *obj, IMemory &obj_memory, size_t size) override; + void end_lifetime(void *obj, IMemory &obj_memory, size_t size, size_t alignment) override; bool are_all_finalized() const override; protected: @@ -69,14 +69,15 @@ protected: /** Element struct */ struct Element { - Element(void *id_ = nullptr, IMemory *handle_ = nullptr, size_t size_ = 0, bool status_ = false) - : id(id_), handle(handle_), size(size_), status(status_) + Element(void *id_ = nullptr, IMemory *handle_ = nullptr, size_t size_ = 0, size_t alignment_ = 0, bool status_ = false) + : id(id_), handle(handle_), size(size_), alignment(alignment_), status(status_) { } - void *id; /**< Element id */ - IMemory *handle; /**< Element's memory handle */ - size_t size; /**< Element's size */ - bool status; /**< Lifetime status */ + void *id; /**< Element id */ + IMemory *handle; /**< Element's memory handle */ + size_t size; /**< Element's size */ + size_t alignment; /**< Alignment requirement */ + bool status; /**< Lifetime status */ }; /** Blob struct */ @@ -84,6 +85,7 @@ protected: { void *id; size_t max_size; + size_t max_alignment; std::set<void *> bound_elements; }; |