Loading...
Searching...
No Matches
VdfNode Class Referenceabstract

This is the base class for all nodes in a VdfNetwork. More...

#include <node.h>

+ Inheritance diagram for VdfNode:

Public Member Functions

 TF_MALLOC_TAG_NEW ("Vdf", "new VdfNode")
 
VDF_API VdfNode (VdfNetwork *network, const VdfInputSpecs &inputSpecs, const VdfOutputSpecs &outputSpecs)
 Constructs a node in network with the inputs described by inputSpecs and outputs described by outputSpecs.
 
VdfId GetId () const
 Returns the unique id of this node in its network.
 
const VdfNetworkGetNetwork () const
 Returns the network to which this node belongs.
 
VdfNetworkGetNetwork ()
 Returns the network to which this node belongs.
 
template<typename TYPE >
bool IsA () const
 Returns true, if this node is of type TYPE.
 
VDF_API bool IsEqual (const VdfNode &rhs) const
 Returns true, if rhs and this node compute the same value(s).
 
Dataflow network management - Input API
const VdfInputSpecsGetInputSpecs () const
 Returns the list of input specs.
 
const VdfInputGetInput (const TfToken &inputName) const
 Returns the connector named inputName, returns NULL if no input of that name exists.
 
VDF_API VdfInputGetInput (const TfToken &inputName)
 Returns the input named inputName, returns NULL if no input of that name exists.
 
const InputMapIterator GetInputsIterator () const
 Returns an iterator class that can be used with TF_FOR_ALL to iterate through the inputs.
 
bool HasInputConnections () const
 Returns true if the node has input connections, false otherwise.
 
bool HasOutputConnections () const
 Returns true if the node has output connections, false otherwise.
 
VDF_API VdfConnectionVector GetInputConnections () const
 Returns a flat vector of all input connections.
 
VDF_API VdfConnectionVector GetOutputConnections () const
 Returns a flat vector of all output connections.
 
Dataflow network management - Output API
const VdfOutputSpecsGetOutputSpecs () const
 Returns the list of output specs.
 
const VdfOutputGetOutput (const TfToken &name) const
 Returns the output object named name.
 
VDF_API VdfOutputGetOutput (const TfToken &name)
 Returns the output object named name.
 
VDF_API VdfOutputGetOptionalOutput (const TfToken &name)
 Returns the output object named name.
 
const VdfOutputGetOptionalOutput (const TfToken &name) const
 Returns the output object named name.
 
const VdfOutputGetOutput () const
 Returns the only output object that this node contains.
 
VDF_API VdfOutputGetOutput ()
 Returns the only output object that this node contains.
 
const OutputMapIterator GetOutputsIterator () const
 Returns an iterator class that can be used with TF_FOR_ALL to iterator through the output connectors.
 
size_t GetNumOutputs () const
 Returns the number of outputs that this node currently has.
 
size_t GetNumInputs () const
 Returns the number of inputs that this node currently has.
 
Diagnostic API
VDF_API void SetDebugName (const std::string &name)
 Sets the debug name for this node.
 
template<class F >
void SetDebugNameCallback (F &&f)
 Sets the debug name for this node with a lazily invoked callback.
 
VDF_API void SetDebugNameCallback (VdfNodeDebugNameCallback &&callback)
 Sets the debug name for this node with a lazily invoked callback.
 
VDF_API const std::string GetDebugName () const
 Returns the debug name for this node, if one is registered.
 
virtual VDF_API size_t GetMemoryUsage () const
 Returns the amount of memory used by the node in bytes.
 
VdfExecutor API
virtual void Compute (const VdfContext &context) const =0
 This is the method called to perform computation.
 
virtual VDF_API bool IsSpeculationNode () const
 Returns true if this node performs speculation.
 
virtual VDF_API VdfRequiredInputsPredicate GetRequiredInputsPredicate (const VdfContext &context) const
 Returns a predicate, determining whether a given input and its connections are required in order to fulfill this node's input dependencies.
 
VDF_API VdfMask ComputeOutputDependencyMask (const VdfConnection &inputConnection, const VdfMask &inputDependencyMask, const VdfOutput &output) const
 Returns a mask that indicates which elements of the data that flows along output depend on the elements indicated by inputDependencyMask that flow in via inputConnection.
 
VDF_API void ComputeOutputDependencyMasks (const VdfConnection &inputConnection, const VdfMask &inputDependencyMask, VdfMaskedOutputVector *outputDependencies) const
 Vectorized version of ComputeOutputDependencyMask.
 
