diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-10-11 15:33:11 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:55:45 +0000 |
commit | 9da19e9da660057785fb736aba5c61b1ae773f2f (patch) | |
tree | b51b30bed8266571178834367437bab0d8a7a517 /arm_compute/runtime/MemoryManagerOnDemand.h | |
parent | ffb57a05d624c2efe1b32cf6ece112ee28726058 (diff) | |
download | ComputeLibrary-9da19e9da660057785fb736aba5c61b1ae773f2f.tar.gz |
COMPMID-1605: API alignment for the MemoryManager with ARMNN
Change-Id: Iac6a95ba7f388e65b7f1c8865c3e9bf289b233ea
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/155490
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/MemoryManagerOnDemand.h')
-rw-r--r-- | arm_compute/runtime/MemoryManagerOnDemand.h | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/arm_compute/runtime/MemoryManagerOnDemand.h b/arm_compute/runtime/MemoryManagerOnDemand.h index ad4b831e1f..43f557effc 100644 --- a/arm_compute/runtime/MemoryManagerOnDemand.h +++ b/arm_compute/runtime/MemoryManagerOnDemand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -21,23 +21,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef __ARM_COMPUTE_MEMORYMANAGERONDEMAND_H__ -#define __ARM_COMPUTE_MEMORYMANAGERONDEMAND_H__ +#ifndef __ARM_COMPUTE_MEMORY_MANAGER_ON_DEMAND_H__ +#define __ARM_COMPUTE_MEMORY_MANAGER_ON_DEMAND_H__ #include "arm_compute/runtime/IMemoryManager.h" -#include "IAllocator.h" #include "arm_compute/runtime/ILifetimeManager.h" #include "arm_compute/runtime/IMemoryGroup.h" #include "arm_compute/runtime/IPoolManager.h" #include <memory> -#include <set> namespace arm_compute { -class IAllocator; - /** On-demand memory manager */ class MemoryManagerOnDemand : public IMemoryManager { @@ -52,33 +48,16 @@ public: MemoryManagerOnDemand(MemoryManagerOnDemand &&) = default; /** Allow instances of this class to be moved */ MemoryManagerOnDemand &operator=(MemoryManagerOnDemand &&) = default; - /** Sets the number of pools to create - * - * @param[in] num_pools Number of pools - */ - void set_num_pools(unsigned int num_pools); - /** Sets the allocator to be used for configuring the pools - * - * @param[in] allocator Allocator to use - */ - void set_allocator(IAllocator *allocator); - /** Checks if the memory manager has been finalized - * - * @return True if the memory manager has been finalized else false - */ - bool is_finalized() const; // Inherited methods overridden: ILifetimeManager *lifetime_manager() override; IPoolManager *pool_manager() override; - void finalize() override; + void populate(IAllocator &allocator, size_t num_pools) override; + void clear() override; private: std::shared_ptr<ILifetimeManager> _lifetime_mgr; /**< Lifetime manager */ std::shared_ptr<IPoolManager> _pool_mgr; /**< Memory pool manager */ - IAllocator *_allocator; /**< Allocator used for backend allocations */ - bool _is_finalized; /**< Flag that notes if the memory manager has been finalized */ - unsigned int _num_pools; /**< Number of pools to create */ }; } // arm_compute -#endif /*__ARM_COMPUTE_MEMORYMANAGERONDEMAND_H__ */ +#endif /*__ARM_COMPUTE_MEMORY_MANAGER_ON_DEMAND_H__ */ |