Skip to content

Commit

Permalink
Fix warning of wrong type arythmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
janciesko committed Jun 10, 2024
1 parent d55d5e6 commit 452e8df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/Kokkos_RemoteSpaces_ViewOffset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ struct ViewOffset<
KOKKOS_INLINE_FUNCTION
static constexpr size_t stride(size_t const N) {
return ((align != 0) &&
((Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD * align) < N) &&
((static_cast<int>(Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD) *
static_cast<int>(align)) < N) &&
((N % div_ok) != 0))
? N + align - (N % div_ok)
: N;
Expand Down Expand Up @@ -1197,7 +1198,8 @@ struct ViewOffset<
KOKKOS_INLINE_FUNCTION
static constexpr size_t stride(size_t const N) {
return ((align != 0) &&
((Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD * align) < N) &&
((static_cast<int>(Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD) *
static_cast<int>(align)) < N) &&
((N % div_ok) != 0))
? N + align - (N % div_ok)
: N;
Expand Down

0 comments on commit 452e8df

Please sign in to comment.