Lumiera
0.pre.03
»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 WiringDescriptor) 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 87 of file job-ticket.hpp.
Public Member Functions | |
template<class ALO > | |
JobTicket (ExitNode const &exitNode, ALO &allocator) | |
Job | createJobFor (Time nominalTime) |
Core operation: build a concrete render job based on this blueprint. More... | |
bool | empty () const |
Duration | getExpectedRuntime () |
Core operation: guess expected runtime for rendering. More... | |
auto | getPrerequisites () |
Core operation: iterate over the prerequisites, required to carry out a render operation based on this blueprint. More... | |
bool | isValid () const |
Static Public Attributes | |
static JobTicket | NOP {} |
special »do nothing« JobTicket marker | |
Classes | |
struct | Prerequisite |
struct | Provision |
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 (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 64 of file job-ticket.cpp.
|
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 213 of file job-ticket.hpp.
|
inline |
Core operation: iterate over the prerequisites, required to carry out a render operation based on this blueprint.
Definition at line 164 of file job-ticket.hpp.
References JobTicket::createJobFor(), JobTicket::getExpectedRuntime(), JobTicket::timeHash(), lib::transformIterator(), and JobTicket::verifyInstance().
Referenced by JobPlanning::buildDependencyPlanning().
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 79 of file job-ticket.cpp.
Referenced by JobPlanning::buildJob(), Dispatcher::createJobFor(), JobTicket::getPrerequisites(), and MockSupport_test::verify_MockJobTicket().
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 102 of file job-ticket.cpp.
Referenced by JobPlanning_test::calculateDeadline(), JobTicket::getPrerequisites(), and JobPlanning::JobPlanning().
|
private |
reference to all information required for actual Job creation
Definition at line 120 of file job-ticket.hpp.
Referenced by JobTicket::verifyInstance().