7#ifndef PXR_EXEC_VDF_PARALLEL_DATA_MANAGER_VECTOR_H
8#define PXR_EXEC_VDF_PARALLEL_DATA_MANAGER_VECTOR_H
14#include "pxr/exec/vdf/api.h"
16#include "pxr/exec/vdf/parallelExecutorDataVector.h"
19PXR_NAMESPACE_OPEN_SCOPE
22class VdfExecutorInvalidationData;
106 return _data->GetOrCreateDataHandle(outputId);
115 ? _data->GetDataHandle(outputId)
125 return _data->GetPrivateBufferData(handle);
134 return _data->GetScratchBufferData(handle);
143 return _data->GetPublicBufferData(handle);
155 _data->PublishPrivateBufferData(handle);
167 _data->PublishScratchBufferData(handle);
179 return _data->GetTransferredBufferData(handle);
198 return _data->TransferBufferData(handle, value, mask);
209 _data->ResetTransferredBufferData(handle);
220 return _data->GetInvalidationData(handle);
225 using Base::GetInvalidationTimestamp;
235 return _data->GetInvalidationTimestamp(handle);
246 _data->SetInvalidationTimestamp(handle, timestamp);
253 return _data->IsTouched(outputId);
260 _data->Touch(outputId);
267 return _data->Untouch(outputId);
289 return !_data || _data->GetNumData() == 0;
302PXR_NAMESPACE_CLOSE_SCOPE
This is a data container for executor data managers that uses data stored in vectors indexed by outpu...
size_t DataHandle
The data handle type is an index into the internal data vector.
static const size_t InvalidHandle
This sentinel index denotes an invalid handle.
This object is responsible for storing the executor buffer data, comprised of the executor cache vect...
A VdfMask is placed on connections to specify the data flowing through them.
A VdfNetwork is a collection of VdfNodes and their connections.
This is a data manager for executors that uses data stored in a vector indexed by output ids.
VdfExecutorBufferData * GetScratchBufferData(const DataHandle handle) const
Returns the VdfExecutorBufferData associated with the given handle.
VDF_API void Resize(const VdfNetwork &network)
Resize the data manager to accommodate the given network.
void PublishScratchBufferData(const DataHandle handle) const
Publishes the scratch VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData.
VDF_API void ClearDataForOutput(const VdfId outputId)
Clears the executor data for a specific output.
void Touch(const VdfId outputId) const
Marks the data at the given outputId as having been touched by evaluation.
bool IsValidDataHandle(const DataHandle handle) const
Returns true if the given data handle is valid, i.e.
VdfInvalidationTimestamp GetInvalidationTimestamp(const DataHandle handle) const
Returns the VdfInvalidationTimestamp associated with the given handle.
void ResetTransferredBufferData(const DataHandle handle)
Resets the transferred buffer associated with the given handle.
VdfParallelDataManagerVector()
Constructor.
VDF_API ~VdfParallelDataManagerVector()
Destructor.
VdfExecutorInvalidationData * GetInvalidationData(const DataHandle handle) const
Returns the VdfExecutorInvalidationData associated with the given handle.
void SetInvalidationTimestamp(const DataHandle handle, VdfInvalidationTimestamp timestamp)
Sets the invalidation timestamp for the give data handle.
DataHandle GetOrCreateDataHandle(const VdfId outputId) const
Returns an existing data handle, or creates a new one for the given outputId.
bool Untouch(const VdfId outputId)
Marks the data at the given outputId as not having been touched by evaluation.
VdfExecutorBufferData * GetPrivateBufferData(const DataHandle handle) const
Returns the VdfExecutorBufferData associated with the given handle.
bool IsEmpty() const
Returns true if this data manager is empty.
void PublishPrivateBufferData(const DataHandle handle) const
Publishes the private VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData.
VdfExecutorBufferData * GetTransferredBufferData(const DataHandle handle) const
Returns the transferred VdfExecutorBufferData associated with the given handle.
DataHandle GetDataHandle(const VdfId outputId) const
Returns an existing data handle for the given outputId.
bool IsTouched(const VdfId outputId) const
Returns true if the data at the given outputId has been touched by evaluation.
VdfExecutorBufferData * GetPublicBufferData(const DataHandle handle) const
Returns the VdfExecutorBufferData associated with the given handle.
VDF_API void Clear()
Clears all the data from this manager.
Vdf_ParallelExecutorDataManagerTraits< VdfParallelDataManagerVector >::DataHandle DataHandle
The data handle type from the type traits class.
bool TransferBufferData(const DataHandle handle, VdfVector *value, const VdfMask &mask)
Transfers ownership of the value to the output associated with handle.
VdfParallelExecutorDataManager< VdfParallelDataManagerVector > Base
The base class.
This class provides functionality to manage executor data stored as VdfExecutorData from multiple thr...
This class is used to abstract away knowledge of the cache data used for each node.
uint64_t VdfId
The unique identifier type for Vdf objects.
unsigned int VdfInvalidationTimestamp
Type of the timestamp that identifies the most recent round of invalidation.
Vdf_ParallelExecutorDataVector::DataHandle DataHandle
The data handle type.
Forward definition of the traits class, which will be specialized by the derived data manager impleme...