7 #ifndef PXR_EXEC_VDF_DATA_MANAGER_VECTOR_H 8 #define PXR_EXEC_VDF_DATA_MANAGER_VECTOR_H 14 #include "pxr/exec/vdf/api.h" 19 PXR_NAMESPACE_OPEN_SCOPE
38 template<VdfDataManagerDeallocationMode DeallocationMode>
41 class VdfExecutorInvalidationData;
52 template<VdfDataManagerDeallocationMode Mode>
93 template<VdfDataManagerDeallocationMode DeallocationMode>
237 _data->
Touch(handle);
274 template<VdfDataManagerDeallocationMode DeallocationMode>
278 Vdf_DataManagerVectorDeallocateNow(_data);
280 Vdf_DataManagerVectorDeallocateLater(_data);
284 template<VdfDataManagerDeallocationMode DeallocationMode>
295 _data->Resize(network);
299 template<VdfDataManagerDeallocationMode DeallocationMode>
302 const VdfId outputId)
306 const DataHandle dataHandle = _data->GetDataHandle(outputId);
307 if (IsValidDataHandle(dataHandle)) {
308 _data->Reset(dataHandle, outputId);
313 template<VdfDataManagerDeallocationMode DeallocationMode>
323 PXR_NAMESPACE_CLOSE_SCOPE
A VdfNetwork is a collection of VdfNodes and their connections.
void SetInvalidationTimestamp(const DataHandle &handle, VdfInvalidationTimestamp ts)
Sets the invalidation timestamp for the give data handle.
VdfDataManagerVector()
Constructor.
void Resize(const VdfNetwork &network)
Resize the data manager to accommodate the given network.
VDF_API Vdf_ExecutorDataVector * Vdf_DataManagerVectorAllocate(const VdfNetwork &network)
Private functions for memory management strategies.
VdfExecutorInvalidationData * GetInvalidationData(const DataHandle handle)
Returns the VdfExecutorInvalidationData associated with the given handle.
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.
This class provides functionality to manage the executor specific data associated with each output in...
VdfExecutorBufferData * GetBufferData(const DataHandle handle) const
Returns the VdfExecutorBufferData associated with the given handle.
VdfExecutorDataManager< VdfDataManagerVector > Base
The base class.
This is a data manager for executors that uses data stored in a vector indexed by output ids.
VdfSMBLData * GetSMBLData(const DataHandle handle) const
Returns an existing VdfSMBLData associated with the given handle.
bool IsValidDataHandle(const DataHandle handle) const
Returns true if the given data handle is valid, i.e.
bool Untouch(const DataHandle handle)
Marks the data at the given handle as not having been touched by evaluation.
bool Untouch(const DataHandle handle)
Marks the data at the given handle as not having been touched by evaluation.
void Clear()
Clears all the data from this manager.
VdfSMBLData holds per-output data that is meant to be consumed by the executor.
DataHandle GetOrCreateDataHandle(const VdfId outputId)
Returns an existing data handle, or creates a new one for the given output.
VdfSMBLData * GetSMBLData(const DataHandle handle) const
Returns an existing VdfSMBLData associated with the given handle.
~VdfDataManagerVector()
Destructor.
This object is responsible for storing the executor buffer data, comprised of the executor cache vect...
size_t GetNumData() const
Returns the number of outputs that have data associated with them.
bool IsEmpty() const
Returns true if this data manager is empty.
Vdf_ExecutorDataManagerTraits< VdfDataManagerVector >::DataHandle DataHandle
The data handle type from the type traits class.
Deallocate in the background.
VdfExecutorBufferData * GetBufferData(const DataHandle handle)
Returns the VdfExecutorBufferData associated with the given handle.
VdfExecutorInvalidationData * GetInvalidationData(const DataHandle handle) const
Returns the VdfExecutorInvalidationData associated with the given handle.
DataHandle GetDataHandle(const VdfId outputId) const
Returns an existing data handle for the given output.
A VdfOutput represents an output on a node.
VdfSMBLData * GetOrCreateSMBLData(const DataHandle handle)
Returns an existing VdfSMBLData associated with the given handle or creates a new one of none exists.
A vector-like container for executor data used by the VdfDataManagerVector.
VdfInvalidationTimestamp GetInvalidationTimestamp(const DataHandle handle) const
Returns the VdfInvalidationTimestamp associated with the given handle.
void Touch(const DataHandle handle)
Marks the data at the given handle as having been touched by evaluation.
bool IsTouched(const DataHandle handle) const
Returns true if the data at the given handle has been touched by evaluation.
unsigned int VdfInvalidationTimestamp
Type of the timestamp that identifies the most recent round of invalidation.
void Touch(const DataHandle handle) const
Marks the data at the given handle as having been touched by evaluation.
void SetInvalidationTimestamp(const DataHandle handle, VdfInvalidationTimestamp timestamp)
Sets the invalidation timestamp for the give data handle.
VdfInvalidationTimestamp GetInvalidationTimestamp() const
Returns the current invalidation timestamp on this executor.
void ClearDataForOutput(const VdfId outputId)
Clears the buffer data for a specific output.
VdfSMBLData * GetOrCreateSMBLData(const DataHandle handle) const
Returns an existing VdfSMBLData associated with the given handle or creates a new one of none exists.
static const size_t InvalidHandle
This sentinel index denotes an invalid handle.
VdfInvalidationTimestamp GetInvalidationTimestamp(const DataHandle handle) const
Returns the VdfInvalidationTimestamp associated with the given handle.
bool IsTouched(const DataHandle handle)
Returns true if the data at the given handle has been touched by evaluation.
Forward definition of the traits class, which will be specialized by the derived data manager impleme...
VdfDataManagerDeallocationMode
Enum representing the deallocation strategy for the data manager.
size_t DataHandle
The data handle type is an index into the internal data vectors.
uint64_t VdfId
The unique identifier type for Vdf objects.