IBM SYSTEMG G RUNTIME & NATIVE STORE  0.5
IBM Native Graph Computing and Storage System based on IBM Parallel Programming Library
 All Classes Functions Variables Typedefs Pages
Public Member Functions | Private Attributes | Friends | List of all members
ibmppl::internal::task_allocator< T > Class Template Reference

Task allocator. This class maintains a pool of tasks with methods to allocate and free tasks. More...

#include <task_manager.h>

Public Member Functions

 task_allocator ()
 
void init_allocator (size_t n)
 
bool initialized ()
 
T * alloc_task (void)
 return a task from the pool;
 
void free_task (T *t)
 free the task; we don;t release memory for now but we return it to the pool
 

Private Attributes

T * _task_pool
 
size_t _total
 
size_t _avail
 
bool _initialized
 
volatile int l
 

Friends

std::ostream & operator<< (std::ostream &out, task_allocator &ta)
 

Detailed Description

template<class T>
class ibmppl::internal::task_allocator< T >

Task allocator. This class maintains a pool of tasks with methods to allocate and free tasks.

Constructor & Destructor Documentation

template<class T >
ibmppl::internal::task_allocator< T >::task_allocator ( )
inline

default constructor

Member Function Documentation

template<class T >
void ibmppl::internal::task_allocator< T >::init_allocator ( size_t  n)
inline

Instantiate a task allocator with an initial number of tasks (n)

template<class T >
bool ibmppl::internal::task_allocator< T >::initialized ( )
inline

Check whether task allocator is initialized


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