From 452e8df700537c59a64d8be671187d0e6c28ac4d Mon Sep 17 00:00:00 2001 From: Jan Ciesko Date: Tue, 28 May 2024 14:03:06 -0600 Subject: [PATCH] Fix warning of wrong type arythmetic --- src/core/Kokkos_RemoteSpaces_ViewOffset.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Kokkos_RemoteSpaces_ViewOffset.hpp b/src/core/Kokkos_RemoteSpaces_ViewOffset.hpp index e3c8d47..7ba5294 100644 --- a/src/core/Kokkos_RemoteSpaces_ViewOffset.hpp +++ b/src/core/Kokkos_RemoteSpaces_ViewOffset.hpp @@ -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(Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD) * + static_cast(align)) < N) && ((N % div_ok) != 0)) ? N + align - (N % div_ok) : N; @@ -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(Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD) * + static_cast(align)) < N) && ((N % div_ok) != 0)) ? N + align - (N % div_ok) : N;