aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime')
-rw-r--r--arm_compute/runtime/MemoryGroupBase.h10
-rw-r--r--arm_compute/runtime/OffsetLifetimeManager.h8
-rw-r--r--arm_compute/runtime/OffsetMemoryPool.h5
3 files changed, 16 insertions, 7 deletions
diff --git a/arm_compute/runtime/MemoryGroupBase.h b/arm_compute/runtime/MemoryGroupBase.h
index 7dc18c8b4f..e3f38f7cfe 100644
--- a/arm_compute/runtime/MemoryGroupBase.h
+++ b/arm_compute/runtime/MemoryGroupBase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -101,7 +101,7 @@ inline MemoryGroupBase<TensorType>::MemoryGroupBase(std::shared_ptr<IMemoryManag
template <typename TensorType>
inline void MemoryGroupBase<TensorType>::manage(TensorType *obj)
{
- if(_memory_manager && _mappings.empty())
+ if(_memory_manager)
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager());
@@ -119,11 +119,7 @@ inline void MemoryGroupBase<TensorType>::manage(TensorType *obj)
template <typename TensorType>
inline void MemoryGroupBase<TensorType>::finalize_memory(TensorType *obj, IMemory &obj_memory, size_t size, size_t alignment)
{
- // TODO (geopin01) : Check size (track size in MemoryMappings)
- // Check if existing mapping is valid
- ARM_COMPUTE_ERROR_ON(!_mappings.empty() && (_mappings.find(&obj_memory) == std::end(_mappings)));
-
- if(_memory_manager && _mappings.empty())
+ if(_memory_manager)
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager());
_memory_manager->lifetime_manager()->end_lifetime(obj, obj_memory, size, alignment);
diff --git a/arm_compute/runtime/OffsetLifetimeManager.h b/arm_compute/runtime/OffsetLifetimeManager.h
index 26aeb1ef6a..748f3b6f81 100644
--- a/arm_compute/runtime/OffsetLifetimeManager.h
+++ b/arm_compute/runtime/OffsetLifetimeManager.h
@@ -41,6 +41,9 @@ class IMemoryPool;
class OffsetLifetimeManager : public ISimpleLifetimeManager
{
public:
+ using info_type = BlobInfo;
+
+public:
/** Constructor */
OffsetLifetimeManager();
/** Prevent instances of this class to be copy constructed */
@@ -51,6 +54,11 @@ public:
OffsetLifetimeManager(OffsetLifetimeManager &&) = default;
/** Allow instances of this class to be moved */
OffsetLifetimeManager &operator=(OffsetLifetimeManager &&) = default;
+ /** Accessor to the pool internal configuration meta-data
+ *
+ * @return Pool internal configuration meta-data
+ */
+ const info_type &info() const;
// Inherited methods overridden:
std::unique_ptr<IMemoryPool> create_pool(IAllocator *allocator) override;
diff --git a/arm_compute/runtime/OffsetMemoryPool.h b/arm_compute/runtime/OffsetMemoryPool.h
index bc09de6a14..26005706df 100644
--- a/arm_compute/runtime/OffsetMemoryPool.h
+++ b/arm_compute/runtime/OffsetMemoryPool.h
@@ -58,6 +58,11 @@ public:
OffsetMemoryPool(OffsetMemoryPool &&) = default;
/** Allow instances of this class to be move assigned */
OffsetMemoryPool &operator=(OffsetMemoryPool &&) = default;
+ /** Accessor to the pool internal configuration meta-data
+ *
+ * @return Pool internal configuration meta-data
+ */
+ const BlobInfo &info() const;
// Inherited methods overridden:
void acquire(MemoryMappings &handles) override;