Vuo
1.0.0
|
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 * | generateEventIdValue (Module *module, Function *workerFunction, BasicBlock *block) |
Generates code that retrieves the event ID from the worker function's context argument. | |
static void | generateFreeContextArgument (Module *module, Function *workerFunction, BasicBlock *block) |
Generates code that frees the worker function's context argument. | |
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.
void VuoCompilerChain::generateAllocationForDispatchGroup | ( | Module * | module, |
BasicBlock * | block, | ||
string | triggerIdentifier | ||
) |
Generates the allocation of this chain's dispatch group.
|
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().
void VuoCompilerChain::generateFinalizationForDispatchGroup | ( | Module * | module, |
BasicBlock * | block | ||
) |
Generates the finalization of this chain's dispatch group.
|
static |
Generates code that frees the worker function's context argument.
Assumes the worker function came from the return value of generateSubmissionForDispatchGroup().
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.
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().
vector< VuoCompilerNode * > VuoCompilerChain::getNodes | ( | void | ) |
Returns the sequence of nodes in this chain.