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

The interface contract for the static polymorphism used by parallel executor data manager implementations. More...

#include <parallelExecutorDataManagerInterface.h>

Protected Member Functions

 Vdf_ParallelExecutorDataManagerInterface ()
 
virtual ~Vdf_ParallelExecutorDataManagerInterface ()
 
void _Resize (const VdfNetwork &network)
 
bool _IsValidDataHandle (const DataHandle handle) const
 
DataHandle _GetOrCreateDataHandle (const VdfId outputId) const
 
DataHandle _GetDataHandle (const VdfId outputId) const
 
VdfExecutorBufferData_GetPrivateBufferData (const DataHandle handle) const
 
VdfExecutorBufferData_GetScratchBufferData (const DataHandle handle) const
 
VdfExecutorBufferData_GetPublicBufferData (const DataHandle handle) const
 
void _PublishPrivateBufferData (const DataHandle handle) const
 
void _PublishScratchBufferData (const DataHandle handle) const
 
VdfExecutorBufferData_GetTransferredBufferData (const DataHandle handle) const
 
bool _TransferBufferData (const DataHandle handle, VdfVector *value, const VdfMask &mask)
 
void _ResetTransferredBufferData (const DataHandle handle)
 
VdfExecutorInvalidationData_GetInvalidationData (const DataHandle handle) const
 
VdfInvalidationTimestamp _GetInvalidationTimestamp (const DataHandle handle) const
 
void _SetInvalidationTimestamp (const DataHandle handle, VdfInvalidationTimestamp ts)
 
bool _IsTouched (const VdfId outputId) const
 
void _Touch (const VdfId outputId) const
 
bool _Untouch (const VdfId outputId)
 
void _ClearDataForOutput (const VdfOutput &output)
 

Detailed Description

template<typename DerivedClass, typename DataHandle>
class Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >

The interface contract for the static polymorphism used by parallel executor data manager implementations.

Definition at line 30 of file parallelExecutorDataManagerInterface.h.

Constructor & Destructor Documentation

template<typename DerivedClass, typename DataHandle>
Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::Vdf_ParallelExecutorDataManagerInterface ( )
inlineprotected

Allow construction via derived classes, only.

Definition at line 36 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
virtual Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::~Vdf_ParallelExecutorDataManagerInterface ( )
inlineprotectedvirtual

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

Definition at line 40 of file parallelExecutorDataManagerInterface.h.

Member Function Documentation

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_ClearDataForOutput ( const VdfOutput output)
inlineprotected

Clears the executor data for a specific output

Definition at line 231 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
DataHandle Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetDataHandle ( const VdfId  outputId) const
inlineprotected

Returns an existing data handle for the given outputId. This method must return an invalid data handle, if no handle has been created for the given outputId.

Definition at line 72 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfExecutorInvalidationData* Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetInvalidationData ( const DataHandle  handle) const
inlineprotected

Returns the VdfExecutorInvalidationData associated with the given handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 181 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfInvalidationTimestamp Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetInvalidationTimestamp ( const DataHandle  handle) const
inlineprotected

Returns the VdfInvalidationTimestamp associated with the given handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 192 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
DataHandle Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetOrCreateDataHandle ( const VdfId  outputId) const
inlineprotected

Returns an existing data handle, or creates a new one for the given outputId.

This method must always return a valid data handle.

Definition at line 64 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfExecutorBufferData* Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetPrivateBufferData ( const DataHandle  handle) const
inlineprotected

Returns the private VdfExecutorBufferData associated with the given handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 82 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfExecutorBufferData* Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetPublicBufferData ( const DataHandle  handle) const
inlineprotected

Returns the public VdfExecutorBufferData associated with the given handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 104 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfExecutorBufferData* Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetScratchBufferData ( const DataHandle  handle) const
inlineprotected

Returns the scratch VdfExecutorBufferData associated with the given handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 93 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
VdfExecutorBufferData* Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_GetTransferredBufferData ( const DataHandle  handle) const
inlineprotected

Returns the transferred VdfExecutorBufferData associated with the given handle. This method will return nullptr, if no value has been written back to this output.

Note it is undefined behavior to call this method with an invalid data handle.

Definition at line 140 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
bool Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_IsTouched ( const VdfId  outputId) const
inlineprotected

Returns true if the data at the given output has been touched by evaluation.

Definition at line 211 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
bool Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_IsValidDataHandle ( const DataHandle  handle) const
inlineprotected

Returns true if the given data handle is valid, i.e. it is valid to ask for data for this given handle.

Note that attempting to resolve data at an invalid handle need not be supported.

Definition at line 55 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_PublishPrivateBufferData ( const DataHandle  handle) const
inlineprotected

Publishes the private VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData as private data. After this method returns, clients may still read from the private data, but are no longer allowed to mutate it.

Note it is undefined behavior to call this method with an invalid data handle.

Definition at line 117 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_PublishScratchBufferData ( const DataHandle  handle) const
inlineprotected

Publishes the scratch VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData as scratch data. After this method returns, clients may still read from the scratch data, but are no longer allowed to mutate it.

Note it is undefined behavior to call this method with an invalid data handle.

Definition at line 129 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_ResetTransferredBufferData ( const DataHandle  handle)
inlineprotected

Resets the transferred buffer associated with the given handle. If any value has previously been written back to this output, its storage will be freed.

Note it is undefined behavior to call this method with an invalid data handle.

Definition at line 171 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_Resize ( const VdfNetwork network)
inlineprotected

Resize the data manager to accommodate all the outputs in the given network.

Definition at line 45 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_SetInvalidationTimestamp ( const DataHandle  handle,
VdfInvalidationTimestamp  ts 
)
inlineprotected

Sets the invalidation timestamp for the give data handle.

Note that attempting to retrieve data at an invalid handle need not be supported.

Definition at line 202 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
void Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_Touch ( const VdfId  outputId) const
inlineprotected

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

Definition at line 218 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
bool Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_TransferBufferData ( const DataHandle  handle,
VdfVector value,
const VdfMask mask 
)
inlineprotected

Transfers ownership of the value to the output associated with handle. Returns true if the transfer of ownership was successful. If the transfer of ownership was successful, the responsibility of lifetime management for value transfers to this data manager. Otherwise, the call site maintains this responsibility.

Note that only one value can be transferred to each output. Subsequent attempts to transfer will fail for that output.

Note it is undefined behavior to call this method with an invalid data handle.

Definition at line 157 of file parallelExecutorDataManagerInterface.h.

template<typename DerivedClass, typename DataHandle>
bool Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >::_Untouch ( const VdfId  outputId)
inlineprotected

Marks the data at the given output as not having been touched by evaluation. Returns true if the data has previously been touched.

Definition at line 225 of file parallelExecutorDataManagerInterface.h.


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