![]() |
|
This class is a collection of common functions used by pulled based executors. More...
#include <pullBasedExecutorEngine.h>
Inheritance diagram for VdfPullBasedExecutorEngine< DataManagerType >:Public Types | |
| typedef VdfSpeculationExecutorEngine< DataManagerType > | SpeculationExecutorEngine |
| The equivalent speculation executor engine. | |
Public Member Functions | |
| VdfPullBasedExecutorEngine (const VdfExecutorInterface &executor, DataManagerType *dataManager) | |
| Constructor. | |
| void | RunSchedule (const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger) |
Executes the given schedule with a computeRequest and an optional /p errorLogger. | |
| template<typename F > | |
| void | RunSchedule (const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger, F &&callback) |
Executes the given schedule with a computeRequest and an optional /p errorLogger. | |
Protected Types | |
| enum | _ExecutionStage { ExecutionStageStart , ExecutionStagePreRequisitesDone , ExecutionStageReadsDone , ExecutionStageCompute } |
| This enum describes the stages that a node goes through in execution. More... | |
| typedef DataManagerType::DataHandle | _DataHandle |
| The data handle type from the data manager implementation. | |
Protected Member Functions | |
| void | _ComputeNode (const VdfEvaluationState &state, const VdfNode &node, bool absorbLockedCache=false) |
Computes node. | |
| bool | _PassThroughNode (const VdfSchedule &schedule, const VdfNode &node, bool absorbLockedCache=false) |
Causes the outputs with associated inputs in node to have their data passed through. | |
| VdfVector * | _CopyCache (const VdfOutput &toOutput, VdfExecutorBufferData *toBuffer, const VdfOutput &fromOutput, const VdfMask &fromMask) const |
Helper method to _PrepareReadWriteBuffer that copies the cache from fromOutput to toOutput. | |
| const VdfExecutorInterface & | _GetExecutor () |
| Returns the executor running this engine. | |
| DataManagerType * | _GetDataManager () |
| Returns the data manager used by this engine. | |
| VdfVector * | _PassOrCopySourceOutputBuffer (const _DataHandle dataHandle, const VdfOutput &output, const VdfOutput &source, const VdfMask &inputMask, const VdfSchedule &schedule) |
| Fast path for when we know ahead of time the output from which we wish to pass the buffer (or copy) and it is not necessarily the one that is directly connected to the output's associated input. | |
| VdfVector * | _PassOrCopyBufferInternal (const _DataHandle dataHandle, const VdfOutput &output, const VdfOutput &source, const VdfMask &inputMask, const VdfSchedule &schedule) const |
Common method for _PrepareReadWriteBuffer and _PassOrCopySourceOutputBuffer that attempts to pass the buffer from source to output. | |
| void | _PrepareReadWriteBuffer (const _DataHandle dataHandle, const VdfInput &input, const VdfMask &mask, const VdfSchedule &schedule) |
| Prepares a buffer for a read/write output. | |
Static Protected Member Functions | |
| static bool | _IsNotPassing (const VdfOutput &output, const VdfSchedule::OutputId &outputId, const VdfSchedule &schedule) |
| Returns true if the output is associative but does not pass the buffer to another output. | |
This class is a collection of common functions used by pulled based executors.
Definition at line 67 of file pullBasedExecutorEngine.h.
|
protected |
The data handle type from the data manager implementation.
Definition at line 116 of file pullBasedExecutorEngine.h.
| typedef VdfSpeculationExecutorEngine<DataManagerType> SpeculationExecutorEngine |
The equivalent speculation executor engine.
Executor factories can use this typedef to map from an executor engine to a speculation executor engine with equivalent traits.
Definition at line 77 of file pullBasedExecutorEngine.h.
|
protected |
This enum describes the stages that a node goes through in execution.
Definition at line 120 of file pullBasedExecutorEngine.h.
|
inline |
Constructor.
Definition at line 81 of file pullBasedExecutorEngine.h.
|
protected |
Computes node.
This is the method that ends up calling Compute() on the VdfNode.
Definition at line 906 of file pullBasedExecutorEngine.h.
|
protected |
Helper method to _PrepareReadWriteBuffer that copies the cache from fromOutput to toOutput.
Definition at line 377 of file pullBasedExecutorEngine.h.
|
inlineprotected |
Returns the data manager used by this engine.
Definition at line 178 of file pullBasedExecutorEngine.h.
|
inlineprotected |
Returns the executor running this engine.
Definition at line 174 of file pullBasedExecutorEngine.h.
|
inlinestaticprotected |
Returns true if the output is associative but does not pass the buffer to another output.
In other words, this returns true if this is the last output in the pool chain.
Definition at line 219 of file pullBasedExecutorEngine.h.
|
protected |
Common method for _PrepareReadWriteBuffer and _PassOrCopySourceOutputBuffer that attempts to pass the buffer from source to output.
Definition at line 444 of file pullBasedExecutorEngine.h.
|
protected |
Fast path for when we know ahead of time the output from which we wish to pass the buffer (or copy) and it is not necessarily the one that is directly connected to the output's associated input.
Definition at line 415 of file pullBasedExecutorEngine.h.
|
protected |
Causes the outputs with associated inputs in node to have their data passed through.
For outputs that don't have associated inputs, the default value registered for the output's value type is used.
It is an error to call this method on a node that was computed with _ComputeNode() – these two calls are mutually exclusive.
Returns true if any output had data to be passed through, and false otherwise.
Definition at line 1063 of file pullBasedExecutorEngine.h.
|
protected |
Prepares a buffer for a read/write output.
This method makes sure that the output buffer has been passed down from the input. If at the input there is no buffer available for passing, this method will create a new one.
Definition at line 544 of file pullBasedExecutorEngine.h.
|
inline |
Executes the given schedule with a computeRequest and an optional /p errorLogger.
Definition at line 91 of file pullBasedExecutorEngine.h.
| void RunSchedule | ( | const VdfSchedule & | schedule, |
| const VdfRequest & | computeRequest, | ||
| VdfExecutorErrorLogger * | errorLogger, | ||
| F && | callback | ||
| ) |
Executes the given schedule with a computeRequest and an optional /p errorLogger.
Invokes callback after evaluation of each uncached output in the request, and immediatelly after hitting the cache for cached outputs in the request.
Definition at line 322 of file pullBasedExecutorEngine.h.