diff --git a/Makefile b/Makefile index 60ac119..51b52eb 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ NFLAGS=-arch=sm_32 SHARED=shared TIGR=tigr -all: make1 make2 sssp bfs cc pr sswp +all: make1 make2 sssp bfs cc pr sswp bc make1: make -C $(SHARED) diff --git a/shared/virtual_graph.cpp b/shared/virtual_graph.cpp index 7e3cc1a..aee8e68 100644 --- a/shared/virtual_graph.cpp +++ b/shared/virtual_graph.cpp @@ -65,6 +65,7 @@ void VirtualGraph::MakeGraph() } outDegreeCounter = new uint[graph->num_nodes]; + memset(outDegreeCounter, 0, sizeof(uint) * graph->num_nodes); for(int i=0; inum_edges; i++) { @@ -133,6 +134,7 @@ void VirtualGraph::MakeUGraph() } outDegreeCounter = new uint[graph->num_nodes]; + memset(outDegreeCounter, 0, sizeof(uint) * graph->num_nodes); for(int i=0; inum_edges; i++) {