From 79c95ee1d14f2720e444969a9e8a01477263a303 Mon Sep 17 00:00:00 2001 From: Brian Kelley Date: Wed, 28 Sep 2022 10:24:50 -0600 Subject: [PATCH] Use CRS matrix sort, instead of Kokkos::sort on each row --- .../KokkosSparse_spiluk_symbolic_impl.hpp | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sparse/impl/KokkosSparse_spiluk_symbolic_impl.hpp b/sparse/impl/KokkosSparse_spiluk_symbolic_impl.hpp index 691d624963..99d0ab1fe8 100644 --- a/sparse/impl/KokkosSparse_spiluk_symbolic_impl.hpp +++ b/sparse/impl/KokkosSparse_spiluk_symbolic_impl.hpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include //#define SYMBOLIC_OUTPUT_INFO @@ -451,18 +451,12 @@ void iluk_symbolic(IlukHandle& thandle, thandle.set_nnzU(cntU); // Sort - for (size_type row_id = 0; - row_id < static_cast(L_row_map.extent(0)) - 1; row_id++) { - size_type row_start = L_row_map(row_id); - size_type row_end = L_row_map(row_id + 1); - Kokkos::sort(subview(L_entries, Kokkos::make_pair(row_start, row_end))); - } - for (size_type row_id = 0; - row_id < static_cast(U_row_map.extent(0)) - 1; row_id++) { - size_type row_start = U_row_map(row_id); - size_type row_end = U_row_map(row_id + 1); - Kokkos::sort(subview(U_entries, Kokkos::make_pair(row_start, row_end))); - } + KokkosSparse::sort_crs_graph( + L_row_map, L_entries); + KokkosSparse::sort_crs_graph( + U_row_map, U_entries); // Level scheduling on L if (thandle.get_algorithm() ==