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

A vector-like container for executor data used by the VdfDataManagerVector. Unlike a hash-map, the executor data storage laid out somewhat contiguously in memory, and may therefore be quicker to access. The access pattern during the first round of data access determines the memory layout. More...

#include <executorDataVector.h>

Public Types

typedef size_t DataHandle
 

Public Member Functions

VDF_API ~Vdf_ExecutorDataVector ()
 
VDF_API void Resize (const VdfNetwork &network)
 
DataHandle GetOrCreateDataHandle (const VdfId outputId)
 
DataHandle GetDataHandle (const VdfId outputId) const
 
VdfExecutorBufferDataGetBufferData (const DataHandle handle)
 
VdfExecutorInvalidationDataGetInvalidationData (const DataHandle handle)
 
VdfInvalidationTimestamp GetInvalidationTimestamp (const DataHandle handle) const
 
void SetInvalidationTimestamp (const DataHandle &handle, VdfInvalidationTimestamp ts)
 
VdfSMBLDataGetSMBLData (const DataHandle handle) const
 
VdfSMBLDataGetOrCreateSMBLData (const DataHandle handle)
 
bool IsTouched (const DataHandle handle)
 
void Touch (const DataHandle handle)
 
bool Untouch (const DataHandle handle)
 
size_t GetSize () const
 
size_t GetNumData () const
 
void Reset (const DataHandle handle, const VdfId outputId)
 
VDF_API void Clear ()
 

Static Public Attributes

static const size_t InvalidHandle = size_t(-1)
 

Detailed Description

A vector-like container for executor data used by the VdfDataManagerVector. Unlike a hash-map, the executor data storage laid out somewhat contiguously in memory, and may therefore be quicker to access. The access pattern during the first round of data access determines the memory layout.

Definition at line 39 of file executorDataVector.h.

Member Typedef Documentation

The data handle type is an index into the internal data vectors.

Definition at line 45 of file executorDataVector.h.

Constructor & Destructor Documentation

VDF_API Vdf_ExecutorDataVector::~Vdf_ExecutorDataVector ( )

Destructor.

Member Function Documentation

VDF_API void Vdf_ExecutorDataVector::Clear ( )

Clears all the data in the container.

VdfExecutorBufferData* Vdf_ExecutorDataVector::GetBufferData ( const DataHandle  handle)
inline

Returns the VdfExecutorBufferData associated with the given handle.

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

Definition at line 80 of file executorDataVector.h.

Vdf_ExecutorDataVector::DataHandle Vdf_ExecutorDataVector::GetDataHandle ( const VdfId  outputId) const
inline

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

Definition at line 299 of file executorDataVector.h.

VdfExecutorInvalidationData* Vdf_ExecutorDataVector::GetInvalidationData ( const DataHandle  handle)
inline

Returns the VdfExecutorInvalidationData associated with the given handle.

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

Definition at line 90 of file executorDataVector.h.

VdfInvalidationTimestamp Vdf_ExecutorDataVector::GetInvalidationTimestamp ( const DataHandle  handle) const
inline

Returns the VdfInvalidationTimestamp associated with the given handle.

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

Definition at line 100 of file executorDataVector.h.

size_t Vdf_ExecutorDataVector::GetNumData ( ) const
inline

Returns the number of outputs that have data associated with them.

Definition at line 180 of file executorDataVector.h.

Vdf_ExecutorDataVector::DataHandle Vdf_ExecutorDataVector::GetOrCreateDataHandle ( const VdfId  outputId)
inline

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

This method is guaranteed to return a valid data handle.

Definition at line 254 of file executorDataVector.h.

VdfSMBLData* Vdf_ExecutorDataVector::GetOrCreateSMBLData ( const DataHandle  handle)
inline

Returns an existing VdfSMBLData associated with the given handle or creates a new one of none exists.

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

Definition at line 133 of file executorDataVector.h.

size_t Vdf_ExecutorDataVector::GetSize ( ) const
inline

Returns the size of the container.

Definition at line 174 of file executorDataVector.h.

VdfSMBLData* Vdf_ExecutorDataVector::GetSMBLData ( const DataHandle  handle) const
inline

Returns an existing VdfSMBLData associated with the given handle. Returns nullptr if there is no SMBL data associated with this data handle.

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

Definition at line 123 of file executorDataVector.h.

bool Vdf_ExecutorDataVector::IsTouched ( const DataHandle  handle)
inline

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

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

Definition at line 146 of file executorDataVector.h.

void Vdf_ExecutorDataVector::Reset ( const DataHandle  handle,
const VdfId  outputId 
)
inline

Resets the output data at the given data handle to a newly constructed state. The output with outputId is the new owner of the output data.

Definition at line 326 of file executorDataVector.h.

VDF_API void Vdf_ExecutorDataVector::Resize ( const VdfNetwork network)

Resize the vector to be able to accommodate all outputs in the given network.

void Vdf_ExecutorDataVector::SetInvalidationTimestamp ( const DataHandle handle,
VdfInvalidationTimestamp  ts 
)
inline

Sets the invalidation timestamp for the give data handle.

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

Definition at line 110 of file executorDataVector.h.

void Vdf_ExecutorDataVector::Touch ( const DataHandle  handle)
inline

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

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

Definition at line 156 of file executorDataVector.h.

bool Vdf_ExecutorDataVector::Untouch ( const DataHandle  handle)
inline

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

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

Definition at line 166 of file executorDataVector.h.

Member Data Documentation

const size_t Vdf_ExecutorDataVector::InvalidHandle = size_t(-1)
static

This sentinel index denotes an invalid handle.

Definition at line 49 of file executorDataVector.h.


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