Loading...
Searching...
No Matches
EfPageCacheBasedExecutor< EngineType, DataManagerType > Class Template Reference

Executes a VdfNetwork to compute a requested set of values. More...

#include <pageCacheBasedExecutor.h>

+ Inheritance diagram for EfPageCacheBasedExecutor< EngineType, DataManagerType >:

Public Member Functions

 EfPageCacheBasedExecutor (EfPageCacheStorage *cacheStorage)
 Constructor.
 
virtual ~EfPageCacheBasedExecutor ()
 Destructor.
 
virtual void SetOutputValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask) override
 Set an output value.
 
void WillDeleteNode (const VdfNode &node)
 Removes any internal references to node upon deleting the node from the VdfNetwork.
 
- Public Member Functions inherited from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >
 VdfDataManagerBasedExecutor ()
 Default constructor.
 
 VdfDataManagerBasedExecutor (const VdfExecutorInterface *parentExecutor)
 Construct with a parent executor.
 
virtual ~VdfDataManagerBasedExecutor ()
 Destructor.
 
virtual void Resize (const VdfNetwork &network) override
 Resize the executor data manager to accommodate the given network.
 
virtual void SetOutputValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask) override
 Sets the cached value for a given output.
 
virtual bool TakeOutputValue (const VdfOutput &output, VdfVector *value, const VdfMask &mask) override
 Transfers the value to the given output.
 
virtual void DuplicateOutputData (const VdfOutput &sourceOutput, const VdfOutput &destOutput) override
 Duplicates the output data associated with sourceOutput and copies it to destOutput.
 
virtual bool IsEmpty () const override
 Returns true of the data manager is empty.
 
virtual bool HasInvalidationTimestampMismatch (const VdfOutput &source, const VdfOutput &dest) const override
 Returns true, if the invalidation timestamps between the source and dest outputs do not match, i.e.
 
- Public Member Functions inherited from VdfExecutorInterface
 VdfExecutorInterface (const VdfExecutorInterface &)=delete
 Noncopyable.
 
VdfExecutorInterfaceoperator= (const VdfExecutorInterface &)=delete
 
virtual VDF_API ~VdfExecutorInterface ()
 Destructor.
 
VDF_API void Run (const VdfSchedule &schedule, VdfExecutorErrorLogger *errorLogger=NULL)
 Executes the schedule.
 
VDF_API void Run (const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger=NULL)
 Executes the schedule.
 
virtual const VdfExecutorFactoryBase & GetFactory () const =0
 Returns a factory class facilitating the construction of new executors that share traits with this executor instance.
 
VDF_API void RegisterObserver (const VdfExecutorObserver *observer) const
 Can be called by clients to register a VdfExecutorObserver with this executor.
 
VDF_API void UnregisterObserver (const VdfExecutorObserver *observer) const
 Must be called by clients to unregister a VdfExecutorObserver, which has been previously registered with RegisterObserver().
 
const VdfVectorGetOutputValue (const VdfOutput &output, const VdfMask &mask) const
 Returns the cached value for a given output if it has a cache that contains all values specified by mask.
 
const VdfExecutorInterfaceGetParentExecutor () const
 Returns the parent executor, if any.
 
VDF_API void SetParentExecutor (const VdfExecutorInterface *parentExecutor)
 Sets the parent executor.
 
VDF_API void InvalidateValues (const VdfMaskedOutputVector &invalidationRequest)
 Invalidates the network, starting from the masked outputs in request.
 
VDF_API void InvalidateTopologicalState ()
 Invalidate all state depending on network topology.
 
VDF_API void ClearData ()
 Clears the executors buffers.
 
VDF_API void ClearDataForOutput (const VdfId outputId, const VdfId nodeId)
 Clears the executor buffers for a specific output.
 
void IncrementExecutorInvalidationTimestamp ()
 Increment this executor's invalidation timestamp for mung buffer locking.
 
void InheritExecutorInvalidationTimestamp (const VdfExecutorInterface &executor)
 Inherit the invalidation timestamp from another executor.
 
VdfInvalidationTimestamp GetExecutorInvalidationTimestamp () const
 Returns this executor's invalidation timestamp.
 
void SetInterruptionFlag (const std::atomic_bool *interruptionFlag)
 Set the interruption flag.
 
const std::atomic_bool * GetInterruptionFlag () const
 Returns the interruption flag.
 
bool HasBeenInterrupted () const
 Returns whether or not the executor has been interrupted, if the executor supports interruption.
 
void SetExecutionStats (VdfExecutionStats *stats)
 Sets an execution stats object.
 
VdfExecutionStatsGetExecutionStats () const
 Returns the Execution Stats object, if any.
 

Protected Member Functions

virtual const VdfVector_GetInputValue (const VdfConnection &connection, const VdfMask &mask) const override
 Returns value for the cache that flows across connection.
 
virtual const VdfVector_GetOutputValueForReading (const VdfOutput &output, const VdfMask &mask) const override
 Returns an output value for reading.
 
virtual void _ClearData () override
 Virtual implementation of the ClearData call.
 
- Protected Member Functions inherited from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >
virtual const VdfVector_GetInputValue (const VdfConnection &connection, const VdfMask &mask) const override
 Returns value for the cache that flows across connection.
 
virtual const VdfVector_GetOutputValueForReading (const VdfOutput &output, const VdfMask &mask) const override
 Returns an output value for reading.
 
virtual VdfVector_GetOutputValueForWriting (const VdfOutput &output) const override
 Returns an output value for writing.
 