VDF_API VdfMask::Bits ComputeInputDependencyMask (const VdfMaskedOutput &maskedOutput, const VdfConnection &inputConnection) const
 Returns a mask that indicates which elements of the data that flows along inputConnection are needed to compute the data flowing out as indicated by maskedOutput.
 
VDF_API VdfConnectionAndMaskVector ComputeInputDependencyMasks (const VdfMaskedOutput &maskedOutput, bool skipAssociatedInputs) const
 Vectorized version of ComputeInputDependencyMask.
 
VDF_API VdfConnectionAndMaskVector ComputeInputDependencyRequest (const VdfMaskedOutputVector &request) const
 Vectorized version of ComputeInputDependencyMasks().
 

Static Public Member Functions

static VdfIndex GetIndexFromId (const VdfId id)
 Get the node index from the node id.
 
static VdfVersion GetVersionFromId (const VdfId id)
 Get the node version from the node id.
 

Protected Member Functions

VDF_API VdfNode (VdfNetwork *network)
 Protected constructor.
 
VDF_API void _AppendInputs (const VdfInputSpecs &inputSpecs, std::vector< VdfInput * > *resultingInputs=NULL)
 Builds inputs from the supplied input specs and appends them to the already-existing set of inputs, if any.
 
VDF_API void _AppendOutputs (const VdfOutputSpecs &outputSpecs, std::vector< VdfOutput * > *resultingOutputs=NULL)
 Builds outputs from the supplied output specs and appends them to the already-existing set of outputs, if any.
 
virtual VDF_API bool _IsDerivedEqual (const VdfNode &rhs) const
 Can be overridden by derived classes to facilitate equality comparision.
 
virtual VDF_API void _DidAddInputConnection (const VdfConnection *c, int atIndex)
 Notifies a node that one connection has been added.
 
virtual VDF_API void _WillRemoveInputConnection (const VdfConnection *c)
 Notifies a node that one connection will be removed.
 
virtual VDF_API ~VdfNode ()
 Protected Destructor.
 
void _SetId (const VdfVersion version, const VdfIndex index)
 Sets the node id.
 
virtual VDF_API VdfMask _ComputeOutputDependencyMask (const VdfConnection &inputConnection, const VdfMask &inputDependencyMask, const VdfOutput &output) const
 Returns a mask that indicates which elements of the data that flows along output depend on the elements indicated by inputDependencyMask that flow in via inputConnection.
 
virtual VDF_API bool _ComputeOutputDependencyMasks (const VdfConnection &inputConnection, const VdfMask &inputDependencyMask, VdfMaskedOutputVector *outputDependencies) const
 Vectorized version of _ComputeOutputDependencyMask.
 
virtual VDF_API VdfConnectionAndMaskVector _ComputeInputDependencyRequest (const VdfMaskedOutputVector &request) const
 Vectorized version of _ComputeOutputDependencyMasks.
 
virtual VDF_API VdfMask::Bits _ComputeInputDependencyMask (const VdfMaskedOutput &maskedOutput, const VdfConnection &inputConnection) const
 Returns a mask that indicates which elements of the data that flows along inputConnection are needed to compute the data flowing out as indicated by maskedOutput.
 
virtual VDF_API VdfConnectionAndMaskVector _ComputeInputDependencyMasks (const VdfMaskedOutput &maskedOutput, bool skipAssociatedInputs) const
 Vectorized version of _ComputeInputDependencyMask.
 
VdfInputAndOutputSpecs management
virtual VDF_API const VdfInputAndOutputSpecs_AcquireInputAndOutputSpecsPointer (const VdfInputSpecs &inputSpecs, const VdfOutputSpecs &outputSpecs)
 Gets an input/output specs pointer that the node can use.
 
virtual VDF_API void _ReleaseInputAndOutputSpecsPointer (const VdfInputAndOutputSpecs *specs)
 Releases an input/output specs pointer that was acquired with a previous call to _AcquireInputAndOutputSpecsPointer().
 
VDF_API void _InitializeInputAndOutputSpecs (const VdfInputAndOutputSpecs *specs)
 Initializes the input/output specs pointer for this node.
 
VDF_API void _ClearInputAndOutputSpecsPointer ()
 Clears the input/output specs pointer.
 
VDF_API void _ReplaceInputSpecs (const VdfInputSpecs &inputSpecs)
 Replaces the node's input specs with inputSpecs and rebuilds all inputs.
 

Static Protected Member Functions

