diff --git a/src/proc/engine/job-planning.hpp b/src/proc/engine/job-planning.hpp index 859258aab..abe77c9d8 100644 --- a/src/proc/engine/job-planning.hpp +++ b/src/proc/engine/job-planning.hpp @@ -114,10 +114,16 @@ namespace engine { /** integrate another chain of prerequisites into the current evaluation line. * Further evaluation will start to visit prerequisites from the new starting point, - * and return to the current evaluation chain later on exhaustion of the side chain. */ + * and return to the current evaluation chain later on exhaustion of the side chain. + * Especially in case the current evaluation is empty or already exhausted, the + * new starting point effectively replaces the current evaluation point */ friend void integrate (JobPlanning const& newStartingPoint, JobPlanning& existingPlan) { + if (isnil (existingPlan.plannedOperations_)) + { // current evaluation is exhausted: switch to new starting point + existingPlan.point_to_calculate_ = newStartingPoint.point_to_calculate_; + } existingPlan.plannedOperations_.push (newStartingPoint.plannedOperations_); } diff --git a/src/proc/engine/job-ticket.hpp b/src/proc/engine/job-ticket.hpp index a6e9e6e52..b38df691c 100644 --- a/src/proc/engine/job-ticket.hpp +++ b/src/proc/engine/job-ticket.hpp @@ -130,6 +130,7 @@ using util::isnil; } + ExplorationState startExploration() const; ExplorationState discoverPrerequisites (uint channelNr) const; Job createJobFor (FrameCoord coordinates); @@ -234,6 +235,17 @@ using util::isnil; + inline JobTicket::ExplorationState + JobTicket::startExploration() const + { + UNIMPLEMENTED ("somehow build a self-referential pseudo-prerequisite, and seed an ExplorationState with that"); + /////////////////////TODO problem is: we need an JobTicket::Prerequisite instance, where the descriptor points to "self" (this JobTicket) + /////////////////////TODO : but this instance needs to reside somewhere at a safe location, since we want to embed an LinkedElements-iterator + /////////////////////TODO : into the ExplorationState. And obviously we do not want that instance in each JobTicket, only in the top level ones + } + + + inline JobTicket::ExplorationState JobTicket::discoverPrerequisites (uint channelNr) const {