HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 
VDF_API bool VdfIsTopologicalSourceNode (const VdfNode &startNode, const VdfNode &nodeToFind, bool *foundSpecNode=nullptr)
 
VDF_API const VdfOutputVdfGetAssociatedSourceOutput (const VdfOutput &output)
 
VDF_API void VdfEmptyNodeCallback (const VdfNode &)
 
template<class Callable >
void VdfTraverseTopologicalSourceNodes (const VdfNode &startNode, Callable &&callback)
 

Function Documentation

VDF_API void VdfEmptyNodeCallback ( const VdfNode )

Empty callback node, does nothing.

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.

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.

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.

template<class Callable >
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.