diff --git a/src/graph/impl/KokkosGraph_GraphColor_impl.hpp b/src/graph/impl/KokkosGraph_GraphColor_impl.hpp index ec7ec37999..f1ef7e38b4 100644 --- a/src/graph/impl/KokkosGraph_GraphColor_impl.hpp +++ b/src/graph/impl/KokkosGraph_GraphColor_impl.hpp @@ -2494,15 +2494,12 @@ class GraphColor_VBD:public GraphColor nv; size_type maxColors = 0; - const_lno_row_view_t myXadj = this->xadj; - const_lno_nnz_view_t myAdj = this->adj; nnz_lno_persistent_work_view_t score - = nnz_lno_persistent_work_view_t(Kokkos::ViewAllocateWithoutInitializing("score"), numVertices); - typedef typename Kokkos::Experimental::Max maxScoreReducerType; - maxScoreReducerType maxScoreReducer(maxColors); - functorScoreCalculation scoreCalculation(score, myXadj); - Kokkos::parallel_reduce("Deterministic Coloring: compute initial scores", my_exec_space(0, numVertices), - scoreCalculation, maxScoreReducer); + = nnz_lno_persistent_work_view_t(Kokkos::ViewAllocateWithoutInitializing("score"), this->nv); + functorScoreCalculation scoreCalculation(score, this->xadj); + + Kokkos::parallel_reduce("Deterministic Coloring: compute initial scores", my_exec_space(0, this->nv), + scoreCalculation, Kokkos::Max(maxColors)); if (this->_ticToc) { std::cout << "maxColors: " << maxColors << std::endl; @@ -2572,17 +2569,16 @@ class GraphColor_VBD:public GraphColor struct functorScoreCalculation { - typedef typename Kokkos::Experimental::Max::value_type valueType; nnz_lno_persistent_work_view_t score_; const_lno_row_view_t numNeighbors_; - functorScoreCalculation(nnz_lno_persistent_work_view_t score, const_lno_row_view_t numNeighbors) + functorScoreCalculation(nnz_lno_persistent_work_view_t& score, const_lno_row_view_t& numNeighbors) : score_(score), numNeighbors_(numNeighbors) {} KOKKOS_INLINE_FUNCTION - void operator() (const int i, valueType &update) const { + void operator() (const int i, size_type &update) const { score_(i) = numNeighbors_(i + 1) - numNeighbors_(i); - update = ( (valueType) score_(i) < update ? update : (valueType) score_(i) ); + update = ( (size_type) score_(i) < update ? update : (size_type) score_(i) ); } }; // functorScoreCalculation() diff --git a/unit_test/graph/Test_Graph_graph_color.hpp b/unit_test/graph/Test_Graph_graph_color.hpp index 83e2664c09..3c21f81f73 100644 --- a/unit_test/graph/Test_Graph_graph_color.hpp +++ b/unit_test/graph/Test_Graph_graph_color.hpp @@ -136,11 +136,9 @@ void test_coloring(lno_t numRows,size_type nnz, lno_t bandwidth, lno_t row_size_ if( !std::is_same< typename device::execution_space, Kokkos::Cuda >::value ) { coloring_algorithms.push_back(COLORING_VBD); - coloring_algorithms.push_back(COLORING_VBDBIT); } #else coloring_algorithms.push_back(COLORING_VBD); - coloring_algorithms.push_back(COLORING_VBDBIT); #endif for (size_t ii = 0; ii < coloring_algorithms.size(); ++ii) { diff --git a/unit_test/graph/Test_Graph_graph_color_deterministic.hpp b/unit_test/graph/Test_Graph_graph_color_deterministic.hpp index 1ee0af1349..e025f00f55 100644 --- a/unit_test/graph/Test_Graph_graph_color_deterministic.hpp +++ b/unit_test/graph/Test_Graph_graph_color_deterministic.hpp @@ -83,7 +83,6 @@ int run_graphcolor_deter( kh.create_graph_coloring_handle(coloring_algorithm); - const size_t num_rows_1 = input_mat.numRows(); const size_t num_cols_1 = input_mat.numCols(); @@ -153,16 +152,8 @@ void test_coloring_deterministic(lno_t numRows, size_type nnz) { std::vector coloring_algorithms; - #ifdef KOKKOS_ENABLE_CUDA - if( !std::is_same< typename device::execution_space, Kokkos::Cuda >::value ) - { - coloring_algorithms.push_back(COLORING_VBD); - coloring_algorithms.push_back(COLORING_VBDBIT); - } - #else coloring_algorithms.push_back(COLORING_VBD); coloring_algorithms.push_back(COLORING_VBDBIT); - #endif for (size_t ii = 0; ii < coloring_algorithms.size(); ++ii) { ColoringAlgorithm coloring_algorithm = coloring_algorithms[ii];