Updating multiple roles test.
This commit is contained in:
parent
564cc3bccd
commit
1d3790a0e4
1 changed files with 5 additions and 2 deletions
|
|
@ -31,7 +31,9 @@ void subtask( vector<int>& v, int rank )
|
||||||
workers.push_back( rank + 4 );
|
workers.push_back( rank + 4 );
|
||||||
DynamicAssignmentAlgorithm algo( workers );
|
DynamicAssignmentAlgorithm algo( workers );
|
||||||
SubWork sw;
|
SubWork sw;
|
||||||
ParallelApply<int> job( sw, v, algo, rank );
|
|
||||||
|
ParallelApplyStore<int> store( sw, v, rank );
|
||||||
|
ParallelApply<int> job( algo, rank, store );
|
||||||
job.run();
|
job.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +74,8 @@ int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
Work w;
|
Work w;
|
||||||
DynamicAssignmentAlgorithm algo( 1, 2 );
|
DynamicAssignmentAlgorithm algo( 1, 2 );
|
||||||
ParallelApply< vector<int> > job( w, metaV, algo, 0 );
|
ParallelApplyStore< vector<int> > store( w, metaV, 0 );
|
||||||
|
ParallelApply< vector<int> > job( algo, 0, store );
|
||||||
job.run();
|
job.run();
|
||||||
if( job.isMaster() )
|
if( job.isMaster() )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Reference in a new issue