7#ifndef PXR_EXEC_VDF_PARALLEL_EXECUTOR_DATA_MANAGER_INTERFACE_H
8#define PXR_EXEC_VDF_PARALLEL_EXECUTOR_DATA_MANAGER_INTERFACE_H
14PXR_NAMESPACE_OPEN_SCOPE
17class VdfExecutorInvalidationData;
29template <
typename DerivedClass,
typename DataHandle>
46 _Self()->Resize(network);
56 return _Self()->IsValidDataHandle(handle);
65 return _Self()->GetOrCreateDataHandle(outputId);
73 return _Self()->GetDataHandle(outputId);
83 const DataHandle handle)
const {
84 return _Self()->GetPrivateBufferData(handle);
94 const DataHandle handle)
const {
95 return _Self()->GetScratchBufferData(handle);
105 const DataHandle handle)
const {
106 return _Self()->GetPublicBufferData(handle);
118 _Self()->PublishPrivateBufferData(handle);
130 _Self()->PublishScratchBufferData(handle);
141 const DataHandle handle)
const {
142 return _Self()->GetTransferredBufferData(handle);
158 const DataHandle handle,
161 return _Self()->TransferBufferData(handle, value, mask);
172 _Self()->ResetTransferredBufferData(handle);
182 const DataHandle handle)
const {
183 return _Self()->GetInvalidationData(handle);
193 const DataHandle handle)
const {
194 return _Self()->GetInvalidationTimestamp(handle);
203 const DataHandle handle,
205 _Self()->SetInvalidationTimestamp(handle, ts);
212 return _Self()->IsTouched(outputId);
219 _Self()->Touch(outputId);
226 return _Self()->Untouch(outputId);
232 return _Self()->ClearDataForOutput(output);
238 const DerivedClass * _Self()
const {
239 return static_cast<const DerivedClass *
>(
this);
244 DerivedClass * _Self() {
245 return static_cast<DerivedClass *
>(
this);
250PXR_NAMESPACE_CLOSE_SCOPE
The interface contract for the static polymorphism used by parallel executor data manager implementat...
void _ResetTransferredBufferData(const DataHandle handle)
Resets the transferred buffer 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.
VdfExecutorBufferData * _GetScratchBufferData(const DataHandle handle) const
Returns the scratch VdfExecutorBufferData associated with the given handle.
Vdf_ParallelExecutorDataManagerInterface()
Allow construction via derived classes, only.
void _Resize(const VdfNetwork &network)
Resize the data manager to accommodate all the outputs in the given network.
VdfExecutorInvalidationData * _GetInvalidationData(const DataHandle handle) const
Returns the VdfExecutorInvalidationData associated with the given handle.
void _SetInvalidationTimestamp(const DataHandle handle, VdfInvalidationTimestamp ts)
Sets the invalidation timestamp for the give data handle.
void _Touch(const VdfId outputId) const
Marks the data at the given output as having been touched by evaluation.
VdfExecutorBufferData * _GetPrivateBufferData(const DataHandle handle) const
Returns the private VdfExecutorBufferData associated with the given handle.
bool _IsTouched(const VdfId outputId) const
Returns true if the data at the given output has been touched by evaluation.
void _PublishPrivateBufferData(const DataHandle handle) const
Publishes the private VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData ...
VdfExecutorBufferData * _GetPublicBufferData(const DataHandle handle) const
Returns the public VdfExecutorBufferData associated with the given handle.
VdfInvalidationTimestamp _GetInvalidationTimestamp(const DataHandle handle) const
Returns the VdfInvalidationTimestamp associated with the given handle.
virtual ~Vdf_ParallelExecutorDataManagerInterface()
Prevent destruction via base class pointers (static polymorphism only).
DataHandle _GetDataHandle(const VdfId outputId) const
Returns an existing data handle for the given outputId.
void _PublishScratchBufferData(const DataHandle handle) const
Publishes the scratch VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData ...
void _ClearDataForOutput(const VdfOutput &output)
Clears the executor data for a specific output.
bool _IsValidDataHandle(const DataHandle handle) const
Returns true if the given data handle is valid, i.e.
VdfExecutorBufferData * _GetTransferredBufferData(const DataHandle handle) const
Returns the transferred VdfExecutorBufferData associated with the given handle.
bool _TransferBufferData(const DataHandle handle, VdfVector *value, const VdfMask &mask)
Transfers ownership of the value to the output associated with handle.
bool _Untouch(const VdfId outputId)
Marks the data at the given output as not having been touched by evaluation.
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.
A VdfOutput represents an output on a node.
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.