Using again parallel apply into eoPopEvalFunc::eoParallelPopEvalFunc.
This commit is contained in:
parent
1d3790a0e4
commit
24c29db6f3
7 changed files with 125 additions and 35 deletions
|
|
@ -7,6 +7,73 @@ namespace eo
|
|||
{
|
||||
namespace mpi
|
||||
{
|
||||
struct DummySendTaskFunction : public SendTaskFunction<void>
|
||||
{
|
||||
void operator()( int _ )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct DummyHandleResponseFunction : public HandleResponseFunction<void>
|
||||
{
|
||||
void operator()( int _ )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct DummyProcessTaskFunction : public ProcessTaskFunction<void>
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
// nothing!
|
||||
}
|
||||
};
|
||||
|
||||
struct DummyIsFinishedFunction : public IsFinishedFunction<void>
|
||||
{
|
||||
bool operator()()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct DummyJobStore : public JobStore<void>
|
||||
{
|
||||
using JobStore<void>::_stf;
|
||||
using JobStore<void>::_hrf;
|
||||
using JobStore<void>::_ptf;
|
||||
using JobStore<void>::_iff;
|
||||
|
||||
DummyJobStore()
|
||||
{
|
||||
_stf = new DummySendTaskFunction;
|
||||
_hrf = new DummyHandleResponseFunction;
|
||||
_ptf = new DummyProcessTaskFunction;
|
||||
_iff = new DummyIsFinishedFunction;
|
||||
}
|
||||
|
||||
~DummyJobStore()
|
||||
{
|
||||
delete _stf;
|
||||
delete _hrf;
|
||||
delete _ptf;
|
||||
delete _iff;
|
||||
}
|
||||
|
||||
void* data() { return 0; }
|
||||
};
|
||||
|
||||
struct EmptyJob : public Job<void>
|
||||
{
|
||||
EmptyJob( AssignmentAlgorithm& algo, int masterRank ) :
|
||||
Job<void>( algo, masterRank, *(new DummyJobStore) )
|
||||
// FIXME memory leak => will be corrected by using const correctness
|
||||
{
|
||||
// empty
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
class TerminateJob : public Job
|
||||
{
|
||||
public:
|
||||
|
|
@ -36,6 +103,7 @@ namespace eo
|
|||
return true;
|
||||
}
|
||||
};
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue