Lumiera  0.pre.03
»edit your freedom«
Dispatcher Class Referenceabstract

#include "steam/engine/dispatcher.hpp"

Description

Internal abstraction: a service within the engine for translating a logical calculation stream (corresponding to a PlayProcess) into a sequence of individual RenderJob entries for calculations and data access.

The actual implementation of this service is tied to the low-level-model, i.e. the render nodes network. The Dispatcher service is used to implement the CalcStreams during playback and rendering; there will be a continuous, chunk-wise proceeding evaluation and planning of new jobs, which can then be handed over to the Scheduler for time-bound activation.

usage considerations

the asynchronous and ongoing nature of the render process mandates to avoid a central instance for operating this planning process. Instead, together with each chunk of planned jobs we generate a continuation job, which – on activation – will pick up the planning of the next chunk. The Dispatcher interface was shaped especially to support this process, with a local PlanningPipeline for use within the RenderDrive incorporated into each CalcStream. All the complexities of actually planning the jobs are hidden within this pipeline, which, for the purpose of dispatching a series of jobs just looks like a sequence of job descriptors

Todo:
6/23 API is remoulded from ground up (»Playback Vertical Slice« integration effort)

Definition at line 90 of file dispatcher.hpp.

Public Member Functions

virtual ~Dispatcher ()
 this is an interface
 
Job createJobFor (size_t portIDX, TimeValue nominalTime)
 Convenience shortcut for tests: JobTicket ⟼ Job.
 
PipelineBuilder< PipeFrameTickforCalcStream (Timings timings)
 Start a builder sequence to assemble a job-planning pipeline, backed by this Dispatcher. More...
 
virtual JobTicketgetJobTicketFor (size_t portIDX, TimeValue nominalTime)=0
 Core Dispatcher operation: locate the appropriate Segment and retrieve/derive a »blueprint« for render job generation. More...
 
virtual size_t resolveModelPort (ModelPort)=0
 translate a generic ModelPort spec into the specific index number applicable at the Timeline referred-to by this Dispatcher More...
 

Classes

struct  PipeFrameTick
 Job-planning Step-1: establish a sequence of frame start times. More...
 
struct  PipelineBuilder
 A Builder wrapper, allowing to build a Job-planning pipeline step by step, while supplying contextual information from the CalcStream. More...
 
struct  PlanningPipeline
 A complete job-planning pipeline: this »Lumiera Forward Iterator« drives the actual job-planning process on-demand. More...
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ forCalcStream()

Dispatcher::PipelineBuilder< Dispatcher::PipeFrameTick > forCalcStream ( Timings  timings)
inline

Start a builder sequence to assemble a job-planning pipeline, backed by this Dispatcher.

Parameters
timingsthe frame-grid and further specs to use for a specific CalcStream
Remarks
the given #PipelineBuilder object shall be used to supply the further parameters, thereby qualifying the actual planning steps necessary to arrive at a sequence of Jobs; these can be retrieved from the resulting iterator, ready for dispatch.

Definition at line 353 of file dispatcher.hpp.

Referenced by JobPlanningPipeline_test::accessTopLevelJobTicket().

+ Here is the caller graph for this function:

◆ resolveModelPort()

virtual size_t resolveModelPort ( ModelPort  )
pure virtual

translate a generic ModelPort spec into the specific index number applicable at the Timeline referred-to by this Dispatcher

Exceptions
error::Logicif the given ModelPort is not associated
Remarks
assuming that any Play-Process about to be started is always built on top of an established OutputConnection, and thus relies on a model link predetermined by the Builder. In other words, when a Timeline can be performed to this output, then a suitable ModelPort was derived on the Builder run triggered by preparing this specific output possibility. Thus it's an application logic error if attempting to dispatch on a unknown ModelPort.

Implemented in MockDispatcher, and DispatchTable.

◆ getJobTicketFor()

virtual JobTicket& getJobTicketFor ( size_t  portIDX,
TimeValue  nominalTime 
)
pure virtual

Core Dispatcher operation: locate the appropriate Segment and retrieve/derive a »blueprint« for render job generation.

Parameters
portIDXindex-number for a ModelPort as resolved
nominalTimetime of the frame to calculate, relative to Timeline origin

Implemented in MockDispatcher, and DispatchTable.

Referenced by Dispatcher::createJobFor(), and Dispatcher::PipelineBuilder< SRC >::pullFrom().

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

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