Vuo  2.2.0
Public Member Functions | Static Public Member Functions | List of all members
VuoCompilerChain Class Reference

Description

A linear sequence of nodes along which an event may be transmitted.

Definition at line 17 of file VuoCompilerChain.hh.

Public Member Functions

 VuoCompilerChain (vector< VuoCompilerNode * > nodes, bool lastNodeInLoop)
 Creates a chain consisting of the given list of nodes. More...
 
Function * generateScheduleWorker (Module *module, BasicBlock *block, Value *compositionStateValue, Value *contextValue, string triggerIdentifier, int minThreadsNeeded, int maxThreadsNeeded, size_t chainIndex, vector< size_t > upstreamChainIndices)
 Generates code that schedules the worker function for this chain to execute on the global dispatch queue. More...
 
vector< VuoCompilerNode * > getNodes (void)
 Returns the sequence of nodes in this chain. More...
 
bool isLastNodeInLoop (void)
 Returns true if this chain represents a single node that is the last (and only repeated) node in a feedback loop. More...
 

Static Public Member Functions

static Value * generateMakeContext (Module *module, BasicBlock *block, Value *compositionStateValue, Value *eventIdValue)
 Generates code to create a context that can be passed to chain worker functions. More...
 
static Value * generateCompositionStateValue (Module *module, BasicBlock *block, Value *contextValue)
 Generates code that retrieves the composition identifier from the context argument of a chain worker function. More...
 
static Value * generateEventIdValue (Module *module, BasicBlock *block, Value *contextValue)
 Generates code that retrieves the event ID from the context argument of a chain worker function. More...
 
static Function * getFreeContextFunction (Module *module)
 Generates code that deallocates the context argument of a chain worker function. More...
 

Constructor & Destructor Documentation

◆ VuoCompilerChain()

VuoCompilerChain::VuoCompilerChain ( vector< VuoCompilerNode * >  nodes,
bool  lastNodeInLoop 
)

Creates a chain consisting of the given list of nodes.

Parameters
nodesA linear sequence of nodes.
lastNodeInLoopTrue if this chain represents a single node that is the last (and only repeated) node in a feedback loop.

Definition at line 21 of file VuoCompilerChain.cc.

Member Function Documentation

◆ generateCompositionStateValue()

Value * VuoCompilerChain::generateCompositionStateValue ( Module *  module,
BasicBlock *  block,
Value *  contextValue 
)
static

Generates code that retrieves the composition identifier from the context argument of a chain worker function.

Definition at line 68 of file VuoCompilerChain.cc.

◆ generateEventIdValue()

Value * VuoCompilerChain::generateEventIdValue ( Module *  module,
BasicBlock *  block,
Value *  contextValue 
)
static

Generates code that retrieves the event ID from the context argument of a chain worker function.

Definition at line 84 of file VuoCompilerChain.cc.

◆ generateMakeContext()

Value * VuoCompilerChain::generateMakeContext ( Module *  module,
BasicBlock *  block,
Value *  compositionStateValue,
Value *  eventIdValue 
)
static

Generates code to create a context that can be passed to chain worker functions.

The context contains the composition state and the event ID.

Definition at line 31 of file VuoCompilerChain.cc.

◆ generateScheduleWorker()

Function * VuoCompilerChain::generateScheduleWorker ( Module *  module,
BasicBlock *  block,
Value *  compositionStateValue,
Value *  contextValue,
string  triggerIdentifier,
int  minThreadsNeeded,
int  maxThreadsNeeded,
size_t  chainIndex,
vector< size_t >  upstreamChainIndices 
)

Generates code that schedules the worker function for this chain to execute on the global dispatch queue.

Returns
The scheduled function. The caller is responsible for filling in the body of this function.

Definition at line 150 of file VuoCompilerChain.cc.

◆ getFreeContextFunction()

Function * VuoCompilerChain::getFreeContextFunction ( Module *  module)
static

Generates code that deallocates the context argument of a chain worker function.

Definition at line 102 of file VuoCompilerChain.cc.

◆ getNodes()

vector< VuoCompilerNode * > VuoCompilerChain::getNodes ( void  )

Returns the sequence of nodes in this chain.

Definition at line 178 of file VuoCompilerChain.cc.

◆ isLastNodeInLoop()

bool VuoCompilerChain::isLastNodeInLoop ( void  )

Returns true if this chain represents a single node that is the last (and only repeated) node in a feedback loop.

Definition at line 186 of file VuoCompilerChain.cc.


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