Skip to content

Commit

Permalink
Fix TestAtomic to use the test execspace
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Aug 25, 2023
1 parent 3223007 commit b70d78f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/unit_test/TestAtomics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ struct TpetraUseCase {
};

using T = int;
Kokkos::View<T> d_{"lbl"};
Kokkos::View<T, TEST_EXECSPACE> d_{"lbl"};
KOKKOS_FUNCTION void operator()(int i) const {
// 0, -1, 2, -3, ...
auto v_i = static_cast<T>(i);
Expand All @@ -572,7 +572,9 @@ struct TpetraUseCase {
AbsMaxHelper<T>{v_i});
}

TpetraUseCase() { Kokkos::parallel_for(10, *this); }
TpetraUseCase() {
Kokkos::parallel_for(Kokkos::RangePolicy<TEST_EXECSPACE>(0, 10), *this);
}

void check() {
T v;
Expand Down

0 comments on commit b70d78f

Please sign in to comment.