Using eo::mpi::DEFAULT_MASTER instead of raw constants.

This commit is contained in:
Benjamin Bouvier 2012-07-03 14:51:34 +02:00
commit 564cc3bccd
3 changed files with 6 additions and 5 deletions

View file

@ -34,6 +34,7 @@ namespace eo
const int Finish = 1;
}
const int DEFAULT_MASTER = 0;
template< typename JobData, typename Wrapped >
struct SharedDataFunction

View file

@ -111,9 +111,9 @@ int main(int argc, char** argv)
for( unsigned int i = 0; i < tests.size(); ++i )
{
// ParallelApply<int> job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 );
ParallelApplyStore< int > store( plusOneInstance, v, 0, 3 );
// Job< JobData<int> > job( *(tests[i].assign), 0, store );
ParallelApply< int > job( *(tests[i].assign), 0, store );
ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 3 );
// Job< JobData<int> > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store );
ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store );
if( job.isMaster() )
{

View file

@ -60,10 +60,10 @@ int main(int argc, char** argv)
StaticAssignmentAlgorithm assign( v.size() );
ParallelApplyStore< int > store( plusOneInstance, v, 0, 1 );
ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 1 );
store.wrapIsFinished( new ShowWrappedResult<int> );
ParallelApply<int> job( assign, 0, store );
ParallelApply<int> job( assign, eo::mpi::DEFAULT_MASTER, store );
// Equivalent to:
// Job< ParallelApplyData<int> > job( assign, 0, store );
job.run();