Using eo::mpi::DEFAULT_MASTER instead of raw constants.
This commit is contained in:
parent
63f12c4e1c
commit
564cc3bccd
3 changed files with 6 additions and 5 deletions
|
|
@ -34,6 +34,7 @@ namespace eo
|
|||
const int Finish = 1;
|
||||
}
|
||||
|
||||
const int DEFAULT_MASTER = 0;
|
||||
|
||||
template< typename JobData, typename Wrapped >
|
||||
struct SharedDataFunction
|
||||
|
|
|
|||
|
|
@ -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() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue