Skip to content

Commit

Permalink
Fix #1798
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-kelley committed Apr 18, 2023
1 parent f697557 commit 40eac29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_common/KokkosKernels_TestUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,26 @@ struct view_stride_adapter {
if constexpr (rank == 1) {
if constexpr (strided) {
d_base = DViewBase(label, m, 2);
h_base = Kokkos::create_mirror_view(Kokkos::HostSpace(), d_base);
h_base = Kokkos::create_mirror_view(d_base);
d_view = Kokkos::subview(d_base, Kokkos::ALL(), 0);
h_view = Kokkos::subview(h_base, Kokkos::ALL(), 0);
} else {
d_base = DViewBase(label, m);
h_base = Kokkos::create_mirror_view(Kokkos::HostSpace(), d_base);
h_base = Kokkos::create_mirror_view(d_base);
d_view = d_base;
h_view = h_base;
}
} else {
if constexpr (strided) {
d_base = DViewBase(label, m, n, 2);
h_base = Kokkos::create_mirror_view(Kokkos::HostSpace(), d_base);
h_base = Kokkos::create_mirror_view(d_base);
d_view =
Kokkos::subview(d_base, Kokkos::ALL(), Kokkos::make_pair(0, n), 0);
h_view =
Kokkos::subview(h_base, Kokkos::ALL(), Kokkos::make_pair(0, n), 0);
} else {
d_base = DViewBase(label, m, n);
h_base = Kokkos::create_mirror_view(Kokkos::HostSpace(), d_base);
h_base = Kokkos::create_mirror_view(d_base);
d_view = d_base;
h_view = h_base;
}
Expand Down

0 comments on commit 40eac29

Please sign in to comment.