BitMagic-C++
Public Types | Public Member Functions | Protected Attributes
bm::task_batch< BVAlloc > Class Template Reference

Basic implementation for collection of tasks for parallel execution. More...

#include <bmtask.h>

Inheritance diagram for bm::task_batch< BVAlloc >:
Inheritance graph
[legend]
Collaboration diagram for bm::task_batch< BVAlloc >:
Collaboration graph
[legend]

Public Types

typedef BVAlloc bv_allocator_type
 
typedef task_batch_base::size_type size_type
 
typedef std::vector< bm::task_descrtask_vector_type
 
- Public Types inherited from bm::task_batch_base
typedef unsigned size_type
 

Public Member Functions

virtual size_type size () const BMNOEXCEPT
 task_batch_base intreface implementation More...
 
virtual bm::task_descrget_task (size_type task_idx)
 Get task by index in the batch. More...
 
task_vector_typeget_task_vector () BMNOEXCEPT
 Get access to internal task vector. More...
 
const task_vector_typeget_task_vector () const BMNOEXCEPT
  More...
 
void add (task_function_t f, void *argptr)
  More...
 
- Public Member Functions inherited from bm::task_batch_base
virtual ~task_batch_base ()
 

Protected Attributes

task_vector_type task_vect_
 list of tasks More...
 

Detailed Description

template<typename BVAlloc>
class bm::task_batch< BVAlloc >

Basic implementation for collection of tasks for parallel execution.

Definition at line 139 of file bmtask.h.

Member Function Documentation

◆ add()

template<typename BVAlloc >
void bm::task_batch< BVAlloc >::add ( task_function_t  f,
void *  argptr 
)
inline

◆ get_task()

template<typename BVAlloc >
virtual bm::task_descr* bm::task_batch< BVAlloc >::get_task ( size_type  task_idx)
inlinevirtual

Get task by index in the batch.

Parameters
task_idx- task index in the batch
Returns
task description

Implements bm::task_batch_base.

Definition at line 160 of file bmtask.h.

References bm::task_batch< BVAlloc >::task_vect_.

Referenced by bm::thread_pool_executor< TPool >::run().

◆ get_task_vector() [1/2]

template<typename BVAlloc >
task_vector_type& bm::task_batch< BVAlloc >::get_task_vector ( )
inline

◆ get_task_vector() [2/2]

template<typename BVAlloc >
const task_vector_type& bm::task_batch< BVAlloc >::get_task_vector ( ) const
inline

Definition at line 169 of file bmtask.h.

References bm::task_batch< BVAlloc >::task_vect_.

◆ size()

template<typename BVAlloc >
virtual size_type bm::task_batch< BVAlloc >::size ( ) const
inlinevirtual

task_batch_base intreface implementation

Implements bm::task_batch_base.

Definition at line 158 of file bmtask.h.

References bm::task_batch< BVAlloc >::task_vect_.

Referenced by bm::thread_pool_executor< TPool >::run().

Field Documentation

◆ task_vect_

template<typename BVAlloc >
task_vector_type bm::task_batch< BVAlloc >::task_vect_
protected

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