HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VdfExecutorDataManager< DerivedClass > Class Template Reference

This class provides functionality to manage the executor specific data associated with each output in the network. More...

#include <executorDataManager.h>

+ Inheritance diagram for VdfExecutorDataManager< DerivedClass >:

Public Types

typedef
Vdf_ExecutorDataManagerTraits
< DerivedClass >::DataHandle 
DataHandle
 
typedef
Vdf_ExecutorDataManagerInterface
< DerivedClass, DataHandle
Base
 

Public Member Functions

Cache Management
const VdfVectorGetInputValue (const VdfConnection &connection, const VdfMask &mask) const
 
VdfVectorGetOutputValueForReading (const DataHandle handle, const VdfMask &mask) const
 
VdfVectorGetOrCreateOutputValueForWriting (const VdfOutput &output, const DataHandle handle) const
 
void SetOutputValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask)
 
bool TakeOutputValue (const VdfOutput &output, VdfVector *value, const VdfMask &mask)
 
void SetReferenceOutputValue (const VdfVector *sourceValue, const VdfId destOutputId) const
 
VdfVectorCreateOutputCache (const VdfOutput &output, VdfExecutorBufferData *bufferData) const
 
void DuplicateOutputData (const VdfOutput &sourceOutput, const VdfOutput &destOutput)
 
void SetComputedOutputMask (VdfExecutorBufferData *bufferData, const VdfMask &mask)
 
Invalidation
bool IsOutputInvalid (const VdfId outputId, const VdfMask &invalidationMask) const
 
bool InvalidateOutput (const VdfOutput &output, const VdfMask &invalidationMask)
 
void Touch (const VdfOutput &output) const
 
void UpdateInvalidationTimestamp (VdfInvalidationTimestamp timestamp)
 
VdfInvalidationTimestamp GetInvalidationTimestamp () const
 
bool HasInvalidationTimestampMismatch (const DataHandle sourceHandle, const DataHandle destHandle) const
 
Buffer Passing
VdfVectorPassBuffer (const VdfOutput &fromOutput, VdfExecutorBufferData *fromBuffer, const VdfOutput &toOutput, VdfExecutorBufferData *toBuffer, const VdfMask &keepMask)
 

Protected Member Functions

 VdfExecutorDataManager ()
 
 ~VdfExecutorDataManager ()=default
 
- Protected Member Functions inherited from Vdf_ExecutorDataManagerInterface< DerivedClass, Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandle >
 Vdf_ExecutorDataManagerInterface ()=default
 
 ~Vdf_ExecutorDataManagerInterface ()=default
 
void _Resize (const VdfNetwork &network)
 
