The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
concurrency::ConditionalLineageFinder Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/Visitors/Validators.h>

Inheritance diagram for concurrency::ConditionalLineageFinder:
Collaboration diagram for concurrency::ConditionalLineageFinder:

Public Member Functions

bool visitEnter (DataNode &) const override
 
bool visitEnter (ConditionNode &) const override
 
bool visit (DecisionNode &) override
 
bool visit (AlgorithmNode &) override
 
bool positive () const
 
bool negative () const
 
void reset () override
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visitEnter (AlgorithmNode &) const
 
- Public Member Functions inherited from concurrency::IGraphVisitor
virtual ~IGraphVisitor ()=default
 

Private Attributes

bool m_positive { false }
 
bool m_negative { false }
 

Detailed Description

Definition at line 106 of file Validators.h.

Member Function Documentation

◆ negative()

bool concurrency::ConditionalLineageFinder::negative ( ) const
inline

Definition at line 118 of file Validators.h.

◆ positive()

bool concurrency::ConditionalLineageFinder::positive ( ) const
inline

Definition at line 117 of file Validators.h.

◆ reset()

void concurrency::ConditionalLineageFinder::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 120 of file Validators.h.

120 {
121 m_positive = false;
122 m_negative = false;
123 }

◆ visit() [1/4]

bool concurrency::ConditionalLineageFinder::visit ( AlgorithmNode & node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 132 of file Validators.cpp.

132 {
133
134 for ( const auto& parent : node.getParentDecisionHubs() ) {
135 this->visit( *parent );
136 if ( this->positive() && this->negative() ) break;
137 }
138
139 return true;
140 }
bool visit(DecisionNode &) override

◆ visit() [2/4]

virtual bool concurrency::IGraphVisitor::visit ( ConditionNode & )
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 34 of file IGraphVisitor.h.

34{ return true; }

◆ visit() [3/4]

virtual bool concurrency::IGraphVisitor::visit ( DataNode & )
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 31 of file IGraphVisitor.h.

31{ return true; }

◆ visit() [4/4]

bool concurrency::ConditionalLineageFinder::visit ( DecisionNode & node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 104 of file Validators.cpp.

104 {
105
106 auto propValidator = NodePropertiesValidator();
107 propValidator.visit( node );
108
109 // check if the visitor found a conditional path
110 if ( node.m_modePromptDecision && propValidator.passed() ) {
111 m_positive = true;
112 return true;
113 }
114
115 // check if the visitor found an unconditional path
116 if ( node.m_parents.empty() ) {
117 m_negative = true;
118 return true;
119 }
120
121 for ( const auto& parent : node.m_parents ) {
122 this->visit( *parent );
123 // check if a node is on both conditional and unconditional branches
124 // and stop since further navigation won't change the conclusion
125 if ( this->positive() && this->negative() ) break;
126 }
127
128 return true;
129 }

◆ visitEnter() [1/4]

virtual bool concurrency::IGraphVisitor::visitEnter ( AlgorithmNode & ) const
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 27 of file IGraphVisitor.h.

27{ return true; }

◆ visitEnter() [2/4]

bool concurrency::ConditionalLineageFinder::visitEnter ( ConditionNode & ) const
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 112 of file Validators.h.

112{ return false; }

◆ visitEnter() [3/4]

bool concurrency::ConditionalLineageFinder::visitEnter ( DataNode & ) const
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 111 of file Validators.h.

111{ return false; }

◆ visitEnter() [4/4]

virtual bool concurrency::IGraphVisitor::visitEnter ( DecisionNode & ) const
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 24 of file IGraphVisitor.h.

24{ return true; }

Member Data Documentation

◆ m_negative

bool concurrency::ConditionalLineageFinder::m_negative { false }
private

Definition at line 127 of file Validators.h.

127{ false };

◆ m_positive

bool concurrency::ConditionalLineageFinder::m_positive { false }
private

Definition at line 126 of file Validators.h.

126{ false };

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