template<typename BaseClassType , typename ClassType >
static size_t _GetMemoryUsage (const ClassType &c, size_t dynamicSize)
 Helper method for determining the amount of memory that a node uses.
 

Friends

class VdfNetwork
 

Detailed Description

This is the base class for all nodes in a VdfNetwork.

Definition at line 52 of file node.h.

Constructor & Destructor Documentation

◆ VdfNode() [1/2]

VDF_API VdfNode ( VdfNetwork network,
const VdfInputSpecs inputSpecs,
const VdfOutputSpecs outputSpecs 
)

Constructs a node in network with the inputs described by inputSpecs and outputs described by outputSpecs.

◆ VdfNode() [2/2]

VDF_API VdfNode ( VdfNetwork network)
protected

Protected constructor.

Can be used by derived classes that want to manage their own storage for input/output specs.

The derived constructor should call _InitializeInputAndOutputSpecs because this version of the constructor won't do it.

◆ ~VdfNode()

virtual VDF_API ~VdfNode ( )
protectedvirtual

Protected Destructor.

Only the network is allowed to destroy nodes.

Member Function Documentation

◆ _AcquireInputAndOutputSpecsPointer()

virtual VDF_API const VdfInputAndOutputSpecs * _AcquireInputAndOutputSpecsPointer ( const VdfInputSpecs inputSpecs,
const VdfOutputSpecs outputSpecs 
)
protectedvirtual

Gets an input/output specs pointer that the node can use.

This is virtual so that a derived class may specify exactly where the storage comes from. This function is not called during performance-critical code-paths.

Reimplemented in VdfExtensibleNode.

◆ _AppendInputs()

VDF_API void _AppendInputs ( const VdfInputSpecs inputSpecs,
std::vector< VdfInput * > *  resultingInputs = NULL 
)
protected

Builds inputs from the supplied input specs and appends them to the already-existing set of inputs, if any.

Pointers to the newly-created VdfInputs are appended to resultingInputs, if resultingInputs is not NULL.

◆ _AppendOutputs()

VDF_API void _AppendOutputs ( const VdfOutputSpecs outputSpecs,
std::vector< VdfOutput * > *  resultingOutputs = NULL 
)
protected

Builds outputs from the supplied output specs and appends them to the already-existing set of outputs, if any.

Pointers to the newly-created VdfOutputs are appended to resultingInputs, if resultingOutputs is not NULL.

◆ _ClearInputAndOutputSpecsPointer()

VDF_API void _ClearInputAndOutputSpecsPointer ( )
protected

Clears the input/output specs pointer.

This can be used in the destructor of derived classes to avoid having their own storage for the input/output specs go through the default destruction pattern of the base class.

◆ _ComputeInputDependencyMask()

virtual VDF_API VdfMask::Bits _ComputeInputDependencyMask ( const VdfMaskedOutput maskedOutput,
const VdfConnection inputConnection 
) const
protectedvirtual

Returns a mask that indicates which elements of the data that flows along inputConnection are needed to compute the data flowing out as indicated by maskedOutput.

This is only called from ComputeInputDependencyMask(), to handle non-associated inputs.

The default implementation returns the connection mask on inputConnection, indicating that all elements are required. Derived classes can override this method in order to make the resulting dependencies more sparse.

This method should always return a mask that is a subset of the connection mask on inputConnection or an empty mask to indicate no dependencies.

Derived classes must ensure that this method is thread safe, in the sense that _ComputeInputDependencyMask() may be called simultaneously on a single node.

Reimplemented in DependencyCallbackNode.

◆ _ComputeInputDependencyMasks()

virtual VDF_API VdfConnectionAndMaskVector _ComputeInputDependencyMasks ( const VdfMaskedOutput maskedOutput,
bool  skipAssociatedInputs 
) const
protectedvirtual

Vectorized version of _ComputeInputDependencyMask.

Unlike _ComputeInputDependencyMask, non-trivial derived nodes do not have to implement this function.

Additional parameter skipAssociatedInputs can control if associated inputs should be considered.

◆ _ComputeInputDependencyRequest()

virtual VDF_API VdfConnectionAndMaskVector _ComputeInputDependencyRequest ( const VdfMaskedOutputVector &  request) const
protectedvirtual

Vectorized version of _ComputeOutputDependencyMasks.

Unlike _ComputeDependencyMasks, non-trivial derived nodes do not have to implement this function. If a derived node is capable of supporting this vectorized API, then it can override this function.

◆ _ComputeOutputDependencyMask()

