Commit 9b6541f6 authored by Martin Marinov's avatar Martin Marinov

Add Progress::Node::weight().

parent e934aa58
......@@ -142,6 +142,11 @@ BASE_THREAD_LOCAL Context cntx;
Node::~Node()
{}
int Node::weight() const
{
return 1;
}
TickNumber Node::tick_number_max() const
{
return 1;
......
......@@ -63,8 +63,13 @@ public:
TickNumber tick_number() const { return tick_nmbr_; }
/*
Relative weight of this node in the overall computation process, default is 1.
*/
virtual int weight() const;
/*!
Estimate the maximum number of ticks in this node.
Estimate the maximum number of ticks in this node, default is 1.
The function is virtual so that the node can make use of some custom logic
and specific parameters.
*/
......@@ -76,8 +81,6 @@ public:
*/
virtual void log(IOutputStream& _os) const;
/**/
protected:
Node* next_; //!< next node on the same level, last if nullptr
Node* chld_; //!< first child node, leaf if nullptr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment