Loading...
Searching...
No Matches
networkUtil.h File Reference
+ Include dependency graph for networkUtil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Traversal

Used by clients to traverse networks, e.g., to perform invalidation.

VDF_API bool VdfIsSpeculating (const VdfMaskedOutput &maskedOutput)
 Returns true, if maskedOutput is computed via speculation node.
 
VDF_API bool VdfIsTopologicalSourceNode (const VdfNode &startNode, const VdfNode &nodeToFind, bool *foundSpecNode=nullptr)
 Searches for nodeToFind via topological (ie.
 
VDF_API const VdfOutputVdfGetAssociatedSourceOutput (const VdfOutput &output)
 Returns the output that is the source of the associated input of output, if any and NULL otherwise.
 
VDF_API void VdfEmptyNodeCallback (const VdfNode &)
 Empty callback node, does nothing.
 
template<class Callable >
void VdfTraverseTopologicalSourceNodes (const VdfNode &startNode, Callable &&callback)
 Traverses nodes starting at startNode and moving along its inputs.
 

Function Documentation

◆ VdfEmptyNodeCallback()

VDF_API void VdfEmptyNodeCallback ( const VdfNode )

Empty callback node, does nothing.

◆ VdfGetAssociatedSourceOutput()

VDF_API const VdfOutput * VdfGetAssociatedSourceOutput ( const VdfOutput output)

Returns the output that is the source of the associated input of output, if any and NULL otherwise.

Note that if output does not have an associated input, NULL is returned.

◆ VdfIsSpeculating()

VDF_API bool VdfIsSpeculating ( const VdfMaskedOutput maskedOutput)

Returns true, if maskedOutput is computed via speculation node.

This does an upward traversal of the network and maybe slow.

◆ VdfIsTopologicalSourceNode()

VDF_API bool VdfIsTopologicalSourceNode ( const VdfNode startNode,
const VdfNode nodeToFind,
bool *  foundSpecNode = nullptr 
)

Searches for nodeToFind via topological (ie.

not sparse) input connections starting at startNode. Won't traverse over speculation nodes.

If foundSpecNode is non-null it will be populated when a speculation node has been found while searching for nodeToFind.

◆ VdfTraverseTopologicalSourceNodes()

void VdfTraverseTopologicalSourceNodes ( const VdfNode startNode,
Callable &&  callback 
)

Traverses nodes starting at startNode and moving along its inputs.

Calls callback on visited nodes.

Nodes are guaranteed to be called at most once, though there is no guarantee on the order of traversal.

Definition at line 74 of file networkUtil.h.