Loading...
Searching...
No Matches
Vdf_ExecutorDataVector Class Reference

A vector-like container for executor data used by the VdfDataManagerVector. More...

#include <executorDataVector.h>

Public Types

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

Public Member Functions

VDF_API ~Vdf_ExecutorDataVector ()
 Destructor.
 
VDF_API void Resize (const VdfNetwork &network)
 Resize the vector to be able to accommodate all outputs in the given network.
 
DataHandle GetOrCreateDataHandle (const VdfId outputId)
 Returns an existing data handle, or creates a new one for the given output.
 
DataHandle GetDataHandle (const VdfId outputId) const
 Returns an existing data handle for the given output.
 
VdfExecutorBufferDataGetBufferData (const DataHandle handle)
 Returns the VdfExecutorBufferData associated with the given handle.
 
VdfExecutorInvalidationData * GetInvalidationData (const DataHandle handle)
 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.
 
VdfSMBLDataGetSMBLData (const DataHandle handle) const
 Returns an existing VdfSMBLData associated with the given handle.
 
VdfSMBLDataGetOrCreateSMBLData (const DataHandle handle)
 Returns an existing VdfSMBLData associated with the given handle or creates a new one of none exists.
 
bool IsTouched (const DataHandle handle)
 Returns true if the data at the given handle has been touched by evaluation.
 
void Touch (const DataHandle handle)
 Marks the data at the given handle as having been touched by evaluation.
 
bool Untouch (const DataHandle handle)
 Marks the data at the given handle as not having been touched by evaluation.
 
size_t GetSize () const
 Returns the size of the container.
 
size_t GetNumData () const
 Returns the number of outputs that have data associated with them.
 
void Reset (const DataHandle handle, const VdfId outputId)
 Resets the output data at the given data handle to a newly constructed state.
 
VDF_API void Clear ()
 Clears all the data in the container.
 

Static Public Attributes

static const size_t InvalidHandle = size_t(-1)
 This sentinel index denotes an invalid handle.
 

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

◆ DataHandle

typedef size_t DataHandle

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

Definition at line 45 of file executorDataVector.h.

Constructor & Destructor Documentation

◆ ~Vdf_ExecutorDataVector()

VDF_API ~Vdf_ExecutorDataVector ( )

Destructor.

Member Function Documentation

◆ Clear()

VDF_API void Clear ( )

Clears all the data in the container.

◆ GetBufferData()

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

◆ GetDataHandle()

Vdf_ExecutorDataVector::DataHandle 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.

◆ GetInvalidationData()

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

◆ GetInvalidationTimestamp()

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

◆ GetNumData()

size_t GetNumData ( ) const
inline

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

Definition at line 180 of file executorDataVector.h.

◆ GetOrCreateDataHandle()

Vdf_ExecutorDataVector::DataHandle 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.

◆ GetOrCreateSMBLData()

VdfSMBLData * 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.

◆ GetSize()

size_t GetSize ( ) const
inline

Returns the size of the container.

Definition at line 174 of file executorDataVector.h.

◆ GetSMBLData()

VdfSMBLData * 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.

◆ IsTouched()

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

◆ Reset()

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

◆ Resize()

VDF_API void Resize ( const VdfNetwork network)

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

◆ SetInvalidationTimestamp()

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

◆ Touch()

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

◆ Untouch()

bool 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

◆ InvalidHandle

const size_t 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: