bm::task_batch< BVAlloc > Class Template Reference
BitMagic Library » Task parallel programming

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

`#include <bmtask.h>`

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

## Public Types

typedef BVAlloc | bv_allocator_type
typedef task_batch_base::size_type | size_type
typedef std::vector< bm::task_descr > | task_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
virtual bm::task_descr * | get_task (size_type task_idx)
| Get task by index in the batch.
task_vector_type & | get_task_vector () BMNOEXCEPT
| Get access to internal task vector.
const task_vector_type & | get_task_vector () const BMNOEXCEPT
void | add (task_function_t f, void *argptr)
Public Member Functions inherited from bm::task_batch_base
virtual | ~task_batch_base ()

## Protected Attributes

task_vector_type | task_vect_
| list of tasks

## 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 Typedef Documentation

## bv_allocator_type

template<typename BVAlloc>

typedef BVAlloc bm::task_batch< BVAlloc >::bv_allocator_type

Definition at line 142 of file bmtask.h.

## size_type

template<typename BVAlloc>

typedef task_batch_base::size_type bm::task_batch< BVAlloc >::size_type

Definition at line 143 of file bmtask.h.

## task_vector_type

template<typename BVAlloc>

typedef std::vector<bm::task_descr> bm::task_batch< BVAlloc >::task_vector_type

Definition at line 146 of file bmtask.h.

## Member Function Documentation

## add()

template<typename BVAlloc>

void bm::task_batch< BVAlloc >::add | ( | task_function_t | f,
|  | void * | argptr )

inline

Definition at line 172 of file bmtask.h.

Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), and bm::optimize_plan_builder< SVect, Lock >::build_plan().

## get_task()

template<typename BVAlloc>

virtual bm::task_descr * bm::task_batch< BVAlloc >::get_task | ( | size_type | task_idx | ) |

inline virtual

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.

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 access to internal task vector.

Definition at line 168 of file bmtask.h.

Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), bm::optimize_plan_builder< SVect, Lock >::build_plan(), and bm::sv_serialization_plan_builder< SV >::build_plan().

## 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.

## size()

template<typename BVAlloc>

virtual size_type bm::task_batch< BVAlloc >::size | ( |  | ) | const

inline virtual

task_batch_base intreface implementation

Implements bm::task_batch_base.

Definition at line 158 of file bmtask.h.

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

list of tasks

Definition at line 180 of file bmtask.h.

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

- bmtask.h