considering the relation of Job and JobClosure
This commit is contained in:
parent
bb43c03ef9
commit
0320bc4b2c
5 changed files with 26 additions and 12 deletions
|
|
@ -82,6 +82,7 @@ namespace engine {
|
||||||
Duration remainingRealTime()
|
Duration remainingRealTime()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED ("deterine the real wall clock time amount left until deadline");
|
UNIMPLEMENTED ("deterine the real wall clock time amount left until deadline");
|
||||||
|
////////////////////////TODO the coordinates can't answer that question! Who else can?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,13 @@ namespace engine {
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
JobKind
|
||||||
|
getJobKind() const
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED ("representation of JobTicket and JobClosure");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
verify (Time nominalJobTime) const
|
verify (Time nominalJobTime) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,19 @@ namespace engine {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** find out about the classification of this job.
|
||||||
|
* Typically its not necessary for the normal scheduling of
|
||||||
|
* Jobs to know anything beyond the contents of the #lumiera_jobDescriptor,
|
||||||
|
* but the JobClosure is able to answer any additional introspection queries
|
||||||
|
*/
|
||||||
|
JobKind
|
||||||
|
Job::getKind() const
|
||||||
|
{
|
||||||
|
REQUIRE (isValid());
|
||||||
|
myClosure(this).getJobKind();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Render Job self verification.
|
/** Render Job self verification.
|
||||||
* performs a parameter consistency check
|
* performs a parameter consistency check
|
||||||
* including a call-back to the defining JobTicket
|
* including a call-back to the defining JobTicket
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,8 @@ typedef struct lumiera_jobClosure* LumieraJobClosure;
|
||||||
*/
|
*/
|
||||||
struct lumiera_jobParameter_struct
|
struct lumiera_jobParameter_struct
|
||||||
{
|
{
|
||||||
InvocationInstanceID invoKey;
|
|
||||||
gavl_time_t nominalTime;
|
gavl_time_t nominalTime;
|
||||||
|
InvocationInstanceID invoKey;
|
||||||
//////////////////////////////////////////////////////////////TODO: place an additional parameter value here, or make the instanceID globally unique?
|
//////////////////////////////////////////////////////////////TODO: place an additional parameter value here, or make the instanceID globally unique?
|
||||||
};
|
};
|
||||||
typedef struct lumiera_jobParameter_struct lumiera_jobParameter;
|
typedef struct lumiera_jobParameter_struct lumiera_jobParameter;
|
||||||
|
|
@ -78,8 +78,8 @@ typedef lumiera_jobParameter* LumieraJobParameter;
|
||||||
/** complete definition of an individual job */
|
/** complete definition of an individual job */
|
||||||
struct lumiera_jobDefinition_struct
|
struct lumiera_jobDefinition_struct
|
||||||
{
|
{
|
||||||
LumieraJobClosure jobClosure;
|
LumieraJobClosure jobClosure; ///< type and context of the job, including the actual functor
|
||||||
lumiera_jobParameter parameter;
|
lumiera_jobParameter parameter; ///< the "moving parts" for this individual invocation (Job)
|
||||||
};
|
};
|
||||||
typedef struct lumiera_jobDefinition_struct lumiera_jobDefinition;
|
typedef struct lumiera_jobDefinition_struct lumiera_jobDefinition;
|
||||||
|
|
||||||
|
|
@ -185,13 +185,6 @@ using lib::time::Time;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline JobKind
|
|
||||||
Job::getKind() const
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED ("need a better C-representation of the job");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}} // namespace proc::engine
|
}} // namespace proc::engine
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ namespace test {
|
||||||
.relativeFrameLocation (refPoint, 15);
|
.relativeFrameLocation (refPoint, 15);
|
||||||
CHECK (coordinates.absoluteNominalTime == Time(0,1));
|
CHECK (coordinates.absoluteNominalTime == Time(0,1));
|
||||||
CHECK (coordinates.absoluteFrameNumber == 25);
|
CHECK (coordinates.absoluteFrameNumber == 25);
|
||||||
CHECK (coordinates.remainingRealTime() < Time(FSecs(25,25)));
|
CHECK (coordinates.remainingRealTime() < Time(FSecs(25,25))); ////////////////////////TODO the coordinates can't answer that question! Who else can?
|
||||||
CHECK (coordinates.remainingRealTime() >= Time(FSecs(24,25)));
|
CHECK (coordinates.remainingRealTime() >= Time(FSecs(24,25)));
|
||||||
CHECK (coordinates.modelPort == modelPort);
|
CHECK (coordinates.modelPort == modelPort);
|
||||||
CHECK (coordinates.channelNr == channel);
|
CHECK (coordinates.channelNr == channel);
|
||||||
|
|
@ -240,7 +240,7 @@ namespace test {
|
||||||
uint nrJobs = timings.getPlanningChunkSize();
|
uint nrJobs = timings.getPlanningChunkSize();
|
||||||
Duration frameDuration (1, FrameRate::PAL);
|
Duration frameDuration (1, FrameRate::PAL);
|
||||||
|
|
||||||
// the Continuation will be scheduled sufficiently ahead of the planning end
|
// the Continuation will be scheduled sufficiently ahead of the currently planned chunk's end
|
||||||
CHECK (continuation.getNominalTime() < Time(refPoint) + (nrJobs-1) * frameDuration);
|
CHECK (continuation.getNominalTime() < Time(refPoint) + (nrJobs-1) * frameDuration);
|
||||||
|
|
||||||
// now invoke the rest of this test, which has been embedded into the continuation job.
|
// now invoke the rest of this test, which has been embedded into the continuation job.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue