![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "steam/engine/job-ticket.hpp"
execution plan for pulling a specific exit node.
Usable as blue print for generating actual render jobs. Job tickets are created on demand, specialised for each segment of the low-level model, and for each individual feed (corresponding to a single model port). Once created, they are final for this segment, stored together with the other descriptor objects (ProcNode and Connectivity) and finally discarded in bulk, in case that segment of the low-level model becomes obsolete and is replaced by a newly built new version of this model segment.
Job tickets are created by a classical recursive descent call on the exit node, which figures out everything to be done for generating data from this node. To turn a JobTicket into an actual job, we need the additional information regarding the precise frame number (=nominal time) and a handle for the DataSink exposing buffers to output generated data. Thus effectively the JobTicket acts as higher order function: a function generating on invocation another, specific function (= the job).
Definition at line 78 of file job-ticket.hpp.
Classes | |
| struct | Prerequisite |
| struct | Provision |
Static Public Attributes | |
| static JobTicket | NOP {} |
| special »do nothing« JobTicket marker | |
Public Member Functions | |
| template<class ALO > | |
| JobTicket (ExitNode const &exitNode, ALO &allocator) | |
| bool | empty () const |
| bool | isValid () const |
| auto | getPrerequisites () |
| Core operation: iterate over the prerequisites, required to carry out a render operation based on this blueprint. | |
| Job | createJobFor (Time nominalTime) |
| Core operation: build a concrete render job based on this blueprint. | |
| Duration | getExpectedRuntime () |
| Core operation: guess expected runtime for rendering. | |
Protected Member Functions | |
| bool | verifyInstance (JobFunctor &, InvocationInstanceID const &, Time) const |
| Helper for tests: verify the given invocation parameters match this JobTicket. | |
Static Protected Member Functions | |
| static InvocationInstanceID | timeHash (Time, InvocationInstanceID const &) |
| Tag the precomputed invocation ID with the nominal frame time. | |
Private Types | |
| using | Prerequisites = LinkedElements< Prerequisite > |
Private Member Functions | |
| JobTicket () | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Static Private Member Functions | |
| template<class ALO > | |
| static Provision | buildProvisionSpec (ExitNode const &, ALO &) |
Private Attributes | |
| Provision | provision_ |
|
private |
as NIL marker, a JobTicket can be empty
Definition at line 56 of file job-ticket.cpp.
Definition at line 123 of file job-ticket.hpp.
|
private |
Definition at line 92 of file job-ticket.hpp.
|
inlinestaticprivate |
prepare and assemble the working data structure to build a JobTicket.
| ALO | type of an allocator front-end for generating prerequisite JobTicket(s) |
| exitNode | a (possibly recursive) tree of ExitNode, detailing points where to pull and process data from the render nodes network; these can refer to nested ExitNodes(s), which need to be processed beforehand, as prerequisite for invoking the given (dependent) ExitNode. |
Definition at line 204 of file job-ticket.hpp.
References ExitNode::getInvocationFunctor(), ExitNode::getPipelineIdentity(), and ExitNode::getPrerequisites().
Here is the call graph for this function:
|
inline |
Definition at line 131 of file job-ticket.hpp.
References JobTicket::Provision::exitNode, and JobTicket::provision_.
Referenced by DispatcherInterface_test::accessJobTicket(), JobTicket::createJobFor(), JobTicket::getExpectedRuntime(), JobTicket::getPrerequisites(), JobTicket::isValid(), MockSupport_test::verify_MockJobTicket(), and MockSupport_test::verify_MockSegmentation().
Here is the caller graph for this function:
|
inline |
Definition at line 137 of file job-ticket.hpp.
References util::and_all(), JobTicket::empty(), JobTicket::Provision::exitNode, ExitNode::isValid(), lumiera_invokey_eq(), JobTicket::Provision::prerequisites, JobTicket::provision_, and util::unConst().
Referenced by JobTicket::createJobFor(), JobTicket::getExpectedRuntime(), and MockJobTicket::verify_associated().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Core operation: iterate over the prerequisites, required to carry out a render operation based on this blueprint.
Definition at line 155 of file job-ticket.hpp.
References LinkedElements< N, ALO >::begin(), JobTicket::empty(), JobTicket::Provision::prerequisites, JobTicket::provision_, and lib::transformIterator().
Referenced by JobPlanning::buildDependencyPlanning(), JobPlanningPipeline_test::demonstrateScaffolding(), FixtureSegment_test::retrieve_JobTicket(), JobPlanning_test::setupDependentJob(), and MockSupport_test::verify_MockPrerequisites().
Here is the call graph for this function:
Here is the caller graph for this function:Core operation: build a concrete render job based on this blueprint.
Generate a render job to invoke the render network configuration as defined and backing this JobTicket.
The generated job descriptor record will include a specific InvocationInstanceID, which factors in the nominal frame time, but also the specific backing render configuration. The actual implementation of the job functionality will be delegated to the JobClosure, which was set up for this Segment and JobTiket after the last Builder run created this part of the render network.
Definition at line 71 of file job-ticket.cpp.
References JobTicket::empty(), JobTicket::Provision::invocationSeed, JobTicket::isValid(), JobTicket::Provision::jobFunctor, JobTicket::provision_, and JobTicket::timeHash().
Referenced by DispatcherInterface_test::accessJobTicket(), JobPlanningPipeline_test::accessTopLevelJobTicket(), JobPlanning::buildJob(), Dispatcher::createJobFor(), JobPlanningPipeline_test::demonstrateScaffolding(), MockSupport_test::simpleUsage(), MockSupport_test::verify_MockJobTicket(), MockSupport_test::verify_MockPrerequisites(), and MockSupport_test::verify_MockSegmentation().
Here is the call graph for this function:
Here is the caller graph for this function:| Duration getExpectedRuntime | ( | ) |
Core operation: guess expected runtime for rendering.
Use observed runtime values of past job invocations to guess a sensible bound for the calculation time to expect for next invocation.
Definition at line 94 of file job-ticket.cpp.
References JobTicket::empty(), JobTicket::Provision::exitNode, ExitNode::getUpperBoundRuntime(), JobTicket::isValid(), and JobTicket::provision_.
Referenced by JobPlanning_test::calculateDeadline(), and JobPlanning_test::setupDependentJob().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Tag the precomputed invocation ID with the nominal frame time.
Definition at line 110 of file job-ticket.cpp.
References lib::hash::combine().
Referenced by JobTicket::createJobFor(), and JobTicket::verifyInstance().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Helper for tests: verify the given invocation parameters match this JobTicket.
Definition at line 132 of file job-ticket.cpp.
References JobTicket::Provision::invocationSeed, util::isSameObject(), JobTicket::Provision::jobFunctor, JobTicket::provision_, and JobTicket::timeHash().
Referenced by MockJobTicket::verify_associated().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
reference to all information required for actual Job creation
Definition at line 111 of file job-ticket.hpp.
Referenced by JobTicket::createJobFor(), JobTicket::empty(), JobTicket::getExpectedRuntime(), JobTicket::getPrerequisites(), JobTicket::isValid(), and JobTicket::verifyInstance().
|
static |
special »do nothing« JobTicket marker
Definition at line 127 of file job-ticket.hpp.
Referenced by Segment::generateTickets_onDemand(), MockSupport_test::verify_MockJobTicket(), and MockSupport_test::verify_MockSegmentation().
Inheritance diagram for JobTicket:
Collaboration diagram for JobTicket: