18 using Vector3u = Eigen::Vector3<uint32_t>;
20 MUDA_GENERIC uint32_t operator()(
const Vector3u& p)
const
22 return (*
this)(p.x(), p.y(), p.z());
25 constexpr MUDA_GENERIC uint32_t operator()(uint32_t x, uint32_t y, uint32_t z)
const
30 return x | y << 1 | z << 2;
36 constexpr MUDA_GENERIC
static uint32_t expand_bits(uint32_t v)
44 v = (v | v << 16) & 0x30000ff;
45 v = (v | v << 8) & 0x300f00f;
46 v = (v | v << 4) & 0x30c30c3;
47 v = (v | v << 2) & 0x9249249;
56 using Vector3u = Eigen::Vector3<uint32_t>;
58 MUDA_GENERIC uint64_t operator()(
const Vector3u& p)
const
60 return (*
this)(p.x(), p.y(), p.z());
63 constexpr MUDA_GENERIC uint64_t operator()(uint32_t x, uint32_t y, uint32_t z)
const
68 return x | y << 1 | z << 2;
74 constexpr MUDA_GENERIC
static uint64_t expand_bits(uint64_t v)
77 v = (v | v << 32) & 0x1f00000000ffff;
78 v = (v | v << 16) & 0x1f0000ff0000ff;
79 v = (v | v << 8) & 0x100f00f00f00f00f;
80 v = (v | v << 4) & 0x10c30c30c30c30c3;
81 v = (v | v << 2) & 0x1249249249249249;