return edges.size();
}
+CycleNode * CycleNode::getBackEdge(unsigned int i) const
+{
+ return back_edges[i];
+}
+
+unsigned int CycleNode::getNumBackEdges() const
+{
+ return back_edges.size();
+}
+
/**
* Adds an edge from this CycleNode to another CycleNode.
* @param node The node to which we add a directed edge
if (edges[i] == node)
return false;
edges.push_back(node);
+ node->back_edges.push_back(this);
return true;
}
bool addEdge(CycleNode *node);
CycleNode * getEdge(unsigned int i) const;
unsigned int getNumEdges() const;
+ CycleNode * getBackEdge(unsigned int i) const;
+ unsigned int getNumBackEdges() const;
bool setRMW(CycleNode *);
CycleNode * getRMW() const;
const ModelAction * getAction() const { return action; }
/** @brief The edges leading out from this node */
std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > edges;
+ /** @brief The edges leading into this node */
+ std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > back_edges;
+
/** Pointer to a RMW node that reads from this node, or NULL, if none
* exists */
CycleNode *hasRMW;