Skip to content

Commit 8bd289d

Browse files
authored
changing DistLocalGraph api (#45)
1 parent 00064f8 commit 8bd289d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

libcusp/include/galois/graphs/DistributedLocalGraph.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ class DistLocalGraph {
586586
*/
587587
inline EdgeTy& getEdgeData(GraphNode src, edge_iterator ni) {
588588
GraphNode dst = getEdgeDst(ni);
589-
auto& r = graph->getEdgeData(std::make_pair(src, getGID(dst)));
589+
auto& r = graph->getEdgeData(std::make_pair(src, dst));
590590
return r;
591591
}
592592

@@ -601,9 +601,7 @@ class DistLocalGraph {
601601
* @param ni edge id to get destination of
602602
* @returns Local ID of destination of edge ni
603603
*/
604-
GraphNode getEdgeDst(edge_iterator ni) {
605-
return getGID(graph->getEdgeDst(*ni));
606-
}
604+
GraphNode getEdgeDst(edge_iterator ni) { return graph->getEdgeDst(*ni); }
607605

608606
/**
609607
* Gets the first edge of some node.

libwmd/test/wmd-graph-build.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ int main(int argc, char* argv[]) {
216216
auto end = graph->edge_end(lid);
217217
auto itr = graph->edge_begin(lid);
218218
for (; itr != end; itr++) {
219-
edgeDst.push_back(graph->getEdgeDst(itr));
219+
edgeDst.push_back(graph->getGID(graph->getEdgeDst(itr)));
220220
}
221221
std::vector<uint64_t> edgeDstDbg;
222222
for (auto& e : graph->edges(lid)) {
223-
edgeDstDbg.push_back(graph->getEdgeDst(e));
223+
edgeDstDbg.push_back(graph->getGID(graph->getEdgeDst(e)));
224224
}
225225
assert(edgeDst == edgeDstDbg);
226226
std::sort(edgeDst.begin(), edgeDst.end());

0 commit comments

Comments
 (0)