Skip to content

Commit

Permalink
sparse_sort_crs: Fix row begin/end offset in entry shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson authored Sep 26, 2024
1 parent 3d6bbb2 commit 129c837
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion perf_test/sparse/KokkosSparse_sort_crs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ void run_experiment(int argc, char** argv, const CommonInputParams& common_param
std::random_device rd;
std::mt19937 g(rd());
for (lno_t i = 0; i < m; i++) {
std::shuffle(entriesHost.data() + i, entriesHost.data() + i + 1, g);
const size_type rowBegin = rowmapHost(i);
const size_type rowEnd = rowmapHost(i+1);
std::shuffle(entriesHost.data() + rowBegin, entriesHost.data() + rowEnd, g);
}
Kokkos::deep_copy(shuffledEntries, entriesHost);
exec_space exec;
Expand Down

0 comments on commit 129c837

Please sign in to comment.