7#ifndef PXR_EXEC_VDF_SPARSE_VECTORIZED_OUTPUT_TRAVERSER_H
8#define PXR_EXEC_VDF_SPARSE_VECTORIZED_OUTPUT_TRAVERSER_H
14#include "pxr/exec/vdf/api.h"
22#include <tbb/concurrent_unordered_map.h>
28PXR_NAMESPACE_OPEN_SCOPE
55 const VdfMaskedOutputVector &outputs,
66 struct _PoolDependency {
72 struct _Dependencies {
81 struct _OutputAndMask {
88 using _VisitedOutputs =
89 TfHashMap<const VdfOutput *, const VdfMask *, TfHash>;
92 using _OutputStack = std::vector<_OutputAndMask>;
95 using _PoolQueue = std::map<const VdfPoolChainIndex, _OutputAndMask>;
100 const _OutputAndMask &outputAndMask,
101 _VisitedOutputs *visitedOutputs);
110 void _TraverseOutput(
112 const _OutputAndMask &outputAndMask,
118 void _QueuePoolOutput(
120 const _OutputAndMask &outputAndMask,
124 bool _TakePoolShortcut(
125 const _OutputAndMask &outputAndMask,
130 const _Dependencies &_GetDependencies(
131 const _OutputAndMask &outputAndMask);
134 void _ComputeDependencies(
135 const _OutputAndMask &outputAndMask,
136 _Dependencies *dependencies);
139 using _DependencyMap = tbb::concurrent_unordered_map<
141 _DependencyMap _dependencyMap;
147PXR_NAMESPACE_CLOSE_SCOPE
This is a small-vector class with local storage optimization, the local storage can be specified via ...
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.
This is the base class for all nodes in a VdfNetwork.
A VdfOutput represents an output on a node.
Opaque pool chain index type.
Traverses a VdfNetwork in the input-to-output direction, while treating each output in the traversal ...
std::function< bool(const VdfNode &, size_t)> NodeCallback
The callback invoked for all all terminal nodes.
VDF_API void Traverse(const VdfMaskedOutputVector &outputs, const NodeCallback &callback)
Starts a traversal with the given outputs request and node callback.
VDF_API void Invalidate()
Invalidate the internal traversal cache.