21 #ifndef __broadSearchFunctions_hpp__
22 #define __broadSearchFunctions_hpp__
33 x = (x | x << 32) & 0x1f00000000ffff;
34 x = (x | x << 16) & 0x1f0000ff0000ff;
35 x = (x | x << 8) & 0x100f00f00f00f00f;
36 x = (x | x << 4) & 0x10c30c30c30c30c3;
37 x = (x | x << 2) & 0x1249249249249249;
51 x = x & 0x9249249249249249;
52 x = (x | (x >> 2)) & 0x30c30c30c30c30c3;
53 x = (x | (x >> 4)) & 0xf00f00f00f00f00f;
54 x = (x | (x >> 8)) & 0x00ff0000ff0000ff;
55 x = (x | (x >> 16)) & 0xffff00000000ffff;
56 x = (x | (x >> 32)) & 0x00000000ffffffff;
69 template<
typename indexType,
typename cellIndexType>
73 indexType nxny = extent.
x()*extent.
y();
74 cell.
z() =
static_cast<cellIndexType
>(idx / nxny);
75 auto rem = idx % nxny;
76 cell.
y() =
static_cast<cellIndexType
>(rem / extent.
x());
77 cell.
x() =
static_cast<cellIndexType
>(rem % extent.
x());
80 template<
typename cellIndexType>
90 template<
typename indexType,
typename cellIndexType>
101 #endif //__broadSearchFunctions_hpp__