From e1f06ecdf77daa7f2d3ebdeb9e520b51c0b6c931 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Thu, 11 Aug 2022 15:51:30 -0600 Subject: [PATCH] c++17: add [[fallthrough]] attribute --- graph/impl/KokkosGraph_Distance2Color_impl.hpp | 2 +- graph/src/KokkosGraph_Triangle.hpp | 5 +---- perf_test/sparse/KokkosSparse_sptrsv.cpp | 2 ++ sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/graph/impl/KokkosGraph_Distance2Color_impl.hpp b/graph/impl/KokkosGraph_Distance2Color_impl.hpp index 2ab04667e0..58b6d79ebb 100644 --- a/graph/impl/KokkosGraph_Distance2Color_impl.hpp +++ b/graph/impl/KokkosGraph_Distance2Color_impl.hpp @@ -157,7 +157,7 @@ class GraphColorDistance2 { colors_out = color_view_type("Graph Colors", this->nr); } switch (this->gc_handle->get_coloring_algo_type()) { - case COLORING_D2_VB_BIT_EF: using_edge_filtering = true; + case COLORING_D2_VB_BIT_EF: using_edge_filtering = true; [[fallthrough]]; case COLORING_D2_VB_BIT: case COLORING_D2_VB: compute_d2_coloring_vb(colors_out); break; case COLORING_D2_NB_BIT: compute_d2_coloring_nb(colors_out); break; diff --git a/graph/src/KokkosGraph_Triangle.hpp b/graph/src/KokkosGraph_Triangle.hpp index 0a878891ce..f29078dbd3 100644 --- a/graph/src/KokkosGraph_Triangle.hpp +++ b/graph/src/KokkosGraph_Triangle.hpp @@ -164,10 +164,7 @@ void triangle_generic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, spgemmHandleType *sh = handle->get_spgemm_handle(); switch (sh->get_algorithm_type()) { // case SPGEMM_KK_TRIANGLE_LL: - case SPGEMM_KK_TRIANGLE_AI: - case SPGEMM_KK_TRIANGLE_IA: - case SPGEMM_KK_TRIANGLE_IA_UNION: - default: { + case SPGEMM_KK_TRIANGLE_AI case SPGEMM_KK_TRIANGLE_IA case SPGEMM_KK_TRIANGLE_IA_UNION default: { KokkosSparse::Impl::KokkosSPGEMM< KernelHandle, alno_row_view_t_, alno_nnz_view_t_, typename KernelHandle::in_scalar_nnz_view_t, blno_row_view_t_, diff --git a/perf_test/sparse/KokkosSparse_sptrsv.cpp b/perf_test/sparse/KokkosSparse_sptrsv.cpp index 35e8b0e16e..2ae5afae50 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv.cpp +++ b/perf_test/sparse/KokkosSparse_sptrsv.cpp @@ -279,6 +279,7 @@ int test_sptrsv_perf(std::vector tests, const std::string &lfilename, #else std::cout << "CUSPARSE not enabled: Fall through to defaults" << std::endl; + [[fallthrough]]; #endif default: kh.create_sptrsv_handle(SPTRSVAlgorithm::SEQLVLSCHD_TP1, nrows, @@ -681,6 +682,7 @@ int test_sptrsv_perf(std::vector tests, const std::string &lfilename, #else std::cout << "CUSPARSE not enabled: Fall through to defaults" << std::endl; + [[fallthrough]]; #endif default: kh.create_sptrsv_handle(SPTRSVAlgorithm::SEQLVLSCHD_TP1, nrows, diff --git a/sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp b/sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp index 51d151e4fb..575ddca578 100644 --- a/sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp +++ b/sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp @@ -663,7 +663,7 @@ void KokkosSPGEMM