Loading...
Searching...
No Matches
VdfPullBasedExecutorEngine< DataManagerType > Class Template Reference

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.
 

Detailed Description

template<typename DataManagerType>
class VdfPullBasedExecutorEngine< DataManagerType >

This class is a collection of common functions used by pulled based executors.

Definition at line 67 of file pullBasedExecutorEngine.h.

Member Typedef Documentation

◆ _DataHandle

typedef DataManagerType::DataHandle _DataHandle
protected

The data handle type from the data manager implementation.

Definition at line 116 of file pullBasedExecutorEngine.h.

◆ 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.

Member Enumeration Documentation

◆ _ExecutionStage

enum _ExecutionStage
protected

This enum describes the stages that a node goes through in execution.

Definition at line 120 of file pullBasedExecutorEngine.h.

Constructor & Destructor Documentation

◆ VdfPullBasedExecutorEngine()

VdfPullBasedExecutorEngine ( const VdfExecutorInterface executor,
DataManagerType *  dataManager 
)
inline

Constructor.

Definition at line 81 of file pullBasedExecutorEngine.h.

Member Function Documentation

◆ _ComputeNode()

void _ComputeNode ( const VdfEvaluationState state,
const VdfNode node,
bool  absorbLockedCache = false 
)
protected

Computes node.

This is the method that ends up calling Compute() on the VdfNode.

Definition at line 906 of file pullBasedExecutorEngine.h.

◆ _CopyCache()

VdfVector * _CopyCache ( const VdfOutput toOutput,
VdfExecutorBufferData toBuffer,
const VdfOutput fromOutput,
const VdfMask fromMask 
) const
protected

Helper method to _PrepareReadWriteBuffer that copies the cache from fromOutput to toOutput.

Definition at line 377 of file pullBasedExecutorEngine.h.

◆ _GetDataManager()

DataManagerType * _GetDataManager ( )
inlineprotected

Returns the data manager used by this engine.

Definition at line 178 of file pullBasedExecutorEngine.h.

◆ _GetExecutor()

const VdfExecutorInterface & _GetExecutor ( )
inlineprotected

Returns the executor running this engine.

Definition at line 174 of file pullBasedExecutorEngine.h.

◆ _IsNotPassing()

static bool _IsNotPassing ( const VdfOutput output,
const VdfSchedule::OutputId outputId,
const VdfSchedule schedule 
)
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.

◆ _PassOrCopyBufferInternal()

VdfVector * _PassOrCopyBufferInternal ( const _DataHandle  dataHandle,
const VdfOutput output,
const VdfOutput source,
const VdfMask inputMask,
const VdfSchedule schedule 
) const
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.

◆ _PassOrCopySourceOutputBuffer()

VdfVector * _PassOrCopySourceOutputBuffer ( const _DataHandle  dataHandle,
const VdfOutput output,
const VdfOutput source,
const VdfMask inputMask,
const VdfSchedule schedule 
)
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.

◆ _PassThroughNode()

bool _PassThroughNode ( const VdfSchedule schedule,
const VdfNode node,
bool  absorbLockedCache = false 
)
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.

◆ _PrepareReadWriteBuffer()

void _PrepareReadWriteBuffer ( const _DataHandle  dataHandle,
const VdfInput input,
const VdfMask mask,
const VdfSchedule schedule 
)
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.

◆ RunSchedule() [1/2]

void RunSchedule ( const VdfSchedule schedule,
const VdfRequest &  computeRequest,
VdfExecutorErrorLogger errorLogger 
)
inline

Executes the given schedule with a computeRequest and an optional /p errorLogger.

Definition at line 91 of file pullBasedExecutorEngine.h.

◆ RunSchedule() [2/2]

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.


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