Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a warning for 64-bit 2D Morton codes #640

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/details/ArborX_DetailsMortonCode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ KOKKOS_INLINE_FUNCTION
unsigned int morton32(float x, float y)
{
// The interval [0,1] is subdivided into 65,536 bins (in each direction).
constexpr unsigned N = (1 << 16);
constexpr unsigned N = (1u << 16);

using KokkosExt::max;
using KokkosExt::min;
Expand All @@ -95,7 +95,7 @@ KOKKOS_INLINE_FUNCTION
unsigned int morton32(float x, float y, float z)
{
// The interval [0,1] is subdivided into 1024 bins (in each direction).
constexpr unsigned N = (1 << 10);
constexpr unsigned N = (1u << 10);

using KokkosExt::max;
using KokkosExt::min;
Expand All @@ -114,7 +114,7 @@ unsigned long long morton64(float x, float y)
{
// The interval [0,1] is subdivided into 2,147,483,648 bins (in each
// direction).
constexpr unsigned N = (1 << 31);
constexpr unsigned N = (1u << 31);
aprokop marked this conversation as resolved.
Show resolved Hide resolved

using KokkosExt::max;
using KokkosExt::min;
Expand All @@ -133,7 +133,7 @@ KOKKOS_INLINE_FUNCTION
unsigned long long morton64(float x, float y, float z)
{
// The interval [0,1] is subdivided into 2,097,152 bins (in each direction).
constexpr unsigned N = (1 << 21);
constexpr unsigned N = (1u << 21);

using KokkosExt::max;
using KokkosExt::min;
Expand Down