Unverified Commit 1a2f174f authored by VVsssssk's avatar VVsssssk Committed by GitHub
Browse files

[Bug] Fix voxelization bug (#1822)

* fix voxelization bug

* fix code
parent d929fa41
...@@ -101,7 +101,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor, ...@@ -101,7 +101,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
CUDA_1D_KERNEL_LOOP(index, num_points) { CUDA_1D_KERNEL_LOOP(index, num_points) {
auto coor_offset = coor + index * NDim; auto coor_offset = coor + index * NDim;
// skip invalid points // skip invalid points
if (coor_offset[0] == -1) return; if (coor_offset[0] == -1) continue;
int num = 0; int num = 0;
int coor_x = coor_offset[0]; int coor_x = coor_offset[0];
...@@ -122,7 +122,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor, ...@@ -122,7 +122,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
point_to_pointidx[index] = i; point_to_pointidx[index] = i;
} else if (num >= max_points) { } else if (num >= max_points) {
// out of boundary // out of boundary
return; break;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment