Lumiera  0.pre.03
»edit your freedom«
ActivityLang Class Reference

#include "vault/gear/activity-lang.hpp"

Description

Term builder and execution framework to perform chains of scheduler Activities.

These are the verbs of a low-level execution language for render jobs; individual Activity records are managed by the BlockFlow allocation scheme and maintained until expiration of their deadline. To enact a render job, a connection of Activities will be suitably wired, and the entry point to start execution can be instructed into the Scheduler.

The ActivityLang object provides an construction and execution service

  • it provides a builder API to construct terms of properly wired Activity records
  • the activity::Term serves as a transient object for wiring and configuration and can be discarded after enqueuing the entry point of a chain.
  • the static function ActivityLang::dispatchChain() provides the execution logic for activating a chain of Activities successively.
  • for real usage, this execution environment needs some functionality implemented in the scheduler, which — for the purpose of Activity activation — is abstracted as an Execution Context with the following operations ** λ-post : hand over a chain of Activities for (time bound) activation ** λ-work : signal start of media processing and then leave »management mode« ** λ-done : signal completion of media processing ** λ-tick : activate an internal heartbeat and scheduler maintenance hook
See also
Activity
SchedulerActivity_test

Definition at line 69 of file activity-lang.hpp.

Public Member Functions

 ActivityLang (BlockFlowAlloc &memManager)
 
void announceLoad (FrameRate fps)
 
activity::Term buildAsyncLoadJob (Job job, Time start, Time deadline)
 Builder-API: initiate definition of IO data loading activities.
 
activity::Term buildCalculationJob (Job job, Time start, Time deadline)
 Builder-API: initiate definition of render activities for a media calculation job.
 
activity::Term buildMetaJob (Job job, Time start, Time deadline)
 Builder-API: initiate definition of internal/planning job.
 
ActivitycreateTick (Time deadline)
 
void discardBefore (Time deadline)
 

Static Public Member Functions

template<class EXE >
static activity::Proc activateChain (Activity *chain, EXE &executionCtx)
 Execution Framework: successive activation of Activities in a chain.
 
template<class EXE >
static activity::Proc dispatchChain (Activity *chain, EXE &executionCtx)
 Execution Framework: dispatch performance of a chain of Activities.
 

Private Member Functions

activity::Term setupActivityScheme (activity::Term::Template schemeKind, Job job, Time start, Time dead)
 

Private Attributes

BlockFlowAllocmem_
 

Member Function Documentation

◆ createTick()

Activity& createTick ( Time  deadline)
inline

setup a scheduler »Tick« for internal state maintenance

Definition at line 111 of file activity-lang.hpp.

References Activity::TICK, and BlockFlow< CONF >::until().

Referenced by Scheduler::handleDutyCycle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discardBefore()

void discardBefore ( Time  deadline)
inline

propagate new clean-up deadline to the BlockFlow allocator

Definition at line 114 of file activity-lang.hpp.

References BlockFlow< CONF >::discardBefore().

Referenced by Scheduler::handleDutyCycle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ announceLoad()

void announceLoad ( FrameRate  fps)
inline

announce expected additional load to the allocator

Definition at line 117 of file activity-lang.hpp.

References BlockFlow< CONF >::announceAdditionalFlow().

Referenced by Scheduler::seedCalcStream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setupActivityScheme()

activity::Term setupActivityScheme ( activity::Term::Template  schemeKind,
Job  job,
Time  start,
Time  dead 
)
inlineprivate

generate the builder / configurator term

Definition at line 157 of file activity-lang.hpp.

References BlockFlow< CONF >::until().

Referenced by ActivityLang::buildAsyncLoadJob(), ActivityLang::buildCalculationJob(), and ActivityLang::buildMetaJob().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Collaboration diagram for ActivityLang:

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