Skip to content

Commit

Permalink
Remove redundant Modulus operation for Voxel Hash function (#358)
Browse files Browse the repository at this point in the history
* Make voxel computation consistent across all source code, also use std::floor to have explicit control over type casting

* Use available function for conversion

* Remove redundant Modulus operation for Vocel Hash function, set robin map params instead

* Make it a one liner

* remove numeric from includes

* New proposal

* remove numeric from include

* shrink diff

* Consistency as always

* Split changes into two PRs

* Revert "Merge remote-tracking branch 'origin' into gupta_fix_hash"

This reverts commit 6e46c0d, reversing
changes made to 07634eb.

---------

Co-authored-by: tizianoGuadagnino <[email protected]>
Co-authored-by: Ignacio Vizzo <[email protected]>
  • Loading branch information
3 people authored Jul 9, 2024
1 parent 917d528 commit e19823a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/kiss_icp/core/VoxelHashMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct VoxelHashMap {
struct VoxelHash {
size_t operator()(const Voxel &voxel) const {
const uint32_t *vec = reinterpret_cast<const uint32_t *>(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);
}
};

Expand Down

0 comments on commit e19823a

Please sign in to comment.