Vuo  0.5.6
 All Classes 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 isLastNodeInLoop)
 Creates a linear chain of nodes that would be pushed by the given trigger.
 
void generateAllocationForDispatchGroup (Module *module, BasicBlock *block, string triggerIdentifier)
 Generates the allocation of this chain's dispatch group.
 
void generateInitializationForDispatchGroup (Module *module, BasicBlock *block)
 Generates the initialization of this chain's dispatch group, initializing it to a new dispatch group.
 
void generateFinalizationForDispatchGroup (Module *module, BasicBlock *block)
 Generates the finalization of this chain's dispatch group.
 
Function * generateSubmissionForDispatchGroup (Module *module, BasicBlock *block, Value *eventIdValue, vector< VuoCompilerChain * > upstreamChains)
 Generates code that submits a function for asynchronous execution and associates it with this chain's dispatch group.
 
void generateWaitForDispatchGroup (Module *module, BasicBlock *block)
 Generates code that waits on this chain's dispatch group.
 
void generateWaitForUpstreamChains (Module *module, Function *workerFunction, BasicBlock *block)
 Generates code that waits on the dispatch groups from the worker function's context argument.
 
vector< VuoCompilerNode * > getNodes (void)
 Returns the sequence of nodes in this chain.
 

Static Public Member Functions

static Value * getEventIdValue (Module *module, Function *workerFunction, BasicBlock *block)
 Generates code that retrieves the event ID from the worker function's context argument.
 

Constructor & Destructor Documentation

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

Creates a linear chain of nodes that would be pushed by the given trigger.

Assumes nodes is not empty.

Member Function Documentation

void VuoCompilerChain::generateAllocationForDispatchGroup ( Module *  module,
BasicBlock *  block,
string  triggerIdentifier 
)

Generates the allocation of this chain's dispatch group.

void VuoCompilerChain::generateFinalizationForDispatchGroup ( Module *  module,
BasicBlock *  block 
)

Generates the finalization of this chain's dispatch group.

void VuoCompilerChain::generateInitializationForDispatchGroup ( Module *  module,
BasicBlock *  block 
)

Generates the initialization of this chain's dispatch group, initializing it to a new dispatch group.

Function * VuoCompilerChain::generateSubmissionForDispatchGroup ( Module *  module,
BasicBlock *  block,
Value *  eventIdValue,
vector< VuoCompilerChain * >  upstreamChains 
)

Generates code that submits a function for asynchronous execution and associates it with this chain's dispatch group.

The event ID and the dispatch groups for upstream chains are passed in the context argument for the submitted function.

Returns
The submitted function. The caller is responsible for filling in the body of this function.
void VuoCompilerChain::generateWaitForDispatchGroup ( Module *  module,
BasicBlock *  block 
)

Generates code that waits on this chain's dispatch group.

void VuoCompilerChain::generateWaitForUpstreamChains ( Module *  module,
Function *  workerFunction,
BasicBlock *  block 
)

Generates code that waits on the dispatch groups from the worker function's context argument.

Assumes the worker function came from the return value of generateSubmissionForDispatchGroup().

Value * VuoCompilerChain::getEventIdValue ( Module *  module,
Function *  workerFunction,
BasicBlock *  block 
)
static

Generates code that retrieves the event ID from the worker function's context argument.

Assumes the worker function came from the return value of generateSubmissionForDispatchGroup().

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

Returns the sequence of nodes in this chain.


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