7#ifndef PXR_EXEC_VDF_EXECUTOR_DATA_MANAGER_INTERFACE_H
8#define PXR_EXEC_VDF_EXECUTOR_DATA_MANAGER_INTERFACE_H
16PXR_NAMESPACE_OPEN_SCOPE
19class VdfExecutorInvalidationData;
32template <
typename DerivedClass,
typename DataHandle>
49 _Self()->Resize(network);
59 return _Self()->IsValidDataHandle(handle);
68 return _Self()->GetOrCreateDataHandle(outputId);
76 return _Self()->GetDataHandle(outputId);
85 return _Self()->GetBufferData(handle);
95 const DataHandle handle)
const {
96 return _Self()->GetInvalidationData(handle);
106 const DataHandle handle)
const {
107 return _Self()->GetInvalidationTimestamp(handle);
116 const DataHandle handle,
118 _Self()->SetInvalidationTimestamp(handle, ts);
129 return _Self()->GetSMBLData(handle);
138 return _Self()->GetOrCreateSMBLData(handle);
148 return _Self()->IsTouched(handle);
157 void _Touch(
const DataHandle handle)
const {
158 _Self()->Touch(handle);
168 return _Self()->Untouch(handle);
174 return _Self()->ClearDataForOutput(output);
180 const DerivedClass * _Self()
const {
181 return static_cast<const DerivedClass *
>(
this);
186 DerivedClass * _Self() {
187 return static_cast<DerivedClass *
>(
this);
192PXR_NAMESPACE_CLOSE_SCOPE
The interface contract for the static polymorphism used by executor data manager implementations.
bool _Untouch(const DataHandle handle)
Marks the data at the given handle as not having been touched by evaluation.
DataHandle _GetOrCreateDataHandle(const VdfId outputId) const
Returns an existing data handle, or creates a new one for the given outputId.
void _Touch(const DataHandle handle) const
Marks the data at the given handle as having been touched by evaluation.
~Vdf_ExecutorDataManagerInterface()=default
Prevent destruction via base class pointers (static polymorphism 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.
VdfExecutorBufferData * _GetBufferData(const DataHandle handle) const
Returns the VdfExecutorBufferData associated with the given handle.
void _SetInvalidationTimestamp(const DataHandle handle, VdfInvalidationTimestamp ts)
Sets the invalidation timestamp for the give data handle.
bool _IsTouched(const DataHandle handle) const
Returns true if the data at the given handle has been touched by evaluation.
VdfInvalidationTimestamp _GetInvalidationTimestamp(const DataHandle handle) const
Returns the VdfInvalidationTimestamp associated with the given handle.
DataHandle _GetDataHandle(const VdfId outputId) const
Returns an existing data handle for the given outputId.
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.
VdfSMBLData * _GetSMBLData(const DataHandle handle) const
Returns an existing VdfSMBLData associated with the given handle.
Vdf_ExecutorDataManagerInterface()=default
Allow construction via derived classes, only.
VdfSMBLData * _GetOrCreateSMBLData(const DataHandle handle) const
Returns an existing VdfSMBLData associated with the given handle or creates a new one of none exists.
This object is responsible for storing the executor buffer data, comprised of the executor cache vect...
A VdfNetwork is a collection of VdfNodes and their connections.
A VdfOutput represents an output on a node.
VdfSMBLData holds per-output data that is meant to be consumed by the executor.
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.