bool _IsValidDataHandle (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
Vdf_ExecutorDataManagerTraits
< DerivedClass >::DataHandle 
_GetOrCreateDataHandle (const VdfId outputId) const
 
Vdf_ExecutorDataManagerTraits
< DerivedClass >::DataHandle 
_GetDataHandle (const VdfId outputId) const
 
VdfExecutorBufferData_GetBufferData (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
VdfExecutorInvalidationData_GetInvalidationData (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
VdfInvalidationTimestamp _GetInvalidationTimestamp (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
void _SetInvalidationTimestamp (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle, VdfInvalidationTimestamp ts)
 
VdfSMBLData_GetSMBLData (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
VdfSMBLData_GetOrCreateSMBLData (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
bool _IsTouched (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
void _Touch (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle) const
 
bool _Untouch (const Vdf_ExecutorDataManagerTraits< DerivedClass >::DataHandlehandle)
 
void _ClearDataForOutput (const VdfOutput &output)
 

Detailed Description

template<typename DerivedClass>
class VdfExecutorDataManager< DerivedClass >

This class provides functionality to manage the executor specific data associated with each output in the network.

The data manager implementations use static polymorphism to dispatch the API on VdfExecutorDataManager. See Vdf_ExecutorDataManagerInterface for which methods are expected to be implemented by the derived classes.

Definition at line 47 of file executorDataManager.h.

Member Typedef Documentation

template<typename DerivedClass>
typedef Vdf_ExecutorDataManagerInterface<DerivedClass, DataHandle> VdfExecutorDataManager< DerivedClass >::Base

The base class type.

Definition at line 64 of file executorDataManager.h.

template<typename DerivedClass>
typedef Vdf_ExecutorDataManagerTraits<DerivedClass>::DataHandle VdfExecutorDataManager< DerivedClass >::DataHandle

The data handle type defined via the specialized traits class.

Definition at line 58 of file executorDataManager.h.

Constructor & Destructor Documentation

template<typename DerivedClass>
VdfExecutorDataManager< DerivedClass >::VdfExecutorDataManager ( )
inlineprotected

Constructor. Note that the invalidation timestamp is initialized to be ahead of the initial timestamp in the VdfExecutorData. This is to allow the executor to correctly identify when data has never been invalidated before.

Definition at line 215 of file executorDataManager.h.

template<typename DerivedClass>
VdfExecutorDataManager< DerivedClass >::~VdfExecutorDataManager ( )
protecteddefault

Prevent destruction via base class pointers (static polymorphism only).

Member Function Documentation

template<typename DerivedClass >
VdfVector * VdfExecutorDataManager< DerivedClass >::CreateOutputCache ( const VdfOutput output,
VdfExecutorBufferData bufferData 
) const

Creates a new cache for an output, given the output data object.

Definition at line 400 of file executorDataManager.h.

template<typename DerivedClass >
void VdfExecutorDataManager< DerivedClass >::DuplicateOutputData ( const VdfOutput sourceOutput,
const VdfOutput destOutput 
)

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

Definition at line 415 of file executorDataManager.h.

template<typename DerivedClass >
const VdfVector * VdfExecutorDataManager< DerivedClass >::GetInputValue ( const VdfConnection connection,
const VdfMask mask 
) const

Returns the input value flowing across the given connection with the given mask. If the the cache is not valid, or if the cache does not contain all the elements in mask, returns NULL. If no output data exists for output, it will not be created.

Definition at line 237 of file executorDataManager.h.

template<typename DerivedClass>
VdfInvalidationTimestamp VdfExecutorDataManager< DerivedClass >::GetInvalidationTimestamp ( ) const
inline

Returns the current invalidation timestamp on this executor.

Definition at line 176 of file executorDataManager.h.

template<typename DerivedClass >
VdfVector * VdfExecutorDataManager< DerivedClass >::GetOrCreateOutputValueForWriting ( const VdfOutput output,
const DataHandle  handle 
) const

Returns a new or existing output value for writing data into.

Definition at line 289 of file executorDataManager.h.

template<typename DerivedClass >
VdfVector * VdfExecutorDataManager< DerivedClass >::GetOutputValueForReading ( const DataHandle  handle,
const VdfMask mask 
) const

Returns the cached value for a given output and mask. If the the cache is not valid, or if the cache does not contain all the elements in mask, returns NULL. If no output data exists for output, it will not be created.

Definition at line 258 of file executorDataManager.h.

template<typename DerivedClass >
bool VdfExecutorDataManager< DerivedClass >::HasInvalidationTimestampMismatch ( const DataHandle  sourceHandle,
const DataHandle  destHandle 
) const

Returns true, if the invalidation timestamps between sourceData and destData do not match, i.e. the source output should be mung buffer locked.

Definition at line 609 of file executorDataManager.h.

template<typename DerivedClass >
bool VdfExecutorDataManager< DerivedClass >::InvalidateOutput ( const VdfOutput output,
const VdfMask invalidationMask 
)

Marks output as invalid.

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

Definition at line 483 of file executorDataManager.h.

template<typename DerivedClass >
bool VdfExecutorDataManager< DerivedClass >::IsOutputInvalid ( const VdfId  outputId,
const VdfMask invalidationMask 
) const

Returns true if the output is already invalid for the given invalidationMask.

Definition at line 460 of file executorDataManager.h.

template<typename DerivedClass >
VdfVector * VdfExecutorDataManager< DerivedClass >::PassBuffer ( const VdfOutput fromOutput,
VdfExecutorBufferData fromBuffer,
const VdfOutput toOutput,
VdfExecutorBufferData toBuffer,
const VdfMask keepMask 
)

This method is called to pass a buffer from fromOutput to toOutput. The keepMask is the mask of elements that fromOutput should keep after the pass.

Returns the cache data that ends up in toOutput.

Definition at line 558 of file executorDataManager.h.

template<typename DerivedClass>
void VdfExecutorDataManager< DerivedClass >::SetComputedOutputMask ( VdfExecutorBufferData bufferData,
const VdfMask mask 
)
inline

Marks the output whose data is bufferData as computed for the entries in mask.

Definition at line 136 of file executorDataManager.h.

template<typename DerivedClass >
void VdfExecutorDataManager< DerivedClass >::SetOutputValue ( const VdfOutput output,
const VdfVector value,
const VdfMask mask 
)

Sets the cached value for a given output, creating the output cache if necessary.

If the output already contains data, it will be merged with the new data as indicated by value and mask.

Definition at line 310 of file executorDataManager.h.

template<typename DerivedClass >
void VdfExecutorDataManager< DerivedClass >::SetReferenceOutputValue ( const VdfVector sourceValue,
const VdfId  destOutputId 
) const

Called to set destOutput's buffer output to be a reference to the sourceValue.

Definition at line 385 of file executorDataManager.h.

template<typename DerivedClass >
bool VdfExecutorDataManager< DerivedClass >::TakeOutputValue ( const VdfOutput output,
VdfVector value,
const VdfMask mask 
)

Transfers ownership of value to the given output, returning true if the transfer of ownership succeeds. If successful, the data manager assumes responsibility for the lifetime of value.

Definition at line 354 of file executorDataManager.h.

template<typename DerivedClass >
void VdfExecutorDataManager< DerivedClass >::Touch ( const VdfOutput output) const

Marks the data at the given output as having been touched by evaluation.

Definition at line 551 of file executorDataManager.h.

template<typename DerivedClass>
void VdfExecutorDataManager< DerivedClass >::UpdateInvalidationTimestamp ( VdfInvalidationTimestamp  timestamp)
inline

Increments the the current invalidation timestamp on this executor.

Definition at line 170 of file executorDataManager.h.


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