virtual VDF_API VdfMask _ComputeOutputDependencyMask ( const VdfConnection inputConnection,
const VdfMask inputDependencyMask,
const VdfOutput output 
) const
protectedvirtual

Returns a mask that indicates which elements of the data that flows along output depend on the elements indicated by inputDependencyMask that flow in via inputConnection.

This is only called from ComputeOutputDependencyMask(), to handle non-associated inputs.

The default implementation does the following:

  • If output has an affects mask, the affects mask is returned, indicating that all affected elements depend on the input.
  • Otherwise, returns an all-ones mask, indicating that all elements depend on the input.

Derived classes can override this method in order to make the resulting dependencies more sparse.

Derived classes must ensure that this method is thread safe, in the sense that _ComputeOutputDependencyMask() may be called simultaneously on a single node.

Reimplemented in DependencyCallbackNode.

◆ _ComputeOutputDependencyMasks()

virtual VDF_API bool _ComputeOutputDependencyMasks ( const VdfConnection inputConnection,
const VdfMask inputDependencyMask,
VdfMaskedOutputVector *  outputDependencies 
) const
protectedvirtual

Vectorized version of _ComputeOutputDependencyMask.

Unlike _ComputeDependencyMask, non-trivial derived nodes do not have to implement this function. If a derived node is capable of supporting this vectorized API, then it must return true. The base class returns false, meaning this is not implemented.

◆ _DidAddInputConnection()

virtual VDF_API void _DidAddInputConnection ( const VdfConnection c,
int  atIndex 
)
protectedvirtual

Notifies a node that one connection has been added.

atIndex will either contain the atIndex parameter passed to VdfNetwork's Connect() method, which specifies at what index a new connection has been inserted, or VdfNetwork::AppendConnection if the new connection was appended.

Note
Note that this method will be called after a connection has been made and is linked into the respective VdfInput and VdfOutput.

◆ _GetMemoryUsage()

static size_t _GetMemoryUsage ( const ClassType &  c,
size_t  dynamicSize 
)
inlinestaticprotected

Helper method for determining the amount of memory that a node uses.

Using this function is much safer than trying to do the computation manually, since it knows how to avoid double counting of base class structures.

Definition at line 587 of file node.h.

◆ _InitializeInputAndOutputSpecs()

VDF_API void _InitializeInputAndOutputSpecs ( const VdfInputAndOutputSpecs specs)
protected

Initializes the input/output specs pointer for this node.

Only to be called from constructors of derived classes that want to manage their own storage for the input/output specs.

◆ _IsDerivedEqual()

virtual VDF_API bool _IsDerivedEqual ( const VdfNode rhs) const
protectedvirtual

Can be overridden by derived classes to facilitate equality comparision.

The default implementation will always return false. Note that all connector specs, etc. are already taken care of via VdfNode::IsEqual().

Reimplemented in VdfEmptyInputVector, and CallbackNode.

◆ _ReleaseInputAndOutputSpecsPointer()

virtual VDF_API void _ReleaseInputAndOutputSpecsPointer ( const VdfInputAndOutputSpecs specs)
protectedvirtual

Releases an input/output specs pointer that was acquired with a previous call to _AcquireInputAndOutputSpecsPointer().

This is virtual so that a derived class may specify exactly where the storage comes from. This function is not called during performance-critical code-paths.

Reimplemented in VdfExtensibleNode.

◆ _ReplaceInputSpecs()

VDF_API void _ReplaceInputSpecs ( const VdfInputSpecs inputSpecs)
protected

Replaces the node's input specs with inputSpecs and rebuilds all inputs.

◆ _SetId()

void _SetId ( const VdfVersion  version,
const VdfIndex  index 
)
inlineprotected

Sets the node id.

The node id is controlled by VdfNetwork.

Definition at line 526 of file node.h.

◆ _WillRemoveInputConnection()

virtual VDF_API void _WillRemoveInputConnection ( const VdfConnection c)
protectedvirtual

Notifies a node that one connection will be removed.

Note
Note that this method will be called before a connection is unlinked from the respective VdfInput and VdfOutput in case of deletion.

◆ Compute()

virtual void Compute ( const VdfContext context) const
pure virtual

This is the method called to perform computation.

Derived classes must ensure that this method is thread safe, in the sense that Compute() may be called simultaneously on a single node.

Implemented in VdfSpeculationNode, and CallbackNode.

◆ ComputeInputDependencyMask()

VDF_API VdfMask::Bits ComputeInputDependencyMask ( const VdfMaskedOutput maskedOutput,
const VdfConnection inputConnection 
) const

