Gather the points belonging to each grid cell. Args: grid_idxs: (b, n), grid linear index of each point total_cells: (b,) total grid cells valid_mask: (b, n), whether to record the point cell_counts: (b, max_num_cells), number of points in a cell Returns: vector of vector of tensors, b -> cell_idx -> pidx of points in the cell
| 220 | // vector of vector of tensors, b -> cell_idx -> pidx of points in the cell |
| 221 | // |
| 222 | std::vector<std::vector<torch::Tensor> > gather_points_v1( |
| 223 | const torch::Tensor & grid_idxs, // (b, n), long |
| 224 | const torch::Tensor & total_cells, // (b,) int64_t |
| 225 | const torch::Tensor & valid_mask, // (b, n), bool |
| 226 | const torch::Tensor & cell_counts // (b, n_cells), int32 |
| 227 | ) { |
| 228 | |
| 229 | CHECK_INPUT(grid_idxs); |
| 230 | CHECK_INPUT(total_cells); |
| 231 | CHECK_INPUT(valid_mask); |
| 232 | CHECK_INPUT(cell_counts); |
| 233 | |
| 234 | return gather_points_cuda(grid_idxs, total_cells, valid_mask, cell_counts); |
| 235 | } |
| 236 | |
| 237 | |
| 238 | // Gather the points belonging to each grid cell. |
nothing calls this directly
no outgoing calls
no test coverage detected