void _ClearDataForOutput (const VdfId outputId, const VdfId nodeId) override
 Clears the data for a specific output on this executor.
 
virtual bool _IsOutputInvalid (const VdfId outputId, const VdfMask &invalidationMask) const override
 Returns true if the output is already invalid for the given invalidationMask.
 
virtual bool _InvalidateOutput (const VdfOutput &output, const VdfMask &invalidationMask) override
 Called during invalidation to mark outputs as invalid and determine when the traversal can terminate early.
 
virtual void _UpdateInvalidationTimestamp () override
 Called before invalidation begins to update the timestamp that will be written for every VdfOutput visited during invalidation.
 
virtual void _SetReferenceOutputValue (const VdfOutput &destOutput, const VdfOutput &sourceOutput, const VdfMask &sourceMask) const override
 Called to set destOutput's buffer output to be a reference to the buffer output of sourceOutput.
 
virtual void _TouchOutput (const VdfOutput &output) const override
 Mark the output as having been visited.
 
- Protected Member Functions inherited from VdfExecutorInterface
VDF_API VdfExecutorInterface ()
 Protected default constructor.
 
VDF_API VdfExecutorInterface (const VdfExecutorInterface *parentExecutor)
 Construct with a parent executor.
 
virtual void _Run (const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger)=0
 Run this executor with the given schedule and request.
 
virtual const VdfVector_GetInputValue (const VdfConnection &connection, const VdfMask &mask) const =0
 Returns a value for the cache that flows across connection.
 
virtual const VdfVector_GetOutputValueForReading (const VdfOutput &output, const VdfMask &mask) const =0
 Returns an output value for reading.
 
virtual VdfVector_GetOutputValueForWriting (const VdfOutput &output) const =0
 Returns an output value for writing.
 
virtual bool _IsOutputInvalid (const VdfId outputId, const VdfMask &invalidationMask) const =0
 Returns true if the output is already invalid for the given invalidationMask.
 
virtual bool _InvalidateOutput (const VdfOutput &output, const VdfMask &invalidationMask)=0
 Called during invalidation to mark outputs as invalid and determine when the traversal can terminate early.
 
virtual bool _PreProcessInvalidation (const VdfMaskedOutputVector &invalidationRequest, VdfMaskedOutputVector *processedRequest)
 This method is called as a pre-processing step before an InvalidateValues() call.
 
virtual void _UpdateInvalidationTimestamp ()=0
 Called before invalidation begins to update the timestamp that will be written for every VdfOutput visited during invalidation.
 
virtual VDF_API void _ClearData ()
 Virtual implementation of the ClearData call.
 
virtual VDF_API void _ClearDataForOutput (const VdfId outputId, const VdfId nodeId)
 Virtual implementation of the ClearDataForOutput call.
 
virtual void _SetReferenceOutputValue (const VdfOutput &destOutput, const VdfOutput &sourceOutput, const VdfMask &sourceMask) const =0
 Called to set destOutput's buffer output to be a reference to the buffer output of sourceOutput.
 
virtual void _TouchOutput (const VdfOutput &output) const =0
 Mark the output as having been visited.
 

Additional Inherited Members

- Protected Attributes inherited from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >
DataManagerType _dataManager
 

Detailed Description

template<template< typename > class EngineType, typename DataManagerType>
class EfPageCacheBasedExecutor< EngineType, DataManagerType >

Executes a VdfNetwork to compute a requested set of values.

Caches the computed data in a EfPageCacheStorage container and recalls existing data using a page specified via the currently set value on the key output.

Definition at line 43 of file pageCacheBasedExecutor.h.

Constructor & Destructor Documentation

◆ EfPageCacheBasedExecutor()

EfPageCacheBasedExecutor ( EfPageCacheStorage cacheStorage)
inline

Constructor.

Definition at line 53 of file pageCacheBasedExecutor.h.

◆ ~EfPageCacheBasedExecutor()

virtual ~EfPageCacheBasedExecutor ( )
inlinevirtual

Destructor.

Definition at line 65 of file pageCacheBasedExecutor.h.

Member Function Documentation

◆ _ClearData()

void _ClearData ( )
overrideprotectedvirtual

Virtual implementation of the ClearData call.

This may be overridden by classes, which derive from VdfExecutorInterface.

Reimplemented from VdfExecutorInterface.

Definition at line 409 of file pageCacheBasedExecutor.h.

◆ _GetInputValue()

const VdfVector * _GetInputValue ( const VdfConnection connection,
const VdfMask mask 
) const
overrideprotectedvirtual

Returns value for the cache that flows across connection.

Reimplemented from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >.

Definition at line 175 of file pageCacheBasedExecutor.h.

◆ _GetOutputValueForReading()

const VdfVector * _GetOutputValueForReading ( const VdfOutput output,
const VdfMask mask 
) const
overrideprotectedvirtual

Returns an output value for reading.

Reimplemented from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >.

Definition at line 195 of file pageCacheBasedExecutor.h.

◆ SetOutputValue()

void SetOutputValue ( const VdfOutput output,
const VdfVector value,
const VdfMask mask 
)
overridevirtual

Set an output value.

Changes the currently selected page in the page cache, if output is a key output in the EfPageCacheStorage container.

Reimplemented from VdfDataManagerBasedExecutor< DataManagerType, VdfExecutorInterface >.

Definition at line 147 of file pageCacheBasedExecutor.h.

◆ WillDeleteNode()

void WillDeleteNode ( const VdfNode node)

Removes any internal references to node upon deleting the node from the VdfNetwork.

Definition at line 166 of file pageCacheBasedExecutor.h.


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