Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Public Member Functions

 VuoCompilerChain (vector< VuoCompilerNode * > nodes, bool lastNodeInLoop)
 Creates a chain consisting of the given list of nodes.
 
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.
 
vector< VuoCompilerNode * > getNodes (void)
 Returns the sequence of nodes in this chain.
 
bool isLastNodeInLoop (void)
 Returns true if this chain represents a single node that is the last (and only repeated) node in a feedback loop.
 

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.
 
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.
 
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.
 
static Function * getFreeContextFunction (Module *module)
 Generates code that deallocates the context argument of a chain worker function.
 

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

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.

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.

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.
Function * VuoCompilerChain::getFreeContextFunction ( Module *  module)
static

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

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

Returns the sequence of nodes in this chain.

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.


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