HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EfMaskedSubExecutor Class Reference

This sub-executor masks the parent executor. It is a dataless executor, i.e. it does not hold on to any data caches. It does, however, support invalidation and locally trackes invalidation state. If an output is invalid on this executor, the call to GetOutputValue() will not look up the data cache on the parent executor, and will instead return NULL. Thus, the EfMaskedSubExecutor allows for correctly tracking invalidation without affecting the invalidation state on the parent executor, potentially messing with mung buffer locking, or stomping on existing buffers. More...

#include <maskedSubExecutor.h>

+ Inheritance diagram for EfMaskedSubExecutor:

Public Member Functions

EF_API EfMaskedSubExecutor (const VdfExecutorInterface *parentExecutor)
 
virtual EF_API ~EfMaskedSubExecutor ()
 
const VdfExecutorFactoryBaseGetFactory () const override
 
virtual EF_API void DuplicateOutputData (const VdfOutput &sourceOutput, const VdfOutput &destOutput) override
 
virtual bool IsEmpty () const override
 
virtual bool HasInvalidationTimestampMismatch (const VdfOutput &source, const VdfOutput &dest) const override
 
- Public Member Functions inherited from VdfDatalessExecutor
virtual VDF_API ~VdfDatalessExecutor ()
 
virtual VDF_API void SetOutputValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask) override
 
virtual VDF_API bool TakeOutputValue (const VdfOutput &output, VdfVector *value, const VdfMask &mask) override
 
- Public Member Functions inherited from VdfExecutorInterface
 VdfExecutorInterface (const VdfExecutorInterface &)=delete
 
VdfExecutorInterfaceoperator= (const VdfExecutorInterface &)=delete
 
virtual VDF_API ~VdfExecutorInterface ()
 
VDF_API void Run (const VdfSchedule &schedule, VdfExecutorErrorLogger *errorLogger=NULL)
 
VDF_API void Run (const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger=NULL)
 
VDF_API void RegisterObserver (const VdfExecutorObserver *observer) const
 
VDF_API void UnregisterObserver (const VdfExecutorObserver *observer) const
 
virtual void Resize (const VdfNetwork &network)
 
const VdfVectorGetOutputValue (const VdfOutput &output, const VdfMask &mask) const
 
const VdfExecutorInterfaceGetParentExecutor () const
 
VDF_API void SetParentExecutor (const VdfExecutorInterface *parentExecutor)
 
VDF_API void InvalidateValues (const VdfMaskedOutputVector &invalidationRequest)
 
VDF_API void InvalidateTopologicalState ()
 
VDF_API void ClearData ()
 
VDF_API void ClearDataForOutput (const VdfId outputId, const VdfId nodeId)
 
void IncrementExecutorInvalidationTimestamp ()
 
void InheritExecutorInvalidationTimestamp (const VdfExecutorInterface &executor)
 
VdfInvalidationTimestamp GetExecutorInvalidationTimestamp () const
 
void SetInterruptionFlag (const std::atomic_bool *interruptionFlag)
 
const std::atomic_bool * GetInterruptionFlag () const
 
bool HasBeenInterrupted () const
 
void SetExecutionStats (VdfExecutionStats *stats)
 
VdfExecutionStatsGetExecutionStats () const
 

Protected Member Functions

virtual bool _InvalidateOutput (const VdfOutput &output, const VdfMask &invalidationMask) override
 
virtual void _ClearData () override
 
- Protected Member Functions inherited from VdfDatalessExecutor
VDF_API VdfDatalessExecutor ()
 
virtual const VdfVector_GetInputValue (const VdfConnection &connection, const VdfMask &mask) const override
 
virtual VdfVector_GetOutputValueForWriting (const VdfOutput &output) const override
 
void _ClearDataForOutput (const VdfId outputId, const VdfId nodeId) override
 
virtual void _UpdateInvalidationTimestamp () override
 
virtual VDF_API void _SetReferenceOutputValue (const VdfOutput &destOutput, const VdfOutput &sourceOutput, const VdfMask &sourceMask) const override
 
virtual void _TouchOutput (const VdfOutput &output) const override
 
- Protected Member Functions inherited from VdfExecutorInterface
VDF_API VdfExecutorInterface ()
 
VDF_API VdfExecutorInterface (const VdfExecutorInterface *parentExecutor)
 
virtual bool _PreProcessInvalidation (const VdfMaskedOutputVector &invalidationRequest, VdfMaskedOutputVector *processedRequest)
 

Detailed Description

This sub-executor masks the parent executor. It is a dataless executor, i.e. it does not hold on to any data caches. It does, however, support invalidation and locally trackes invalidation state. If an output is invalid on this executor, the call to GetOutputValue() will not look up the data cache on the parent executor, and will instead return NULL. Thus, the EfMaskedSubExecutor allows for correctly tracking invalidation without affecting the invalidation state on the parent executor, potentially messing with mung buffer locking, or stomping on existing buffers.

Definition at line 41 of file maskedSubExecutor.h.

Constructor & Destructor Documentation

EF_API EfMaskedSubExecutor::EfMaskedSubExecutor ( const VdfExecutorInterface parentExecutor)

Constructor

Note, this executor must be constructed with a parent executor present, because it dispatches the calls to GetOutputValue to the parent.

virtual EF_API EfMaskedSubExecutor::~EfMaskedSubExecutor ( )
virtual

Destructor

Member Function Documentation

virtual void EfMaskedSubExecutor::_ClearData ( )
overrideprotectedvirtual

Clears all the data caches associated with any output in the network.

This has no effect on this type of executor.

Reimplemented from VdfDatalessExecutor.

virtual bool EfMaskedSubExecutor::_InvalidateOutput ( const VdfOutput output,
const VdfMask invalidationMask 
)
overrideprotectedvirtual

Called during invalidation to mark outputs as invalid and determine when the traversal can terminate early.

Returns true if there was anything to invalidate and false if output was already invalid.

Implements VdfExecutorInterface.

virtual EF_API void EfMaskedSubExecutor::DuplicateOutputData ( const VdfOutput sourceOutput,
const VdfOutput destOutput 
)
overridevirtual

Duplicates the output data associated with sourceOutput and copies it to destOutput.

Implements VdfExecutorInterface.

const VdfExecutorFactoryBase& EfMaskedSubExecutor::GetFactory ( ) const
inlineoverridevirtual

Factory construction.

Implements VdfExecutorInterface.

Definition at line 70 of file maskedSubExecutor.h.

virtual bool EfMaskedSubExecutor::HasInvalidationTimestampMismatch ( const VdfOutput source,
const VdfOutput dest 
) const
inlineoverridevirtual

Returns true if the invalidation timestamps mismatch between the source and dest outputs. This information is used to determine whether to lock the source output for mung buffer locking.

Although, this executor does store invalidation state, we refer to the parent executor to look up invalidation timestamps.

Implements VdfExecutorInterface.

Definition at line 101 of file maskedSubExecutor.h.

virtual bool EfMaskedSubExecutor::IsEmpty ( ) const
inlineoverridevirtual

Indicates whether this executor contains data.

Note, that this method always returns false on this executor. We do this in order to trick invalidation into thinking that there is always data living on this executor. This allows us to push invalidation through the entire network and record the invalidation state, without regard for what state the parent executor is in.

Reimplemented from VdfDatalessExecutor.

Definition at line 90 of file maskedSubExecutor.h.


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