-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bringing in newest versions from work on the IPDPS paper.
- Loading branch information
1 parent
8433c0e
commit 6d3adfa
Showing
6 changed files
with
517 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#include "KokkosGraph_wiki_9pt_stencil.hpp" | ||
#include "KokkosGraph_MIS2.hpp" | ||
|
||
int main() | ||
{ | ||
int main() { | ||
Kokkos::initialize(); | ||
{ | ||
using GraphDemo::numVertices; | ||
RowmapType rowmapDevice; | ||
ColindsType colindsDevice; | ||
//Step 1: Generate the graph on host, allocate space on device, and copy. | ||
//See function "generate9pt" below. | ||
// Step 1: Generate the graph on host, allocate space on device, and copy. | ||
// See function "generate9pt" below. | ||
GraphDemo::generate9pt(rowmapDevice, colindsDevice); | ||
//Step 2: Run MIS-2 based coarsening and print the result | ||
// Step 2: Run MIS-2 based coarsening and print the result | ||
{ | ||
std::cout << "Coarsened vertex labels:\n"; | ||
Ordinal numClusters = 0; | ||
auto labels = KokkosGraph::Experimental::graph_mis2_coarsen<ExecSpace, RowmapType, ColindsType>( | ||
rowmapDevice, colindsDevice, numClusters, KokkosGraph::MIS2_FAST); | ||
//coarsening labels can be printed in the same way as colors | ||
auto labels = | ||
KokkosGraph::Experimental::graph_mis2_aggregate<ExecSpace, RowmapType, | ||
ColindsType>( | ||
rowmapDevice, colindsDevice, numClusters); | ||
// coarsening labels can be printed in the same way as colors | ||
GraphDemo::printColoring(labels, numClusters); | ||
putchar('\n'); | ||
} | ||
} | ||
Kokkos::finalize(); | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.