7#ifndef PXR_EXEC_VDF_EXECUTOR_INVALIDATOR_H
8#define PXR_EXEC_VDF_EXECUTOR_INVALIDATOR_H
14#include "pxr/exec/vdf/api.h"
23#include "pxr/base/tf/hashmap.h"
29PXR_NAMESPACE_OPEN_SCOPE
70 explicit _Visited(uint32_t ts) : timestamp(ts), index(0) {}
77 struct _PoolDependency {
83 struct _Dependencies {
93 explicit _ReplayEntry(
const VdfOutput *o) : output(o) {}
101 struct _ReplayCache {
102 std::vector<_ReplayEntry> entries;
108 using _VisitedMap = std::vector<_Visited>;
111 using _OutputStack = std::vector<VdfMaskedOutput>;
114 using _PoolQueue = std::map<const VdfPoolChainIndex, VdfMaskedOutput>;
117 bool _IsInvalid(
const VdfMaskedOutputVector &request)
const;
121 _ReplayCache* _GetReplayCache(
const VdfMaskedOutputVector &outputs);
127 uint32_t *_Visit(
const VdfMaskedOutput &maskedOutput, uint32_t nextIndex);
131 const VdfMaskedOutputVector &request,
132 _ReplayCache *replayCache);
135 bool _TraverseOutput(
143 bool _Replay(
const _ReplayCache &replayCache);
147 const _Dependencies &_GetDependencies(
151 void _ComputeDependencies(
153 _Dependencies *dependencies);
159 _VisitedMap _visited;
166 using _DependencyMap = TfHashMap<
168 _DependencyMap _dependencyMap;
173 _ReplayLRU _replayLRU;
182PXR_NAMESPACE_CLOSE_SCOPE
This is a small-vector class with local storage optimization, the local storage can be specified via ...
Abstract base class for classes that execute a VdfNetwork to compute a requested set of values.
Invalidates state and temporary buffers of all outputs dependent on the outputs supplied in the inval...
VDF_API void Invalidate(const VdfMaskedOutputVector &request)
Invalidate all the outputs in the request, as well as all the outputs dependent on the request.
VdfExecutorInvalidator(VdfExecutorInterface *executor)
Construct an executor invalidator for the given executor.
VDF_API void Reset()
Reset the internal state of the invalidator.
A simple cache with a fixed capacity and a least-recently-used eviction policy.
A VdfMask is placed on connections to specify the data flowing through them.
Memoizes the results of mask append (union) operations.
Class to hold on to an externally owned output and a mask.
A VdfOutput represents an output on a node.
Opaque pool chain index type.
TfHashMap< const VdfNode *, VdfInputPtrVector, TfHash > VdfNodeToInputPtrVectorMap
A map from node pointer to VdfInputPtrVector.
Hashing functor for VdfMaskedOutputVectors.