Returns a mask that indicates which elements of the data that flows along inputConnection are needed to compute the data flowing out as indicated by maskedOutput.

This is used for dependency queries in the output-to-input direction.

  • If inputConnection is associated with the output in maskedOutput, returns a mask that is computed based on the semantics of associated input/output pairs.
  • Otherwise, calls the virtual method _ComputeInputDependencyMask().

inputConnection must be a connection that connects to an input on this node. The output in maskedOutput must be owned by this node.

◆ ComputeInputDependencyMasks()

VDF_API VdfConnectionAndMaskVector ComputeInputDependencyMasks ( const VdfMaskedOutput maskedOutput,
bool  skipAssociatedInputs 
) const

Vectorized version of ComputeInputDependencyMask.

Additional parameter skipAssociatedInputs can control if associated inputs should be considered.

◆ ComputeInputDependencyRequest()

VDF_API VdfConnectionAndMaskVector ComputeInputDependencyRequest ( const VdfMaskedOutputVector &  request) const

Vectorized version of ComputeInputDependencyMasks().


Computes all input dependencies for request in one go.

◆ ComputeOutputDependencyMask()

VDF_API VdfMask ComputeOutputDependencyMask ( const VdfConnection inputConnection,
const VdfMask inputDependencyMask,
const VdfOutput output 
) const

Returns a mask that indicates which elements of the data that flows along output depend on the elements indicated by inputDependencyMask that flow in via inputConnection.

This is used for dependency queries in the input-to-output direction.

  • If output is an associated output, returns a mask that is computed based on the semantics of associated input/output pairs.
  • Otherwise, calls the virtual method _ComputeOutputDependencyMask().

inputConnection must be a connection that connects to an input on this node. output must be owned by this node.

◆ ComputeOutputDependencyMasks()

VDF_API void ComputeOutputDependencyMasks ( const VdfConnection inputConnection,
const VdfMask inputDependencyMask,
VdfMaskedOutputVector *  outputDependencies 
) const

Vectorized version of ComputeOutputDependencyMask.

For a given inputConnection and inputDependencyMask, returns the outputs and masks that depend on them in outputDependencies.

◆ GetDebugName()

VDF_API const std::string GetDebugName ( ) const

Returns the debug name for this node, if one is registered.

Otherwise, returns the node type name by default.

◆ GetId()

VdfId GetId ( ) const
inline

Returns the unique id of this node in its network.

No current, or previously constructed node in the same network will share this id.

Definition at line 116 of file node.h.

◆ GetIndexFromId()

static VdfIndex GetIndexFromId ( const VdfId  id)
inlinestatic

Get the node index from the node id.

The index uniquely identifies the node in the current state of the network, but may alias an index which existed in a previous state of the network and has since been destructed.

Definition at line 123 of file node.h.

◆ GetInput() [1/2]

VDF_API VdfInput * GetInput ( const TfToken inputName)

Returns the input named inputName, returns NULL if no input of that name exists.

◆ GetInput() [2/2]

const VdfInput * GetInput ( const TfToken inputName) const
inline

Returns the connector named inputName, returns NULL if no input of that name exists.

Definition at line 164 of file node.h.

◆ GetInputConnections()

VDF_API VdfConnectionVector GetInputConnections ( ) const

Returns a flat vector of all input connections.

◆ GetInputsIterator()

const InputMapIterator GetInputsIterator ( ) const
inline

Returns an iterator class that can be used with TF_FOR_ALL to iterate through the inputs.

Definition at line 177 of file node.h.

◆ GetInputSpecs()

const VdfInputSpecs & GetInputSpecs ( ) const
inline

Returns the list of input specs.

Definition at line 157 of file node.h.

◆ GetMemoryUsage()

virtual VDF_API size_t GetMemoryUsage ( ) const
virtual

Returns the amount of memory used by the node in bytes.

Does not account for data structures to keep track of connections etc.

◆ GetNetwork() [1/2]

VdfNetwork & GetNetwork ( )
inline

Returns the network to which this node belongs.

Definition at line 142 of file node.h.

◆ GetNetwork() [2/2]

const VdfNetwork & GetNetwork ( ) const
inline

Returns the network to which this node belongs.

Definition at line 138 of file node.h.

◆ GetNumInputs()

size_t GetNumInputs ( ) const
inline

Returns the number of inputs that this node currently has.

Definition at line 289 of file node.h.

◆ GetNumOutputs()

size_t GetNumOutputs ( ) const
inline

Returns the number of outputs that this node currently has.

