Chain-Load: fix planning and wait logic
two rather obvious bugfixes (well, after watching the Scheduler in action...) - the first planning-chunk needs an offset - the future to block on must be setup before any dispatch happens
This commit is contained in:
parent
72f11549e6
commit
21fbe09ee0
1 changed files with 3 additions and 3 deletions
|
|
@ -1290,14 +1290,15 @@ cout <<"--> reschedule to "<<nextChunkLevel<<endl;
|
|||
std::future<void>
|
||||
performRun()
|
||||
{
|
||||
auto finished = attachNewCompletionSignal();
|
||||
size_t numNodes = chainLoad_.size();
|
||||
cout <<"+++ "<<markThread()<<": seed(num:"<<numNodes<<")"<<endl;
|
||||
schedule_.allocate (numNodes);
|
||||
startTime_ = anchorStartTime();
|
||||
scheduler_.seedCalcStream (planningJob(0)
|
||||
scheduler_.seedCalcStream (planningJob(calcNextLevel(0)-1)
|
||||
,manID_
|
||||
,calcLoadHint());
|
||||
return attachNewCompletionSignal();
|
||||
return finished;
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
@ -1326,7 +1327,6 @@ cout <<"+++ "<<markThread()<<": seed(num:"<<numNodes<<")"<<endl;
|
|||
std::future<void>
|
||||
attachNewCompletionSignal()
|
||||
{
|
||||
signalDone_.set_exception (std::make_exception_ptr(std::future_error (std::future_errc::broken_promise)));
|
||||
std::promise<void> notYetTriggered;
|
||||
signalDone_.swap (notYetTriggered);
|
||||
return signalDone_.get_future();
|
||||
|
|
|
|||
Loading…
Reference in a new issue