NVIDIA-AI-IOT / CUDA-PointPillars

A project demonstrating how to use CUDA-PointPillars to deal with cloud points data from lidar.
Apache License 2.0
502 stars 148 forks source link

In the preprocessing module, why calculate the pillar index value twice? #92

Open leidahhh opened 11 months ago

leidahhh commented 11 months ago

global void generateBaseFeatures_kernel(unsigned int mask, float voxels, int grid_y_size, int grid_x_size, unsigned int pillar_num, float voxel_features, float voxel_num_points, float coords) { int voxel_idx = blockIdx.x blockDim.x + threadIdx.x; int voxel_idy = blockIdx.y blockDim.y + threadIdx.y;

if(voxel_idx >= grid_x_size ||voxel_idy >= grid_y_size) return;

unsigned int voxel_index = voxel_idy * grid_x_size

In the code block, the voxel_idx is calculated once according to the thread index value, why is it calculated again later current_pillarId and is there any difference between the two index values. I would very appreciate if could reply my confusions!