cyclegraph: edit template for addEdge
authorBrian Norris <banorris@uci.edu>
Tue, 5 Feb 2013 00:24:21 +0000 (16:24 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 6 Feb 2013 21:44:39 +0000 (13:44 -0800)
cyclegraph.cc
cyclegraph.h

index 2c3a5936a89d8ac7dbb7e5b43e32b7a1cfd5ec6a..16990b905bf8a26860bba3e84bd791eddc358ae1 100644 (file)
@@ -81,30 +81,6 @@ CycleNode * CycleGraph::getNode(const Promise *promise)
        return node;
 }
 
-/*
- * @brief Adds an edge between objects
- *
- * This function will add an edge between any two objects which can be
- * associated with a CycleNode. That is, if they have a CycleGraph::getNode
- * implementation.
- *
- * The object to is ordered after the object from.
- *
- * @param to The edge points to this object, of type T
- * @param from The edge comes from this object, of type U
- */
-template <typename T, typename U>
-void CycleGraph::addEdge(const T from, const U to)
-{
-       ASSERT(from);
-       ASSERT(to);
-
-       CycleNode *fromnode = getNode(from);
-       CycleNode *tonode = getNode(to);
-
-       addNodeEdge(fromnode, tonode);
-}
-
 /**
  * @return false if the resolution results in a cycle; true otherwise
  */
index f03c4ecf33496314387d99c28f19dc80f3839e27..9fc789c1913edd590f59c497f6cee1ff0b59eff2 100644 (file)
@@ -130,4 +130,28 @@ class CycleNode {
        CycleNode *hasRMW;
 };
 
+/*
+ * @brief Adds an edge between objects
+ *
+ * This function will add an edge between any two objects which can be
+ * associated with a CycleNode. That is, if they have a CycleGraph::getNode
+ * implementation.
+ *
+ * The object to is ordered after the object from.
+ *
+ * @param to The edge points to this object, of type T
+ * @param from The edge comes from this object, of type U
+ */
+template <typename T, typename U>
+void CycleGraph::addEdge(const T from, const U to)
+{
+       ASSERT(from);
+       ASSERT(to);
+
+       CycleNode *fromnode = getNode(from);
+       CycleNode *tonode = getNode(to);
+
+       addNodeEdge(fromnode, tonode);
+}
+
 #endif /* __CYCLEGRAPH_H__ */