Definition at line 283 of file node.h.

◆ GetOptionalOutput() [1/2]

VDF_API VdfOutput * GetOptionalOutput ( const TfToken name)

Returns the output object named name.

Returns NULL if no such output exists, but issues no errors.

◆ GetOptionalOutput() [2/2]

const VdfOutput * GetOptionalOutput ( const TfToken name) const
inline

Returns the output object named name.

Returns NULL if no such output exists, but issues no errors.

Definition at line 249 of file node.h.

◆ GetOutput() [1/4]

VDF_API VdfOutput * GetOutput ( )

Returns the only output object that this node contains.

It is only valid to call this method on nodes that contain exactly one output. A coding error will be issued otherwise.

Returns NULL if the node doesn't have exactly one output.

◆ GetOutput() [2/4]

const VdfOutput * GetOutput ( ) const
inline

Returns the only output object that this node contains.

It is only valid to call this method on nodes that contain exactly one output. A coding error will be issued otherwise.

Returns NULL if the node doesn't have exactly one output.

Definition at line 260 of file node.h.

◆ GetOutput() [3/4]

VDF_API VdfOutput * GetOutput ( const TfToken name)

Returns the output object named name.

Returns NULL and issues a coding error if no such output exists.

◆ GetOutput() [4/4]

const VdfOutput * GetOutput ( const TfToken name) const
inline

Returns the output object named name.

Returns NULL and issues a coding error if no such output exists.

Definition at line 227 of file node.h.

◆ GetOutputConnections()

VDF_API VdfConnectionVector GetOutputConnections ( ) const

Returns a flat vector of all output connections.

◆ GetOutputsIterator()

const OutputMapIterator GetOutputsIterator ( ) const
inline

Returns an iterator class that can be used with TF_FOR_ALL to iterator through the output connectors.

Definition at line 277 of file node.h.

◆ GetOutputSpecs()

const VdfOutputSpecs & GetOutputSpecs ( ) const
inline

Returns the list of output specs.

Definition at line 219 of file node.h.

◆ GetRequiredInputsPredicate()

virtual VDF_API VdfRequiredInputsPredicate GetRequiredInputsPredicate ( const VdfContext context) const
virtual

Returns a predicate, determining whether a given input and its connections are required in order to fulfill this node's input dependencies.

This method is only allowed to read input values on the inputs that have been marked as prerequisites.

Reimplemented in VdfSpeculationNode.

◆ GetVersionFromId()

static VdfVersion GetVersionFromId ( const VdfId  id)
inlinestatic

Get the node version from the node id.

Node ids with the same index are disambiguated by a version number. Given multiple node ids with the same index, only one version will match the current state of the network.

Definition at line 132 of file node.h.

◆ HasInputConnections()

bool HasInputConnections ( ) const
inline

Returns true if the node has input connections, false otherwise.

Definition at line 183 of file node.h.

◆ HasOutputConnections()

bool HasOutputConnections ( ) const
inline

Returns true if the node has output connections, false otherwise.

Definition at line 193 of file node.h.

◆ IsA()

bool IsA ( ) const
inline

Returns true, if this node is of type TYPE.

Definition at line 147 of file node.h.

◆ IsEqual()

VDF_API bool IsEqual ( const VdfNode rhs) const

Returns true, if rhs and this node compute the same value(s).

◆ IsSpeculationNode()

virtual VDF_API bool IsSpeculationNode ( ) const
virtual

Returns true if this node performs speculation.

The default implementation returns false.

Reimplemented in VdfSpeculationNode.

◆ SetDebugName()

VDF_API void SetDebugName ( const std::string &  name)

Sets the debug name for this node.

By default, a node's debug name is the node type name; this function appends name to the node type name.

◆ SetDebugNameCallback() [1/2]

void SetDebugNameCallback ( F &&  f)
inline

Sets the debug name for this node with a lazily invoked callback.

By default, a node's debug name is the node type name; this function appends the string returned by f to the node type name.

Definition at line 313 of file node.h.

◆ SetDebugNameCallback() [2/2]

VDF_API void SetDebugNameCallback ( VdfNodeDebugNameCallback &&  callback)

Sets the debug name for this node with a lazily invoked callback.

By default, a node's debug name is the node type name; this function appends the string returned by callback to the node type name.

If callback is empty, return without setting the debug name.

Friends And Related Function Documentation

◆ VdfNetwork

friend class VdfNetwork
friend

Definition at line 515 of file node.h.


The documentation for this class was generated from the following file: