HDK
|
#include <DEP_MicroNode.h>
Public Types | |
typedef std::function< void(DEP_MicroNode &, DEP_MicroNode &) > | Visitor |
typedef std::function< bool(const DEP_MicroNode &, const DEP_MicroNode &) > | TraverseVisitor |
Static Public Member Functions | |
static SYS_FORCE_INLINE bool | canClearDependencies () |
Global control whether dependencies can be cleared. More... | |
static SYS_FORCE_INLINE bool | canEvaluateExports () |
Global control whether we can evaluate exports. More... | |
static SYS_FORCE_INLINE bool | isSameTime (fpreal a, fpreal b) |
![]() | |
static void * | operator new (size_t size) |
Regular new/delete operators. More... | |
static void | operator delete (void *p, size_t size) |
Regular new/delete operators. More... | |
static void * | operator new (size_t, void *p) |
static void | operator delete (void *, void *) |
Protected Member Functions | |
SYS_FORCE_INLINE void | setIsOpDataMicroNode (bool b) |
virtual bool | isEvaluating () const |
virtual void | evaluateExports () |
virtual bool | isExporting () const |
Friends | |
class | dep_Visitor |
class | DEP_KeepDependenciesScope |
class | DEP_BlockEvaluateExportsScope |
Represent an atomic unit of computation for dependency tracking.
DEP_MicroNode's form a dependency graph that are connected both implicitly and explicitly. The base class maintains the explicit edges while subclasses maintain the implicit edges by overriding the getInputs()/getOutputs() methods.
Definition at line 56 of file DEP_MicroNode.h.
typedef std::function< bool (const DEP_MicroNode & , const DEP_MicroNode & ) > DEP_MicroNode::TraverseVisitor |
Definition at line 134 of file DEP_MicroNode.h.
typedef std::function< void (DEP_MicroNode & , DEP_MicroNode & ) > DEP_MicroNode::Visitor |
Definition at line 130 of file DEP_MicroNode.h.
DEP_MicroNode::DEP_MicroNode | ( | ) |
|
virtual |
|
inline |
Flag accessors.
Definition at line 252 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 244 of file DEP_MicroNode.h.
void DEP_MicroNode::addExplicitInput | ( | DEP_MicroNode & | inp, |
bool | check_dup | ||
) |
Methods for manipulating explicit edges.
Add an input that this micronode depends on, with control on whether to check for duplicates.
|
inline |
Add an input that this micronode depends on.
Definition at line 101 of file DEP_MicroNode.h.
void DEP_MicroNode::addExplicitInputs | ( | const DEP_MicroNodeList & | sources, |
bool | check_dup = true |
||
) |
Bulk add multiple explicit inputs at once.
|
inlinevirtual |
Callbacks for what to do when the micronode becomes dirty. Derived micronodes can override this. Note that it requires knowledge of who made it dirty as they may behave differently. Currently used by OP_Node::propagateDirtyMicroNode
Reimplemented in OP_DataMicroNode, VOP_SnippetMicroNode, SIM_SimulationMicroNode, OP_ParmMicroNode, OP_EventMicroNode, and LOP_CheckpointMicroNode.
Definition at line 154 of file DEP_MicroNode.h.
|
inlinestatic |
Global control whether dependencies can be cleared.
Definition at line 271 of file DEP_MicroNode.h.
|
inlinestatic |
Global control whether we can evaluate exports.
Definition at line 276 of file DEP_MicroNode.h.
|
inlinevirtual |
Reimplemented in VOP_SnippetMicroNode, SIM_SimulationMicroNode, PRM_ParmMicroNode, OP_ParmMicroNode, DEP_TimedMicroNode, OP_DopParentMicroNode, OP_EventMicroNode, OP_DataMicroNode, VOP_ErrorMicroNode, VOP_ExportedParmLayoutMicroNode, VOP_ParmDSMicroNode, and VOP_DataMicroNode.
Definition at line 62 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 259 of file DEP_MicroNode.h.
|
virtual |
Clear all inputs, including any state data related to them. Default implementation just calls clearExplicitInputs() and setTimeDependent(false).
Reimplemented in GusdOP_ParmChangeMicroNode, PRM_ParmMicroNode, OP_DataMicroNode, and VOP_ErrorMicroNode.
|
virtual |
Dump contents to output stream, strictly for debugging purposes.
Reimplemented in OP_DataMicroNode, PRM_ParmMicroNode, and OP_ParmMicroNode.
void DEP_MicroNode::dumpAsDOT | ( | std::ostream & | os, |
const char * | prefix = 0 , |
||
int | indent_level = 0 |
||
) | const |
Dump the contents is a manner more suitable for DOT.
|
inlineprotectedvirtual |
evaluateExports() is called after isExporting() is noted to be true during a dirty propagation pass initiated by dirtySubtree().
Reimplemented in OP_DataMicroNode.
Definition at line 298 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 240 of file DEP_MicroNode.h.
void DEP_MicroNode::getExplicitInputs | ( | DEP_MicroNodeList & | inputs | ) | const |
Get list of all non-null explicit inputs.
void DEP_MicroNode::getExplicitOutputs | ( | DEP_MicroNodeList & | outputs | ) | const |
Get list of all non-null explicit outputs.
|
virtual |
Get list of all our non-null inputs, both implicit and explicit. The base class returns the list of explicit inputs.
Reimplemented in VIS_MountMicroNode, VIS_ParmsMicroNode, OP_DataMicroNode, VOP_ErrorMicroNode, VOP_ExportedParmLayoutMicroNode, and VOP_ParmDSMicroNode.
|
virtual |
Obtain approximate memory usage.
Reimplemented in OP_DataMicroNode, and PRM_ParmMicroNode.
|
inline |
Get the number of non-null inputs.
Definition at line 114 of file DEP_MicroNode.h.
|
inline |
Get the number of non-null outputs.
Definition at line 122 of file DEP_MicroNode.h.
|
virtual |
Get list of all our non-null outputs, both implicit and explicit. The base class returns the list of explicit outputs.
Reimplemented in VIS_MountMicroNode, VIS_ParmsMicroNode, OP_DataMicroNode, OP_ParmMicroNode, VOP_ErrorMicroNode, VOP_ParmDSMicroNode, and VOP_DataMicroNode.
|
inline |
Flag accessors.
Definition at line 236 of file DEP_MicroNode.h.
bool DEP_MicroNode::inheritContextOptionDepsFromExplicitInputs | ( | const UT_StringArray & | ignore_deps | ) |
Inherit extra dependencies from all explicit inputs. The ignore_deps string array MUST BE SORTED. Returns true if any extra dependencies are found.
bool DEP_MicroNode::inheritTimeDependentFromExplicitInputs | ( | ) |
Set time dependent flag if any explicit inputs are set. Returns true if any explicit inputs are true.
bool DEP_MicroNode::inheritTimeInterestedFromExplicitInputs | ( | ) |
Set time interested flag if any explicit inputs are set. Returns true if any explicit inputs are true.
|
inline |
Flag accessors.
Definition at line 208 of file DEP_MicroNode.h.
|
inlineprotectedvirtual |
These methods are overriden by subclasses to be used by the dirty propagation algorithm.Used to determine if a micronode is currently evaluating. If this returns true, during dirty propagation, it will prevent dependencies from being removed from it.
Reimplemented in OP_DataMicroNode.
Definition at line 293 of file DEP_MicroNode.h.
|
inlineprotectedvirtual |
Used to determine if a micronode requires its exports to be evaluated during the propagation pass.
Reimplemented in OP_DataMicroNode.
Definition at line 302 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 265 of file DEP_MicroNode.h.
|
inlinestatic |
One true method to compare equality of time values for caching. This particular form originates from what OP_Node::cook() did from the dawn of time.
Definition at line 282 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 222 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 229 of file DEP_MicroNode.h.
|
inline |
Definition at line 174 of file DEP_MicroNode.h.
|
inline |
Mark this micronode as having seen the given global dirty counter. Returns false if we've already seen it.
Definition at line 165 of file DEP_MicroNode.h.
Mark this micronode and all its dependents as dirty. The global dirty counter will be incremented once for each call to propagateDirty().
client_visit | Called for each micronode that is dirtied |
only_outputs | If true, then *this is ommitted from being dirtied |
|
inlinevirtual |
requiresUpdate() specifies if the micro-node was dirtied, possibly based on the time t. By default, it returns isDirty() but subclasses override this to handle other conditions that make this micro-node requiring an update.
Reimplemented in OP_DataMicroNode, and DEP_TimedMicroNode.
Definition at line 88 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 210 of file DEP_MicroNode.h.
|
inlineprotected |
Definition at line 308 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 225 of file DEP_MicroNode.h.
|
inline |
Flag accessors.
Definition at line 232 of file DEP_MicroNode.h.
void DEP_MicroNode::traverseAncestorInputs | ( | const TraverseVisitor & | visitor | ) | const |
Traverse all ancestor inputs of this micronode.
update() is used by users of micro-nodes to mark this node as clean at the given time t. By default, it simply marks it as no longer dirty but subclasses override this to do more work.
Reimplemented in GusdOP_ParmChangeMicroNode, OP_DataMicroNode, and DEP_TimedMicroNode.
Definition at line 81 of file DEP_MicroNode.h.
|
friend |
Definition at line 360 of file DEP_MicroNode.h.
|
friend |
Definition at line 359 of file DEP_MicroNode.h.
|
friend |
Definition at line 358 of file DEP_MicroNode.h.