37 #ifndef PCL_GPU_OCTREE_MORTON_HPP
38 #define PCL_GPU_OCTREE_MORTON_HPP
53 __device__ __host__ __forceinline__
57 x = (x | (x << 10)) & 0x000f801f;
58 x = (x | (x << 4)) & 0x00e181c3;
59 x = (x | (x << 2)) & 0x03248649;
60 x = (x | (x << 2)) & 0x09249249;
65 __device__ __host__ __forceinline__
68 x = ( x >> offset ) & 0x09249249;
69 x = (x | (x >> 2)) & 0x03248649;
70 x = (x | (x >> 2)) & 0x00e181c3;
71 x = (x | (x >> 4)) & 0x000f801f;
72 x = (x | (x >> 10)) & 0x000003FF;
77 __device__ __host__ __forceinline__
83 __device__ __host__ __forceinline__
91 __device__ __host__ __forceinline__
97 __host__ __device__ __forceinline__
100 return (
code >> (
nbits - 3 * (level + 1) )) & 7;
103 __host__ __device__ __forceinline__
106 return level_code << (
nbits - 3 * (level + 1));
117 __device__ __host__ __forceinline__
CalcMorton(float3 minp, float3 maxp) :
minp_(minp)
119 dims_.x = maxp.x - minp.x;
120 dims_.y = maxp.y - minp.y;
121 dims_.z = maxp.z - minp.z;
136 return (*
this)(make_float3(p.x, p.y, p.z));
144 __device__ __host__ __forceinline__
147 __device__ __host__ __forceinline__
__device__ __host__ __forceinline__ Morton::code_t operator()(const float4 &p) const
static const int depth_mult
__device__ __host__ __forceinline__ CalcMorton(float3 minp, float3 maxp)
__device__ __host__ __forceinline__ Morton::code_t operator()(const float3 &p) const
__device__ __host__ __forceinline__ CompareByLevelCode(int level_arg)
__device__ __host__ __forceinline__ bool operator()(Morton::code_t code1, Morton::code_t code2) const
__device__ __host__ static __forceinline__ void decomposeCode(code_t code, int &cell_x, int &cell_y, int &cell_z)
__host__ __device__ static __forceinline__ code_t extractLevelCode(code_t code, int level)
__device__ __host__ static __forceinline__ int spreadBits(int x, int offset)
__device__ __host__ static __forceinline__ code_t createCode(int cell_x, int cell_y, int cell_z)
__device__ __host__ static __forceinline__ int compactBits(int x, int offset)
static const int bits_per_level
__device__ __host__ static __forceinline__ uint3 decomposeCode(code_t code)
__host__ __device__ static __forceinline__ code_t shiftLevelCode(code_t level_code, int level)