PFUNC 1.0
|
#include <pfunc/parallel_while.hpp>
Classes | |
struct | while_wrapper |
Public Types | |
typedef PFuncInstanceType::taskmgr | TaskMgrType |
typedef PFuncInstanceType::task | TaskType |
typedef InputIterator::value_type | ValueType |
Public Member Functions | |
parallel_while (InputIterator first, InputIterator last, const WhileExecutable &func, TaskMgrType &taskmgr) | |
void | operator() (void) |
Private Attributes | |
InputIterator | first |
InputIterator | last |
const WhileExecutable & | func |
TaskMgrType & | taskmgr |
A structure that implements the parallel_while loop. To initialize, a range of InputIterators is given. Each element in the given range is executed in parallel by spawning tasks.
Types: PFuncInstanceType: The type of PFunc library instance. The library instance must use pfunc::use_default for the Functor! That is, it should use virtual operator(). InputIterator: An input iterator that has value_type. WhileExecutable: A functor that is a model of WhileExecutable concept.
typedef PFuncInstanceType::taskmgr pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::TaskMgrType |
typedef PFuncInstanceType::task pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::TaskType |
typedef InputIterator::value_type pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::ValueType |
pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::parallel_while | ( | InputIterator | first, |
InputIterator | last, | ||
const WhileExecutable & | func, | ||
TaskMgrType & | taskmgr | ||
) | [inline] |
Constructor:
[in] | first | The iterator pointing to the first element. |
[in] | last | The iterator pointing to the last element. |
[in] | func | The function to execute on each object. |
[in] | taskmgr | The task manager to use for this parallel_while. |
TODO: Make parallel_while work with global task manager.
void pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::operator() | ( | void | ) | [inline, virtual] |
Operator that does the parallelization.
Implements pfunc::virtual_functor.
InputIterator pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::first [private] |
const WhileExecutable& pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::func [private] |
InputIterator pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::last [private] |
TaskMgrType& pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::taskmgr [private] |