-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move MIS-2 related stuff from KokkosGraph::Experimental to KokkosGraph. Keep deprecated versions in Experimental for backward compatibility. - Rename the 3 phases of MIS2 based aggregation to be more descriptive
- Loading branch information
1 parent
7964bb9
commit 7ed2e66
Showing
7 changed files
with
88 additions
and
53 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
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,34 +1,36 @@ | ||
#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 distance-2 MIS and print the results, with three different algorithms | ||
// Step 2: Run distance-2 MIS and print the results, with three different | ||
// algorithms | ||
{ | ||
//Run coloring | ||
auto misDevice = KokkosGraph::Experimental::graph_d2_mis<ExecSpace, RowmapType, ColindsType>( | ||
rowmapDevice, colindsDevice, KokkosGraph::MIS2_FAST); | ||
// Run coloring | ||
auto misDevice = | ||
KokkosGraph::graph_d2_mis<ExecSpace, RowmapType, ColindsType>( | ||
rowmapDevice, colindsDevice, KokkosGraph::MIS2_FAST); | ||
std::cout << "Distance-2 MIS, FAST algorithm: contains " | ||
<< misDevice.extent(0) << " out of " << GraphDemo::numVertices << " vertices.\n"; | ||
<< misDevice.extent(0) << " out of " << GraphDemo::numVertices | ||
<< " vertices.\n"; | ||
GraphDemo::printMIS(misDevice); | ||
putchar('\n'); | ||
misDevice = KokkosGraph::Experimental::graph_d2_mis<ExecSpace, RowmapType, ColindsType>( | ||
misDevice = KokkosGraph::graph_d2_mis<ExecSpace, RowmapType, ColindsType>( | ||
rowmapDevice, colindsDevice, KokkosGraph::MIS2_QUALITY); | ||
std::cout << "Distance-2 MIS, QUALITY algorithm: contains " | ||
<< misDevice.extent(0) << " out of " << GraphDemo::numVertices << " vertices.\n"; | ||
<< misDevice.extent(0) << " out of " << GraphDemo::numVertices | ||
<< " vertices.\n"; | ||
GraphDemo::printMIS(misDevice); | ||
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
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
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