Compute Library
 19.08
IPoolManager Class Referenceabstract

Memory pool manager interface. More...

#include <IPoolManager.h>

Public Member Functions

virtual ~IPoolManager ()=default
 Default virtual destructor. More...
 
virtual IMemoryPoollock_pool ()=0
 Locks a pool for execution. More...
 
virtual void unlock_pool (IMemoryPool *pool)=0
 Releases memory pool. More...
 
virtual void register_pool (std::unique_ptr< IMemoryPool > pool)=0
 Register pool to be managed by the pool. More...
 
virtual std::unique_ptr< IMemoryPoolrelease_pool ()=0
 Releases a free pool from the managed pools. More...
 
virtual void clear_pools ()=0
 Clears all pools managed by the pool manager. More...
 
virtual size_t num_pools () const =0
 Returns the total number of pools managed by the pool manager. More...
 

Detailed Description

Memory pool manager interface.

Definition at line 34 of file IPoolManager.h.

Constructor & Destructor Documentation

◆ ~IPoolManager()

virtual ~IPoolManager ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ clear_pools()

virtual void clear_pools ( )
pure virtual

Clears all pools managed by the pool manager.

Precondition
All pools must be unoccupied

Implemented in PoolManager.

◆ lock_pool()

virtual IMemoryPool* lock_pool ( )
pure virtual

Locks a pool for execution.

Returns
Locked pool that workload will be mapped on

Implemented in PoolManager.

◆ num_pools()

virtual size_t num_pools ( ) const
pure virtual

Returns the total number of pools managed by the pool manager.

Returns
Number of managed pools

Implemented in PoolManager.

◆ register_pool()

virtual void register_pool ( std::unique_ptr< IMemoryPool pool)
pure virtual

Register pool to be managed by the pool.

Note
Ownership of the pools is being transferred to the pool manager
Parameters
[in]poolPool to be managed

Implemented in PoolManager.

◆ release_pool()

virtual std::unique_ptr<IMemoryPool> release_pool ( )
pure virtual

Releases a free pool from the managed pools.

Returns
The released pool in case a free pool existed else nullptr

Implemented in PoolManager.

◆ unlock_pool()

virtual void unlock_pool ( IMemoryPool pool)
pure virtual

Releases memory pool.

Parameters
[in]poolMemory pool to release

Implemented in PoolManager.


The documentation for this class was generated from the following file: