OpenASIP  2.0
Public Member Functions | List of all members
OperationDAGSelector::OperationDAGList Class Reference

#include <OperationDAGSelector.hh>

Inheritance diagram for OperationDAGSelector::OperationDAGList:
Inheritance graph
Collaboration diagram for OperationDAGSelector::OperationDAGList:
Collaboration graph

Public Member Functions

OperationDAGsmallestNodeCount () const
 

Detailed Description

STL Container for returning and finding DAGs.

Definition at line 56 of file OperationDAGSelector.hh.

Member Function Documentation

◆ smallestNodeCount()

OperationDAG& OperationDAGSelector::OperationDAGList::smallestNodeCount ( ) const
inline

Returns DAG that had least nodes.

Returns
DAG that had least nodes.

Definition at line 64 of file OperationDAGSelector.hh.

64  {
65 
66  if (empty()) {
67  return OperationDAG::null;
68  }
69 
70  OperationDAG* leastNodes = *begin();
71 
72  for (std::vector<OperationDAG*>::const_iterator i = begin();
73  i != end(); i++) {
74 
75  if ((*i)->nodeCount() < leastNodes->nodeCount()) {
76  leastNodes = *i;
77  }
78  }
79 
80  return *leastNodes;
81  }

References BoostGraph< GraphNode, GraphEdge >::nodeCount(), and OperationDAG::null.

Referenced by OperationDAGSelector::createExpandedDAG(), and TDGen::writeInstrInfo().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
OperationDAG::null
static OperationDAG null
Definition: OperationDAG.hh:47
OperationDAG
Definition: OperationDAG.hh:43
BoostGraph::nodeCount
int nodeCount() const