Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 99 of file job-planning.hpp.

Public Member Functions

 JobPlanning (JobTicket &ticket, TimeVar const &nominalTime, FrameCnt const &frameNr)
 
JobTicketticket ()
 
bool isTopLevel () const
 
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.
 
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.
 
auto buildDependencyPlanning ()
 Build a sequence of dependent JobPlanning scopes for all prerequisites of this current JobPlanning, and internally linked back to *this
 

Private Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

◆ JobPlanning() [1/2]

JobPlanning ( JobTicket ticket,
TimeVar const &  nominalTime,
FrameCnt const &  frameNr 
)
inline

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

◆ JobPlanning() [2/2]

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 199 of file job-planning.hpp.

Member Function Documentation

◆ ticket()

JobTicket & ticket ( )
inline

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

References JobPlanning::jobTicket_.

◆ isTopLevel()

bool isTopLevel ( ) const
inline

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

References JobPlanning::dependentPlan_.

◆ buildJob()

Job buildJob ( )
inline

Connect and complete the planning information assembled thus far to create a frame job descriptor, ready to be scheduled.

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

References JobTicket::createJobFor(), JobPlanning::jobTicket_, and JobPlanning::nominalTime_.

+ Here is the call graph for this function:

◆ 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 138 of file job-planning.hpp.

References Time::ANYTIME, steam::play::ASAP, JobPlanning::doCalcDeadline(), steam::play::NICE, Timings::playbackUrgency, and steam::play::TIMEBOUND.

+ Here is the call 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 162 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 177 of file job-planning.hpp.

References JobTicket::getPrerequisites(), JobPlanning::jobTicket_, 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:

◆ doCalcDeadline()

Time doCalcDeadline ( Timings const &  timings)
inlineprivate

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

References Timings::engineLatency, Timings::getTimeDue(), and Timings::outputLatency.

Referenced by JobPlanning::determineDeadline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ jobTicket_

JobTicket& jobTicket_
private

◆ nominalTime_

TimeVar const& nominalTime_
private

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

Referenced by JobPlanning::buildJob().

◆ frameNr_

FrameCnt const& frameNr_
private

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

◆ dependentPlan_

JobPlanning* dependentPlan_ {nullptr}
private

link to a dependent JobPlanning, for planning of prerequisites

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

Referenced by JobPlanning::isTopLevel().

+ Inheritance diagram for JobPlanning:
+ Collaboration diagram for JobPlanning:

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