7 #ifndef PXR_EXEC_VDF_DATA_MANAGER_HASH_TABLE_H
8 #define PXR_EXEC_VDF_DATA_MANAGER_HASH_TABLE_H
25 #include <unordered_map>
46 invalidationTimestamp(
83 using _DataMap = std::unordered_map<VdfId, _OutputData, TfHash>;
113 return handle !=
nullptr;
122 _DataMap::iterator it = _outputData.find(outputId);
123 if (it == _outputData.end()) {
124 it = _outputData.emplace(
125 std::piecewise_construct,
126 std::forward_as_tuple(outputId),
127 std::forward_as_tuple())
147 return &handle->bufferData;
158 return &handle->invalidationData;
173 return handle->invalidationTimestamp;
184 handle->invalidationTimestamp = timestamp;
195 return handle->smblData.get();
205 if (!handle->smblData) {
208 return handle->smblData.get();
218 return handle->touched;
228 handle->touched =
true;
238 const bool wasTouched = handle->touched;
239 handle->touched =
false;
246 _outputData.erase(outputId);
258 return _outputData.empty();
265 mutable _DataMap _outputData;
VdfInvalidationTimestamp invalidationTimestamp
bool Untouch(const DataHandle handle)
bool IsTouched(const DataHandle handle) const
VdfInvalidationTimestamp GetInvalidationTimestamp() const
VdfExecutorBufferData bufferData
VdfExecutorDataManager< VdfDataManagerHashTable > Base
#define PXR_NAMESPACE_OPEN_SCOPE
VdfExecutorBufferData * GetBufferData(const DataHandle handle) const
VdfInvalidationTimestamp GetInvalidationTimestamp(const DataHandle handle) const
VdfSMBLData * GetOrCreateSMBLData(const DataHandle handle) const
DataHandle GetDataHandle(const VdfId outputId) const
This class provides functionality to manage the executor specific data associated with each output in...
VdfSMBLData * GetSMBLData(const DataHandle handle) const
This is a data manager for executors that uses data stored in an external hash table.
Container::mapped_type * TfMapLookupPtr(Container &map, Key const &key)
VdfSMBLData holds per-output data that is meant to be consumed by the executor. This data is an optio...
void ClearDataForOutput(const VdfId outputId)
This object is responsible for storing the executor buffer data, comprised of the executor cache vect...
Vdf_ExecutorDataManagerTraits< VdfDataManagerHashTable >::DataHandle DataHandle
void Touch(const DataHandle handle) const
VDF_API void Resize(const VdfNetwork &network)
VdfExecutorInvalidationData * GetInvalidationData(const DataHandle handle) const
bool IsValidDataHandle(const DataHandle handle) const
void SetInvalidationTimestamp(const DataHandle handle, VdfInvalidationTimestamp timestamp)
unsigned int VdfInvalidationTimestamp
Type of the timestamp that identifies the most recent round of invalidation.
#define PXR_NAMESPACE_CLOSE_SCOPE
DataHandle GetOrCreateDataHandle(const VdfId outputId) const
VdfExecutorInvalidationData invalidationData
std::unique_ptr< VdfSMBLData > smblData
uint64_t VdfId
The unique identifier type for Vdf objects.