EvolvingObjects
eoParallelApply.h File Reference

Applies a functor with single parameter to elements of a table, in a parallel fashion. More...

#include "eoMpi.h"
#include <eoFunctor.h>
#include <vector>

Go to the source code of this file.

Classes

struct  eo::mpi::ParallelApplyAssignment
 Structure used to save assignment to a worker, i.e which slice of the table it has to process. More...
struct  eo::mpi::ParallelApplyData< EOT >
 Data useful for a parallel apply (map). More...
class  eo::mpi::SendTaskParallelApply< EOT >
 Send task functor implementation for the parallel apply (map) job. More...
class  eo::mpi::HandleResponseParallelApply< EOT >
 Handle response functor implementation for the parallel apply (map) job. More...
class  eo::mpi::ProcessTaskParallelApply< EOT >
 Process task functor implementation for the parallel apply (map) job. More...
class  eo::mpi::IsFinishedParallelApply< EOT >
 Is finished functor implementation for the parallel apply (map) job. More...
struct  eo::mpi::ParallelApplyStore< EOT >
 Store containing all the datas and the functors for the parallel apply (map) job. More...
class  eo::mpi::ParallelApply< EOT >
 Parallel apply job. More...

Namespaces

namespace  eo::mpi
 

MPI parallelization helpers for EO.



Detailed Description

Applies a functor with single parameter to elements of a table, in a parallel fashion.

This file contains all the required classes to do a parallel apply of a table, in a parallel fashion. This can be very useful when applying the function can be made without any dependances within the data. In EO, it occurs in particular during the evaluation: the number of individuals to evaluate can be really high, and the evaluation of one individual is independant from the evaluation of other individuals.

Elements in the table are directly replaced, as the table is given by reference. No new table is made during the process.

User can tune this job, indicating how many elements of the table should be sent and evaluated by a worker, at a time: this is called the "packet size", as individuals are groupped into a packet of individuals which are sent to the worker before evaluation. The problem of choosing the optimal packet size is beyond the purposes of this documentation and deserves a theoritical study.

This job is the parallel equivalent to the function apply<EOT>, defined in apply.h. It just applies the function to every element of a table. In Python or Javascript, it's the equivalent of the function Map.

Definition in file eoParallelApply.h.

 All Classes Namespaces Files Functions Variables Typedefs Friends