Skip to content

Commit

Permalink
Applying clang-format
Browse files Browse the repository at this point in the history
Signed-off-by: Luc Berger-Vergiat <[email protected]>
  • Loading branch information
lucbv committed Feb 6, 2025
1 parent 7444475 commit 209c0b5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
4 changes: 2 additions & 2 deletions perf_test/sparse/KokkosSparse_par_ilut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ void run_spiluk_test(benchmark::State& state, KernelHandle& kh, const sp_matrix_

if (!measure_symbolic) {
state.ResumeTiming();
KokkosSparse::spiluk_numeric(&kh, fill_lev, A_row_map, A_entries, A_values, L_row_map, L_entries, L_values, U_row_map,
U_entries, U_values);
KokkosSparse::spiluk_numeric(&kh, fill_lev, A_row_map, A_entries, A_values, L_row_map, L_entries, L_values,
U_row_map, U_entries, U_values);
Kokkos::fence();
state.PauseTiming();
}
Expand Down
11 changes: 6 additions & 5 deletions perf_test/sparse/KokkosSparse_spiluk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ int test_spiluk_perf(std::vector<int> tests, std::string afilename, int kin, int
Kokkos::Timer timer;

timer.reset();
KokkosSparse::spiluk_symbolic(&kh, fill_lev, A.graph.row_map, A.graph.entries, L_row_map, L_entries, U_row_map, U_entries);
KokkosSparse::spiluk_symbolic(&kh, fill_lev, A.graph.row_map, A.graph.entries, L_row_map, L_entries, U_row_map,
U_entries);
std::cout << "ILU(" << fill_lev << ") Symbolic Time: " << timer.seconds() << std::endl;

Kokkos::resize(L_entries, kh.get_spiluk_handle()->get_nnzL());
Expand All @@ -179,8 +180,8 @@ int test_spiluk_perf(std::vector<int> tests, std::string afilename, int kin, int
std::cout << "nnzU: " << kh.get_spiluk_handle()->get_nnzU() << std::endl;

timer.reset();
KokkosSparse::spiluk_numeric(&kh, fill_lev, A.graph.row_map, A.graph.entries, A.values, L_row_map, L_entries, L_values,
U_row_map, U_entries, U_values);
KokkosSparse::spiluk_numeric(&kh, fill_lev, A.graph.row_map, A.graph.entries, A.values, L_row_map, L_entries,
L_values, U_row_map, U_entries, U_values);
Kokkos::fence();
std::cout << "ILU(" << fill_lev << ") Numeric Time: " << timer.seconds() << std::endl;

Expand Down Expand Up @@ -331,8 +332,8 @@ int test_spiluk_perf(std::vector<int> tests, std::string afilename, int kin, int

for (int i = 0; i < loop; i++) {
timer.reset();
KokkosSparse::spiluk_numeric(&kh, fill_lev, A.graph.row_map, A.graph.entries, A.values, L_row_map, L_entries, L_values,
U_row_map, U_entries, U_values);
KokkosSparse::spiluk_numeric(&kh, fill_lev, A.graph.row_map, A.graph.entries, A.values, L_row_map, L_entries,
L_values, U_row_map, U_entries, U_values);
Kokkos::fence();
double time = timer.seconds();
ave_time += time;
Expand Down
23 changes: 12 additions & 11 deletions sparse/src/KokkosSparse_spiluk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,22 +415,23 @@ namespace Experimental {

template <typename KernelHandle, typename ARowMapType, typename AEntriesType, typename LRowMapType,
typename LEntriesType, typename URowMapType, typename UEntriesType>
[[deprecated("spiluk_numeric was promoted out of Experimental, please use KokkosSparse::spiluk_numeric instead.")]]
void spiluk_symbolic(KernelHandle* handle, typename KernelHandle::const_nnz_lno_t fill_lev, ARowMapType& A_rowmap,
AEntriesType& A_entries, LRowMapType& L_rowmap, LEntriesType& L_entries, URowMapType& U_rowmap,
UEntriesType& U_entries, int nstreams = 1) {
KokkosSparse::spiluk_symbolic(handle, fill_lev, A_rowmap, A_entries, L_rowmap, L_entries, U_rowmap, U_entries, nstreams);
[[deprecated("spiluk_numeric was promoted out of Experimental, please use KokkosSparse::spiluk_numeric instead.")]] void
spiluk_symbolic(KernelHandle* handle, typename KernelHandle::const_nnz_lno_t fill_lev, ARowMapType& A_rowmap,
AEntriesType& A_entries, LRowMapType& L_rowmap, LEntriesType& L_entries, URowMapType& U_rowmap,
UEntriesType& U_entries, int nstreams = 1) {
KokkosSparse::spiluk_symbolic(handle, fill_lev, A_rowmap, A_entries, L_rowmap, L_entries, U_rowmap, U_entries,
nstreams);
}

template <typename KernelHandle, typename ARowMapType, typename AEntriesType, typename AValuesType,
typename LRowMapType, typename LEntriesType, typename LValuesType, typename URowMapType,
typename UEntriesType, typename UValuesType>
[[deprecated("spiluk_numeric was promoted out of Experimental, please use KokkosSparse::spiluk_numeric instead.")]]
void spiluk_numeric(KernelHandle* handle, typename KernelHandle::const_nnz_lno_t fill_lev, ARowMapType& A_rowmap,
AEntriesType& A_entries, AValuesType& A_values, LRowMapType& L_rowmap, LEntriesType& L_entries,
LValuesType& L_values, URowMapType& U_rowmap, UEntriesType& U_entries, UValuesType& U_values) {
KokkosSparse::spiluk_numeric(handle, fill_lev, A_rowmap, A_entries, A_values, L_rowmap, L_entries, L_values,
U_rowmap, U_entries, U_values);
[[deprecated("spiluk_numeric was promoted out of Experimental, please use KokkosSparse::spiluk_numeric instead.")]] void
spiluk_numeric(KernelHandle* handle, typename KernelHandle::const_nnz_lno_t fill_lev, ARowMapType& A_rowmap,
AEntriesType& A_entries, AValuesType& A_values, LRowMapType& L_rowmap, LEntriesType& L_entries,
LValuesType& L_values, URowMapType& U_rowmap, UEntriesType& U_entries, UValuesType& U_values) {
KokkosSparse::spiluk_numeric(handle, fill_lev, A_rowmap, A_entries, A_values, L_rowmap, L_entries, L_values, U_rowmap,
U_entries, U_values);
}

template <class ExecutionSpace, typename KernelHandle, typename ARowMapType, typename AEntriesType,
Expand Down
12 changes: 6 additions & 6 deletions sparse/unit_test/Test_Sparse_spiluk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ struct SpilukTest {
ValuesType L_values("L_values", spiluk_handle->get_nnzL() * static_cast<size_t>(block_items));
ValuesType U_values("U_values", spiluk_handle->get_nnzU() * static_cast<size_t>(block_items));

KokkosSparse::spiluk_numeric(&kh, fill_lev, row_map, entries, values, L_row_map, L_entries, L_values, U_row_map, U_entries,
U_values);
KokkosSparse::spiluk_numeric(&kh, fill_lev, row_map, entries, values, L_row_map, L_entries, L_values, U_row_map,
U_entries, U_values);

Kokkos::fence();

Expand Down Expand Up @@ -493,8 +493,8 @@ struct SpilukTest {
U_entries_v[i] = EntriesType("U_entries", spiluk_handle->get_nnzU());

// Symbolic phase
KokkosSparse::spiluk_symbolic(kh_ptr_v[i], fill_lev, A_row_map_v[i], A_entries_v[i], L_row_map_v[i], L_entries_v[i],
U_row_map_v[i], U_entries_v[i], nstreams);
KokkosSparse::spiluk_symbolic(kh_ptr_v[i], fill_lev, A_row_map_v[i], A_entries_v[i], L_row_map_v[i],
L_entries_v[i], U_row_map_v[i], U_entries_v[i], nstreams);

Kokkos::fence();

Expand Down Expand Up @@ -612,8 +612,8 @@ struct SpilukTest {
U_entries_v[i] = EntriesType("U_entries", spiluk_handle->get_nnzU());

// Symbolic phase
KokkosSparse::spiluk_symbolic(kh_ptr_v[i], fill_lev, A_row_map_v[i], A_entries_v[i], L_row_map_v[i], L_entries_v[i],
U_row_map_v[i], U_entries_v[i], nstreams);
KokkosSparse::spiluk_symbolic(kh_ptr_v[i], fill_lev, A_row_map_v[i], A_entries_v[i], L_row_map_v[i],
L_entries_v[i], U_row_map_v[i], U_entries_v[i], nstreams);

Kokkos::fence();

Expand Down

0 comments on commit 209c0b5

Please sign in to comment.