From 414e011296c1c73d9d40ed3a4a3a64067a7a3e73 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 10:42:35 +0200 Subject: [PATCH] Using ParallelApplyJob instead of MultiParallelApplyJob in eoPopEvalFunc. --- eo/src/apply.h | 2 +- eo/src/eoPopEvalFunc.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 7845c14e..b13c434e 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -91,7 +91,7 @@ void parallelApply( std::vector& _pop, eo::mpi::AssignmentAlgorithm& _algo, int _masterRank, - eo::mpi::ParallelEvalStore & _store ) + eo::mpi::ParallelApplyStore & _store ) { _store.data( _pop ); _algo.reinit( _pop.size() ); diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index d37eebaf..c811e3a5 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -96,14 +96,15 @@ class eoParallelPopLoopEval : public eoPopEvalFunc masterRank( _masterRank ), needToDeleteStore( true ) { - store = new eo::mpi::ParallelEvalStore( _eval, _masterRank, _packetSize ); + // FIXME memory leak because of new. + store = new eo::mpi::ParallelApplyStore( _eval, _masterRank, _packetSize ); } eoParallelPopLoopEval( // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, int _masterRank, - eo::mpi::ParallelEvalStore* _store + eo::mpi::ParallelApplyStore* _store ) : assignAlgo( _assignAlgo ), masterRank( _masterRank ), @@ -138,7 +139,7 @@ class eoParallelPopLoopEval : public eoPopEvalFunc eo::mpi::AssignmentAlgorithm & assignAlgo; int masterRank; - eo::mpi::ParallelEvalStore* store; + eo::mpi::ParallelApplyStore* store; bool needToDeleteStore; }; #endif