![]() |
|
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. | |
| VdfExecutorBufferData * | GetBufferData (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. | |
| VdfSMBLData * | GetSMBLData (const DataHandle handle) const |
Returns an existing VdfSMBLData associated with the given handle. | |
| VdfSMBLData * | GetOrCreateSMBLData (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. | |
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.
| typedef size_t DataHandle |
The data handle type is an index into the internal data vectors.
Definition at line 45 of file executorDataVector.h.
| VDF_API ~Vdf_ExecutorDataVector | ( | ) |
Destructor.
| VDF_API void Clear | ( | ) |
Clears all the data in the container.
|
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.
|
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.
|
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.
|
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.
|
inline |
Returns the number of outputs that have data associated with them.
Definition at line 180 of file executorDataVector.h.
|
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.
|
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.
|
inline |
Returns the size of the container.
Definition at line 174 of file executorDataVector.h.
|
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.
|
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.
|
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 Resize | ( | const VdfNetwork & | network | ) |
Resize the vector to be able to accommodate all outputs in the given network.
|
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.
|
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.
|
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.
|
static |
This sentinel index denotes an invalid handle.
Definition at line 49 of file executorDataVector.h.