Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
activity.hpp File Reference

Descriptor for a piece of operational logic performed by the scheduler. More...

Go to the source code of this file.

Description

Descriptor for a piece of operational logic performed by the scheduler.

The Scheduler in Lumiera's Vault coordinates the rendering activities, by passing and responding to Activity messages, thereby observing temporal limits (deadlines) and dependency constraints. A predefined and fixed set of Activity verbs defines atomic operations the engine is able to perform, directed by the scheduler. Complex calculation tasks are constructed from interconnected activities, passed through the messaging and priority queue of the scheduler. While an Activity is in processing, the corresponding descriptor data record is maintained by the BlockStream custom memory manager.

Performing Activities

The Activity data records are »POD with constructor« and can be created and copied freely; the provided constructors ensure consistent setup, since the meaning of the variant data depends on the Activity::verb_. However, in actual usage, the builder functionality of the ActivityLang is used to generate linked »Activity terms«, connecting chains of Activities in accordance with an implicit execution protocol, which also forms the base of the Activity state machine:

  • Activity::activate is invoked only once, when an Activity becomes active.
  • the provided Execution Context is connected through several λ-bindings with the actual execution logic, as provided by »Layer-2« of the Scheduler
  • Activity::dispatch is always invoked from within the scheduler and implies single threaded operation with the ability to mutate the scheduler queue; typically this happens after de-queuing an Activity from the priority queue and leads then to Activation of the retrieved Activity; however, it can also happen right away — when the indicated time has passed.
  • Activity::INVOKE represents the relevant case of a »Render Job« and is typically performed by workers running concurrently
  • Activity::notify receives a message/trigger from another prerequisite Activity
See also
SchedulerActivity_test
ActivityLang implementation of execution logic

Definition in file activity.hpp.

#include "vault/common.hpp"
#include "vault/gear/job.h"
#include "lib/time/timevalue.hpp"
#include "lib/meta/function.hpp"
#include "lib/util.hpp"

Namespaces

namespace  vault
 Vault-Layer implementation namespace root.
 
namespace  vault::gear
 Active working gear and plumbing.
 
namespace  vault::gear::activity
 

Enumerations

enum  Proc {
  PASS ,
  SKIP ,
  WAIT ,
  KICK ,
  HALT
}
 Result instruction from Activity activation. More...
 

Classes

class  ManifestationID
 Marker for current (and obsolete) manifestations of a CalcStream processed by the Render-Engine. More...
 
class  Instant
 < special definitions for the Scheduler activity language More...
 
class  Hook
 Extension point to invoke a callback from Activity activation. More...
 
class  Activity
 Record to describe an Activity, to happen within the Scheduler's control flow. More...
 
struct  Activity::Feed
 Payload data to provide. More...
 
struct  Activity::Timing
 Timing observation to propagate. More...
 
struct  Activity::Callback
 Extension point to invoke. More...
 
struct  Activity::Condition
 Access gate condition to evaluate. More...
 
struct  Activity::TimeWindow
 Time window to define for activation. More...
 
struct  Activity::Invocation
 External work functor to activate. More...
 
struct  Activity::Notification
 Notification towards another Activity. More...
 
union  Activity::ArgumentData
 Storage of Argument data dependent on Activity::verb_. More...
 

Functions

HashVal hash_value (ManifestationID const &id)
 
template<class EXE >
constexpr void _verify_usable_as_ExecutionContext ()
 Definition to emulate a Concept for the Execution Context.
 

Class Documentation

◆ vault::gear::Activity::Feed

struct vault::gear::Activity::Feed
Class Members
uint64_t one
uint64_t two
+ Collaboration diagram for Activity::Feed:

◆ vault::gear::Activity::Timing

struct vault::gear::Activity::Timing
Class Members
Instant instant
size_t quality
+ Collaboration diagram for Activity::Timing:

◆ vault::gear::Activity::Callback

struct vault::gear::Activity::Callback
Class Members
Hook * hook
size_t arg
+ Collaboration diagram for Activity::Callback:

◆ vault::gear::Activity::TimeWindow

struct vault::gear::Activity::TimeWindow
Class Members
Instant life
Instant dead
+ Collaboration diagram for Activity::TimeWindow:

◆ vault::gear::Activity::Invocation

struct vault::gear::Activity::Invocation
Class Members
JobFunctor * task
Instant time
+ Collaboration diagram for Activity::Invocation:

◆ vault::gear::Activity::Notification

struct vault::gear::Activity::Notification
Class Members
Activity * target
Instant timing
+ Collaboration diagram for Activity::Notification:

◆ vault::gear::Activity::ArgumentData

union vault::gear::Activity::ArgumentData
Class Members
Feed feed
Timing timing
Callback callback
Condition condition
TimeWindow timeWindow
Invocation invocation
Notification notification
+ Collaboration diagram for Activity::ArgumentData: