Lumiera  0.pre.03
»edit your freedom«
JobPlanning Class Reference

#include "steam/engine/job-planning.hpp"

Description

View on the execution planning for a single calculation step.

When this view-frontend becomes accessible, behind the scenes all the necessary information has been pulled and collected from the low-level model and the relevant rendering/playback configuration. Typically, clients will materialise this planning into a Job (descriptor) ready to be entered into the scheduler.

JobPlanning is indeed a view; the represented planning information is not persisted (other then in the job to be created). The implementation draws on a recursive exploration of the corresponding JobTicket, which acts as a general blueprint for creating jobs within this segment of the timeline.

Definition at line 108 of file job-planning.hpp.

Public Member Functions

 JobPlanning (JobTicket &ticket, TimeVar const &nominalTime, FrameCnt const &frameNr)
 
auto buildDependencyPlanning ()
 Build a sequence of dependent JobPlanning scopes for all prerequisites of this current JobPlanning, and internally linked back to *this More...
 
Job buildJob ()
 Connect and complete the planning information assembled thus far to create a frame job descriptor, ready to be scheduled.
 
Time determineDeadline (Timings const &timings)
 Calculate the latest time point when to start the job, so it can still possibly reach the timing goal. More...
 
Duration determineLeeway (Timings const &)
 Determine a timing buffer for flexibility to allow starting the job already before its deadline; especially for real-time playback this leeway is rather limited, and constrained by the earliest time the target buffer is already allotted and ready to receive data. More...
 
bool isTopLevel () const
 
JobTicketticket ()
 

Private Member Functions

 JobPlanning (JobPlanning &parent, JobTicket &prerequisite)
 
Time doCalcDeadline (Timings const &timings)
 
- Private Member Functions inherited from MoveOnly
 MoveOnly (MoveOnly &&)=default
 
 MoveOnly (MoveOnly const &)=delete
 
MoveOnlyoperator= (MoveOnly &&)=delete
 
MoveOnlyoperator= (MoveOnly const &)=delete
 

Private Attributes

JobPlanningdependentPlan_ {nullptr}
 link to a dependent JobPlanning, for planning of prerequisites
 
FrameCnt const & frameNr_
 
JobTicketjobTicket_
 
TimeVar const & nominalTime_
 

Constructor & Destructor Documentation

◆ JobPlanning()

JobPlanning ( JobPlanning parent,
JobTicket prerequisite 
)
inlineprivate

construct a chained prerequisite JobPlanning, attached to the dependent »parent« JobPlanning, using the same frame data, but chaining up the deadlines, so that a Job created from this JobPlanning needs to be completed before the »parent« Job (which uses the generated data) can start

See also
buildDependencyPlanning()
JobPlanning_test::setupDependentJob()

Definition at line 208 of file job-planning.hpp.

References JobPlanning::dependentPlan_, JobPlanning::determineDeadline(), Timings::engineLatency, JobTicket::getExpectedRuntime(), and Timings::getTimeDue().

+ Here is the call graph for this function:

Member Function Documentation

◆ determineDeadline()

Time determineDeadline ( Timings const &  timings)
inline

Calculate the latest time point when to start the job, so it can still possibly reach the timing goal.

Returns
time point in wall-clock-time, or Time::ANYTIME if unconstrained

Definition at line 147 of file job-planning.hpp.

References Time::ANYTIME.

Referenced by JobPlanning::JobPlanning().

+ Here is the caller graph for this function:

◆ determineLeeway()

Duration determineLeeway ( Timings const &  )
inline

Determine a timing buffer for flexibility to allow starting the job already before its deadline; especially for real-time playback this leeway is rather limited, and constrained by the earliest time the target buffer is already allotted and ready to receive data.

Returns
tolerance duration
  • Duration::NIL if deadline has to be matched with maximum precision
  • Duration::MAX for unlimited leeway to start anytime before the deadline

Definition at line 171 of file job-planning.hpp.

◆ buildDependencyPlanning()

auto buildDependencyPlanning ( )
inline

Build a sequence of dependent JobPlanning scopes for all prerequisites of this current JobPlanning, and internally linked back to *this

Returns
an iterator which explores the prerequisites of the JobTicket.
Remarks
typical example would be to load data from file, or to require the results from some other extended media calculation.
See also
Dispatcher::PipelineBuilder::expandPrerequisites()

Definition at line 186 of file job-planning.hpp.

References JobTicket::getPrerequisites(), and lib::transformIterator().

Referenced by Dispatcher::PipelineBuilder< SRC >::expandPrerequisites().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for JobPlanning:
+ Collaboration diagram for JobPlanning:

The documentation for this class was generated from the following file: