diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index ce4dc5cf..a728baa8 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -85,31 +85,28 @@ class eoParallelPopLoopEval : public eoPopEvalFunc public: /** Ctor: set value of embedded eoEvalFunc */ eoParallelPopLoopEval( - eoEvalFunc & _eval, + // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, int _masterRank, + // Default parameters for store + eoEvalFunc & _eval, int _packetSize = 1 ) : - eval(_eval), assignAlgo( _assignAlgo ), masterRank( _masterRank ), - packetSize( _packetSize ), needToDeleteStore( true ) { store = new eo::mpi::ParallelEvalStore( _eval, _masterRank, _packetSize ); } eoParallelPopLoopEval( - eoEvalFunc & _eval, + // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, - eo::mpi::ParallelEvalStore* _store, int _masterRank, - int _packetSize = 1 + eo::mpi::ParallelEvalStore* _store ) : - eval(_eval), assignAlgo( _assignAlgo ), masterRank( _masterRank ), - packetSize( _packetSize ), needToDeleteStore( false ), store( _store ) { @@ -131,20 +128,17 @@ class eoParallelPopLoopEval : public eoPopEvalFunc } /** Do the job: simple loop over the offspring */ - void operator()(eoPop & _parents, eoPop & _offspring) + void operator()( eoPop & _parents, eoPop & _offspring ) { (void)_parents; parallelApply(_offspring, assignAlgo, masterRank, *store); } private: - eoEvalFunc & eval; - eo::mpi::AssignmentAlgorithm & assignAlgo; - eo::mpi::ParallelEvalStore* store; int masterRank; - int packetSize; + eo::mpi::ParallelEvalStore* store; bool needToDeleteStore; }; #endif