Skip to content

Commit

Permalink
Make prime
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Mersch <benedikt.mersch@gmail.com>
  • Loading branch information
benemer committed Jun 16, 2023
1 parent 9a57c7e commit feb6639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nanovdb/nanovdb/NanoVDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ class Coord
/// @brief Return a hash key derived from the existing coordinates.
/// @details For details on this hash function please see the VDB paper.
template<int Log2N = 3 + 4 + 5>
__hostdev__ uint32_t hash() const { return ((1 << Log2N) - 1) & (mVec[0] * 73856093 ^ mVec[1] * 19349663 ^ mVec[2] * 83492791); }
__hostdev__ uint32_t hash() const { return ((1 << Log2N) - 1) & (mVec[0] * 73856093 ^ mVec[1] * 19349669 ^ mVec[2] * 83492791); }

/// @brief Return the octant of this Coord
//__hostdev__ size_t octant() const { return (uint32_t(mVec[0])>>31) | ((uint32_t(mVec[1])>>31)<<1) | ((uint32_t(mVec[2])>>31)<<2); }
Expand Down
2 changes: 1 addition & 1 deletion openvdb/openvdb/math/Coord.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class Coord
size_t hash() const
{
const uint32_t* vec = reinterpret_cast<const uint32_t*>(mVec.data());
return ((1<<Log2N)-1) & (vec[0]*73856093 ^ vec[1]*19349663 ^ vec[2]*83492791);
return ((1<<Log2N)-1) & (vec[0]*73856093 ^ vec[1]*19349669 ^ vec[2]*83492791);
}

private:
Expand Down

0 comments on commit feb6639

Please sign in to comment.