Skip to content

Commit

Permalink
fix fasthash primes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawkey committed Feb 18, 2022
1 parent 17272eb commit cb3a0e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hashencoder/src/hashencoder.cu
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ __device__ uint32_t fast_hash(const uint32_t pos_grid[D]) {
// While 1 is technically not a good prime for hashing (or a prime at all), it helps memory coherence
// and is sufficient for our use case of obtaining a uniformly colliding index from high-dimensional
// coordinates.
constexpr uint32_t primes[7] = { 1, 19349663, 83492791, 25165843, 6291469, 12582917, 3145739 };
constexpr uint32_t primes[7] = { 1, 2654435761, 805459861, 3674653429, 2097192037, 1434869437, 2165219737 };

uint32_t result = 0;
#pragma unroll
Expand Down

0 comments on commit cb3a0e4

Please sign in to comment.