PFUNC  1.0
Classes | Public Types | Public Member Functions | Private Attributes
pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable > Struct Template Reference

#include <pfunc/parallel_while.hpp>

Inheritance diagram for pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >:
pfunc::virtual_functor

List of all members.

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
TaskMgrTypetaskmgr

Detailed Description

template<typename PFuncInstanceType, typename InputIterator, typename WhileExecutable>
struct pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >

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.


Member Typedef Documentation

template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
typedef PFuncInstanceType::taskmgr pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::TaskMgrType
template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
typedef PFuncInstanceType::task pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::TaskType
template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
typedef InputIterator::value_type pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::ValueType

Constructor & Destructor Documentation

template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::parallel_while ( InputIterator  first,
InputIterator  last,
const WhileExecutable &  func,
TaskMgrType taskmgr 
) [inline]

Constructor:

Parameters:
[in]firstThe iterator pointing to the first element.
[in]lastThe iterator pointing to the last element.
[in]funcThe function to execute on each object.
[in]taskmgrThe task manager to use for this parallel_while.

TODO: Make parallel_while work with global task manager.


Member Function Documentation

template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
void pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::operator() ( void  ) [inline, virtual]

Operator that does the parallelization.

Implements pfunc::virtual_functor.


Member Data Documentation

template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
InputIterator pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::first [private]
template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
const WhileExecutable& pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::func [private]
template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
InputIterator pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::last [private]
template<typename PFuncInstanceType , typename InputIterator , typename WhileExecutable >
TaskMgrType& pfunc::parallel_while< PFuncInstanceType, InputIterator, WhileExecutable >::taskmgr [private]

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