OpenASIP  2.0
Public Member Functions | List of all members
RLPriorityNodeId Class Reference

#include <NodeIdCompList.hh>

Inheritance diagram for RLPriorityNodeId:
Inheritance graph
Collaboration diagram for RLPriorityNodeId:
Collaboration graph

Public Member Functions

bool operator() (MoveNodeGroup &a, MoveNodeGroup &b)
 

Detailed Description

A function object for prioritizing the ready list according to the move's node id. stupid but working order.

Definition at line 49 of file NodeIdCompList.hh.

Member Function Documentation

◆ operator()()

bool RLPriorityNodeId::operator() ( MoveNodeGroup a,
MoveNodeGroup b 
)
inline

Compares two nodes according to their priority in the ready list.

Parameters
aNode a.
bNode b.
Returns
True if b should be scheduled before a (b greater than a).

Definition at line 59 of file NodeIdCompList.hh.

59  {
60 
61  if (b.isScheduled()) {
62  // keep scheduled MoveNodeSets on a top of a queue
63  // so they will be poped out
64  return true;
65  }
66  if (a.isScheduled()) {
67  // keep scheduled MoveNodeSets on a top of a queue
68  // so they will be poped out
69  return false;
70  }
71 
72  return b.node(0).nodeID() < a.node(0).nodeID();
73  }

References MoveNodeGroup::isScheduled(), MoveNodeGroup::node(), and GraphNode::nodeID().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
MoveNodeGroup::node
MoveNode & node(int index) const
Definition: MoveNodeGroup.cc:152
GraphNode::nodeID
int nodeID() const
MoveNodeGroup::isScheduled
bool isScheduled() const
Definition: MoveNodeGroup.cc:164