21 #ifndef __mortonIndexing_hpp__
22 #define __mortonIndexing_hpp__
35 ViewType1D<realx3> pos,
36 ViewType1D<int8> flag,
41 uint64_t
splitBy3(
const uint64_t val){
43 x = (x | x << 32) & 0x1f00000000ffff;
44 x = (x | x << 16) & 0x1f0000ff0000ff;
45 x = (x | x << 8) & 0x100f00f00f00f00f;
46 x = (x | x << 4) & 0x10c30c30c30c30c3;
47 x = (x | x << 2) & 0x1249249249249249;
61 x = x & 0x9249249249249249;
62 x = (x | (x >> 2)) & 0x30c30c30c30c30c3;
63 x = (x | (x >> 4)) & 0xf00f00f00f00f00f;
64 x = (x | (x >> 8)) & 0x00ff0000ff0000ff;
65 x = (x | (x >> 16)) & 0xffff00000000ffff;
66 x = (x | (x >> 32)) & 0x00000000ffffffff;
88 #endif //__mortonIndexing_hpp__