From d72986fce6bbf7373f34ce2937eb3461bc21fa2d Mon Sep 17 00:00:00 2001 From: ssg1002 Date: Fri, 12 Jul 2024 16:15:07 +0200 Subject: [PATCH] Remove modulus operation from hash, again --- cpp/kiss_icp/core/Preprocessing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/kiss_icp/core/Preprocessing.cpp b/cpp/kiss_icp/core/Preprocessing.cpp index d9e1d805..de315093 100644 --- a/cpp/kiss_icp/core/Preprocessing.cpp +++ b/cpp/kiss_icp/core/Preprocessing.cpp @@ -37,7 +37,7 @@ using Voxel = Eigen::Vector3i; struct VoxelHash { size_t operator()(const Voxel &voxel) const { const uint32_t *vec = reinterpret_cast(voxel.data()); - return ((1 << 20) - 1) & (vec[0] * 73856093 ^ vec[1] * 19349669 ^ vec[2] * 83492791); + return (vec[0] * 73856093 ^ vec[1] * 19349669 ^ vec[2] * 83492791); } };