22__device__ __host__ __forceinline__
unsigned
28 return std::bitset<8*sizeof(integer)> (
integer).count();
34 const unsigned& level,
35 const std::uint8_t&
mask,
46 for (
unsigned i = 0; i < 8; ++i) {
47 if ((
mask & (1 << i)) == 0)
51 (index.y << 1) + ((i >> 1) & 1),
52 (index.z << 1) + ((i >> 2) & 1));
78#pragma hd_warning_disable
92 const auto node = nodes[node_idx];
93 const std::uint8_t
mask = node & 0xFF;
Iterator class for point clouds with or without given indices.
__device__ __host__ int findNode(const float3 minp, const float3 maxp, const float3 query, const T nodes)
__device__ __host__ __forceinline__ unsigned getBitsNum(const unsigned integer)
__host__ __device__ __forceinline__ std::pair< uint3, std::uint8_t > nearestVoxel(const float3 query, const unsigned &level, const std::uint8_t &mask, const float3 &minp, const float3 &maxp, const uint3 &index)
__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)