Skip to content

Commit

Permalink
Prefer atomic_increment to atomic_inc
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Oct 15, 2024
1 parent 4243afc commit c6f5243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/tstDendrogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka_same_weights, DeviceType,
Kokkos::parallel_for(
"Testing::count_children", Kokkos::RangePolicy(space, 0, 2 * n - 1),
KOKKOS_LAMBDA(int i) {
Kokkos::atomic_inc(&counts(mst.dendrogram_parents(i)));
Kokkos::atomic_increment(&counts(mst.dendrogram_parents(i)));
});

int wrong_counts;
Expand Down
2 changes: 1 addition & 1 deletion test/tstDistributedTreeSpatial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ struct CustomPureInlineCallback
template <typename Query>
KOKKOS_FUNCTION void operator()(Query const &, PairIndexRank pair) const
{
Kokkos::atomic_inc(&counts(pair.index));
Kokkos::atomic_increment(&counts(pair.index));
}
};

Expand Down

0 comments on commit c6f5243

Please sign in to comment.