![]() |
|
This sub-executor masks the parent executor. More...
#include <maskedSubExecutor.h>
Inheritance diagram for EfMaskedSubExecutor:Public Member Functions | |
| EF_API | EfMaskedSubExecutor (const VdfExecutorInterface *parentExecutor) |
| Constructor. | |
| virtual EF_API | ~EfMaskedSubExecutor () |
| Destructor. | |
| const VdfExecutorFactoryBase & | GetFactory () const override |
| Factory construction. | |
| virtual EF_API void | DuplicateOutputData (const VdfOutput &sourceOutput, const VdfOutput &destOutput) |
Duplicates the output data associated with sourceOutput and copies it to destOutput. | |
| virtual bool | IsEmpty () const |
| Indicates whether this executor contains data. | |
| virtual bool | HasInvalidationTimestampMismatch (const VdfOutput &source, const VdfOutput &dest) const |
Returns true if the invalidation timestamps mismatch between the source and dest outputs. | |
Public Member Functions inherited from VdfDatalessExecutor | |
| virtual VDF_API | ~VdfDatalessExecutor () |
| Destructor. | |
| virtual VDF_API void | SetOutputValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask) |
Sets the cached value for a given output. | |
| virtual VDF_API bool | TakeOutputValue (const VdfOutput &output, VdfVector *value, const VdfMask &mask) |
Transfers ownership of value to the given output. | |
| virtual bool | IsEmpty () const |
Returns true of the data manager is empty. | |
Public Member Functions inherited from VdfExecutorInterface | |
| VdfExecutorInterface (const VdfExecutorInterface &)=delete | |
| Noncopyable. | |
| VdfExecutorInterface & | operator= (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. | |
| 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(). | |
| virtual void | Resize (const VdfNetwork &network) |
Resize the executor to accomodate data for the given network. | |
| const VdfVector * | GetOutputValue (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 VdfExecutorInterface * | GetParentExecutor () 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. | |
| VdfExecutionStats * | GetExecutionStats () const |
| Returns the Execution Stats object, if any. | |
Protected Member Functions | |
| virtual bool | _InvalidateOutput (const VdfOutput &output, const VdfMask &invalidationMask) |
| Called during invalidation to mark outputs as invalid and determine when the traversal can terminate early. | |
| virtual void | _ClearData () |
| Clears all the data caches associated with any output in the network. | |
Protected Member Functions inherited from VdfDatalessExecutor | |
| VDF_API | VdfDatalessExecutor () |
| Protected default constructor. | |
| virtual const VdfVector * | _GetInputValue (const VdfConnection &connection, const VdfMask &mask) const override |
Returns a 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 void | _ClearData () |
| Clears all the data caches associated with any output in the network. | |
| virtual void | _UpdateInvalidationTimestamp () |
| Called before invalidation begins to update the timestamp that will be written for every VdfOutput visited during invalidation. | |
| virtual VDF_API void | _SetReferenceOutputValue (const VdfOutput &destOutput, const VdfOutput &sourceOutput, const VdfMask &sourceMask) const |
| Called to set destOutput's buffer output to be a reference to the buffer output of sourceOutput. | |
| virtual void | _TouchOutput (const VdfOutput &output) const |
| 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. | |
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.
| EF_API 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 |
Destructor.
|
protectedvirtual |
Clears all the data caches associated with any output in the network.
This has no effect on this type of executor.
Reimplemented from VdfDatalessExecutor.
|
protectedvirtual |
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 |
Duplicates the output data associated with sourceOutput and copies it to destOutput.
Implements VdfExecutorInterface.
|
inlineoverridevirtual |
Factory construction.
Implements VdfExecutorInterface.
Definition at line 70 of file maskedSubExecutor.h.
|
inlinevirtual |
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.
|
inlinevirtual |
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.