EvolvingObjects
|
Data useful for a parallel apply (map). More...
#include <eoParallelApply.h>
Public Member Functions | |
ParallelApplyData (eoUF< EOT &, void > &_proc, int _masterRank, int _packetSize, std::vector< EOT > *table=0) | |
Ctor for Parallel apply (map) data. | |
void | init (std::vector< EOT > &table) |
Reinitializes the data for a new table to evaluate. | |
std::vector< EOT > & | table () |
Public Attributes | |
std::vector< EOT > * | _table |
eoUF< EOT &, void > & | func |
int | index |
int | size |
std::map< int, ParallelApplyAssignment > | assignedTasks |
int | packetSize |
std::vector< EOT > | tempArray |
int | masterRank |
bmpi::communicator & | comm |
Data useful for a parallel apply (map).
A parallel apply needs at least the functor to apply to every element of the table, and the table itself, whereas it can be set later with the function init(). Master rank is also needed, to send it informations and receive informations from it, inside the functors (the job knows these values, but the functors don't). The size of a packet can be tuned here.
Internal attributes contain:
Definition at line 84 of file eoParallelApply.h.
eo::mpi::ParallelApplyData< EOT >::ParallelApplyData | ( | eoUF< EOT &, void > & | _proc, |
int | _masterRank, | ||
int | _packetSize, | ||
std::vector< EOT > * | table = 0 |
||
) | [inline] |
Ctor for Parallel apply (map) data.
_proc | The functor to apply on each element in the table |
_masterRank | The MPI rank of the master |
_packetSize | The number of elements on which the function will be applied by the worker, at a time. |
table | The table to apply. If this value is NULL, user will have to call init() before launching the job. |
Definition at line 95 of file eoParallelApply.h.