Skip to content

Commit

Permalink
Fix to avoid kokkos#186-D pointless comparison warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenarnst committed Sep 10, 2023
1 parent ba1bd23 commit 4389d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/impl/Kokkos_ViewMapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3667,7 +3667,7 @@ class ViewMapping<
size_t exp_stride = 1;
if (std::is_same<typename DstTraits::array_layout,
Kokkos::LayoutLeft>::value) {
for (unsigned int i = 0; i < src.Rank; i++) {
for (int i = 0; i < (int)src.Rank; i++) {
if (i > 0) exp_stride *= src.extent(i - 1);
if (strides[i] != exp_stride) {
assignable = false;
Expand All @@ -3676,7 +3676,7 @@ class ViewMapping<
}
} else if (std::is_same<typename DstTraits::array_layout,
Kokkos::LayoutRight>::value) {
for (unsigned int i = 0; i < src.Rank; i++) {
for (int i = 0; i < (int)src.Rank; i++) {
if (i > 0) exp_stride *= src.extent(src.Rank - i);
if (strides[src.Rank - 1 - i] != exp_stride) {
assignable = false;
Expand Down

0 comments on commit 4389d81

Please sign in to comment.