Merge the (possibly disjoint) sets containing nodes "x" and "y". Returns OK if the all nodes in the union of these sets can be placed on the same device type. NOTE: If this method returns an error, *this is left in an undefined state.
| 890 | // NOTE: If this method returns an error, *this is left in an undefined |
| 891 | // state. |
| 892 | Status ColocationGraph::ColocateNodes(const Node& x, const Node& y) { |
| 893 | int x_root = FindAndUpdateRoot(x.id()); |
| 894 | int y_root = FindAndUpdateRoot(y.id()); |
| 895 | return ColocateNodes(x, x_root, y, y_root); |
| 896 | } |
| 897 | |
| 898 | // This overload of ColocateNodes() allows a caller to provide the root node |
| 899 | // ids for the two nodes. For large graphs, this noticeably reduces the |
nothing calls this directly
no test coverage detected