considering the relation of Job and JobClosure

This commit is contained in:
Fischlurch 2012-04-27 18:59:08 +02:00
parent bb43c03ef9
commit 0320bc4b2c
5 changed files with 26 additions and 12 deletions

View file

@ -82,6 +82,7 @@ namespace engine {
Duration remainingRealTime()
{
UNIMPLEMENTED ("deterine the real wall clock time amount left until deadline");
////////////////////////TODO the coordinates can't answer that question! Who else can?
}

View file

@ -57,6 +57,13 @@ namespace engine {
{
public:
JobKind
getJobKind() const
{
UNIMPLEMENTED ("representation of JobTicket and JobClosure");
}
bool
verify (Time nominalJobTime) const
{

View file

@ -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.
* performs a parameter consistency check
* including a call-back to the defining JobTicket

View file

@ -67,8 +67,8 @@ typedef struct lumiera_jobClosure* LumieraJobClosure;
*/
struct lumiera_jobParameter_struct
{
InvocationInstanceID invoKey;
gavl_time_t nominalTime;
InvocationInstanceID invoKey;
//////////////////////////////////////////////////////////////TODO: place an additional parameter value here, or make the instanceID globally unique?
};
typedef struct lumiera_jobParameter_struct lumiera_jobParameter;
@ -78,8 +78,8 @@ typedef lumiera_jobParameter* LumieraJobParameter;
/** complete definition of an individual job */
struct lumiera_jobDefinition_struct
{
LumieraJobClosure jobClosure;
lumiera_jobParameter parameter;
LumieraJobClosure jobClosure; ///< type and context of the job, including the actual functor
lumiera_jobParameter parameter; ///< the "moving parts" for this individual invocation (Job)
};
typedef struct lumiera_jobDefinition_struct lumiera_jobDefinition;
@ -184,13 +184,6 @@ using lib::time::Time;
bool isValid() const;
};
inline JobKind
Job::getKind() const
{
UNIMPLEMENTED ("need a better C-representation of the job");
}
}} // namespace proc::engine

View file

@ -148,7 +148,7 @@ namespace test {
.relativeFrameLocation (refPoint, 15);
CHECK (coordinates.absoluteNominalTime == Time(0,1));
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.modelPort == modelPort);
CHECK (coordinates.channelNr == channel);
@ -240,7 +240,7 @@ namespace test {
uint nrJobs = timings.getPlanningChunkSize();
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);
// now invoke the rest of this test, which has been embedded into the continuation job.