Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c++17: add [[fallthrough]] attribute #1493

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion graph/impl/KokkosGraph_Distance2Color_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions perf_test/sparse/KokkosSparse_sptrsv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ int test_sptrsv_perf(std::vector<int> 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,
Expand Down Expand Up @@ -681,6 +682,7 @@ int test_sptrsv_perf(std::vector<int> 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,
Expand Down
2 changes: 1 addition & 1 deletion scripts/cm_test_all_sandia
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ elif [ "$MACHINE" = "blake" ]; then
ONEAPI_FLAGS_EXTRA="-fp-model=precise"
LLVM_EXTRA_FLAGS="-fPIC ${CLANG_WARNING_FLAGS}"
# Remove -Wuninitialized: compiler issues show up with Threads backend
GCC11_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered"
GCC11_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered,-Wimplicit-fallthrough"
# update KOKKOS_PASSTHRU_CMAKE_FLAGS to disable onedpl on Blake
KOKKOS_PASSTHRU_CMAKE_FLAGS="${KOKKOS_PASSTHRU_CMAKE_FLAGS} -DKokkos_ENABLE_ONEDPL=OFF"

Expand Down
2 changes: 1 addition & 1 deletion sparse/impl/KokkosSparse_spgemm_impl_memaccess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void KokkosSPGEMM<HandleType, a_row_view_t_, a_lno_nnz_view_t_,
cache_1_line_count);
}
} break;
case 2: hyper_thread_ind = 1;
case 2: hyper_thread_ind = 1; [[fallthrough]];
case 1: {
nnz_lno_t result_col_ind =
result_col + (hyper_thread_ind - 1) * b_col_cnt;
Expand Down
Loading