MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ hash_cell_nd()

uint64_t MayaFlux::Kinesis::detail::hash_cell_nd ( const Eigen::VectorXd &  p,
float  inv_cell 
)
inline

Definition at line 61 of file SpatialIndex.hpp.

62 {
63 uint64_t h = 0;
64 constexpr uint64_t primes[] = {
65 73856093ULL, 19349663ULL, 83492791ULL,
66 48611ULL, 76963ULL, 15485863ULL,
67 32452843ULL, 49979687ULL
68 };
69 Eigen::Index dims = std::min(p.size(), static_cast<Eigen::Index>(8));
70 for (Eigen::Index i = 0; i < dims; ++i) {
71 auto ci = static_cast<int32_t>(std::floor(p(i) * inv_cell));
72 h ^= static_cast<uint64_t>(static_cast<uint32_t>(ci)) * primes[i];
73 }
74 return h;
75 }
uint32_t h
Definition InkPress.cpp:25

References h.

Referenced by MayaFlux::Kinesis::SpatialIndex< PointT >::hash_cell(), and MayaFlux::Kinesis::SpatialIndex< PointT >::query_grid().

+ Here is the caller graph for this function: