Loading...
Searching...
No Matches
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>

+ Inheritance diagram for Vdf_ParallelExecutorDataManagerInterface< DerivedClass, DataHandle >:

Protected Member Functions

 Vdf_ParallelExecutorDataManagerInterface ()
 Allow construction via derived classes, only.
 
virtual ~Vdf_ParallelExecutorDataManagerInterface ()
 Prevent destruction via base class pointers (static polymorphism only).
 
void _Resize (const VdfNetwork &network)
 Resize the data manager to accommodate all the outputs in the given network.
 
bool _IsValidDataHandle (const DataHandle handle) const
 Returns true if the given data handle is valid, i.e.
 
DataHandle _GetOrCreateDataHandle (const VdfId outputId) const
 Returns an existing data handle, or creates a new one for the given outputId.
 
DataHandle _GetDataHandle (const VdfId outputId) const
 Returns an existing data handle for the given outputId.
 
VdfExecutorBufferData_GetPrivateBufferData (const DataHandle handle) const
 Returns the private VdfExecutorBufferData associated with the given handle.
 
VdfExecutorBufferData_GetScratchBufferData (const DataHandle handle) const
 Returns the scratch VdfExecutorBufferData associated with the given handle.
 
VdfExecutorBufferData_GetPublicBufferData (const DataHandle handle) const
 Returns the public VdfExecutorBufferData associated with the given handle.
 
void _PublishPrivateBufferData (const DataHandle handle) const
 Publishes the private VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData as private data.
 
void _PublishScratchBufferData (const DataHandle handle) const
 Publishes the scratch VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData as scratch data.
 
VdfExecutorBufferData_GetTransferredBufferData (const DataHandle handle) const
 Returns the transferred VdfExecutorBufferData associated with the given handle.
 
bool _TransferBufferData (const DataHandle handle, VdfVector *value, const VdfMask &mask)
 Transfers ownership of the value to the output associated with handle.
 
void _ResetTransferredBufferData (const DataHandle handle)
 Resets the transferred buffer associated with the given handle.
 
VdfExecutorInvalidationData * _GetInvalidationData (const DataHandle handle) const
 Returns the VdfExecutorInvalidationData associated with the given handle.
 
VdfInvalidationTimestamp _GetInvalidationTimestamp (const DataHandle handle) const
 Returns the VdfInvalidationTimestamp associated with the given handle.
 
void _SetInvalidationTimestamp (const DataHandle handle, VdfInvalidationTimestamp ts)
 Sets the invalidation timestamp for the give data handle.
 
bool _IsTouched (const VdfId outputId) const
 Returns true if the data at the given output has been touched by evaluation.
 
void _Touch (const VdfId outputId) const
 Marks the data at the given output as having been touched by evaluation.
 
bool _Untouch (const VdfId outputId)
 Marks the data at the given output as not having been touched by evaluation.
 
void _ClearDataForOutput (const VdfOutput &output)
 Clears the executor data for a specific 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

◆ Vdf_ParallelExecutorDataManagerInterface()

Allow construction via derived classes, only.

Definition at line 36 of file parallelExecutorDataManagerInterface.h.

◆ ~Vdf_ParallelExecutorDataManagerInterface()

virtual ~Vdf_ParallelExecutorDataManagerInterface ( )
inlineprotectedvirtual

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

Definition at line 40 of file parallelExecutorDataManagerInterface.h.

Member Function Documentation

◆ _ClearDataForOutput()

void _ClearDataForOutput ( const VdfOutput output)
inlineprotected

Clears the executor data for a specific output.

Definition at line 231 of file parallelExecutorDataManagerInterface.h.

◆ _GetDataHandle()

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.

◆ _GetInvalidationData()

VdfExecutorInvalidationData * _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.

◆ _GetInvalidationTimestamp()

VdfInvalidationTimestamp _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.

◆ _GetOrCreateDataHandle()

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.

◆ _GetPrivateBufferData()

VdfExecutorBufferData * _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.

◆ _GetPublicBufferData()

VdfExecutorBufferData * _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.

◆ _GetScratchBufferData()

VdfExecutorBufferData * _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.

◆ _GetTransferredBufferData()

VdfExecutorBufferData * _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.

◆ _IsTouched()

bool _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.

◆ _IsValidDataHandle()

bool _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.

◆ _PublishPrivateBufferData()

void _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.

◆ _PublishScratchBufferData()

void _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.

◆ _ResetTransferredBufferData()

void _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.

◆ _Resize()

void _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.

◆ _SetInvalidationTimestamp()

void _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.

◆ _Touch()

void _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.

◆ _TransferBufferData()

bool _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.

◆ _Untouch()

bool _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: