7 #ifndef PXR_EXEC_EF_LEAF_NODE_INDEXER_H 8 #define PXR_EXEC_EF_LEAF_NODE_INDEXER_H 17 #include <tbb/concurrent_queue.h> 18 #include <tbb/concurrent_unordered_map.h> 19 #include <tbb/concurrent_vector.h> 21 PXR_NAMESPACE_OPEN_SCOPE
61 return index < _nodes.size() ? _nodes[index].node :
nullptr;
68 return index < _nodes.size() ? _nodes[index].output :
nullptr;
75 return index < _nodes.size() ? _nodes[index].mask :
nullptr;
104 tbb::concurrent_unordered_map<VdfIndex, Index> _indices;
108 tbb::concurrent_vector<_LeafNode> _nodes;
112 tbb::concurrent_queue<Index> _freeList;
120 return it != _indices.end() ? it->second :
InvalidIndex;
123 PXR_NAMESPACE_CLOSE_SCOPE
A class that fully represents a connection between two VdfNodes.
const VdfMask * GetSourceMask(Index index) const
Returns the mask at the output a given leaf node index is sourcing data from.
uint32_t Index
Data type of the index.
This is the base class for all nodes in a VdfNetwork.
VdfId GetId() const
Returns the unique id of this node in its network.
A VdfMask is placed on connections to specify the data flowing through them.
void Invalidate()
Invalidate the entire cache.
const VdfOutput * GetSourceOutput(Index index) const
Returns the output a given leaf node index is sourcing data from.
The leaf node indexer tracks leaf nodes added and removed from the network, and associates each leaf ...
A VdfOutput represents an output on a node.
void DidDisconnect(const VdfConnection &connection)
Call this to notify the cache of connections that have been deleted.
size_t GetCapacity() const
Returns the capacity of the indexer, i.e.
const VdfNode * GetNode(Index index) const
Returns the node for a given index.
Index GetIndex(const VdfNode &node) const
Returns an index for a given leaf node.
void DidConnect(const VdfConnection &connection)
Call this to notify the cache of newly added connections.
static constexpr Index InvalidIndex
Sentinel for an invalid index.
static VdfIndex GetIndexFromId(const VdfId id)
Get the node index from the node id.