Compute the intersection between grid cells and the ray. Args: ray_origins: (b, m, 3) ray_directions: (b, m, 3) ray_radius: (b,) grid_size: (b, 3) long, xyz grid_center: (b, 3), xyz grid_width: (b, 3), xyz Returns: ray2gidx: (b, m, n_gidxs), gidx can be outside the grid n_ray2gidx: (b, m), number of neighbors each ray
| 297 | // (b, m), number of neighbors each ray |
| 298 | // |
| 299 | std::tuple<torch::Tensor, torch::Tensor> grid_ray_intersection( |
| 300 | const torch::Tensor & ray_origins, // (b, m, 3), float |
| 301 | const torch::Tensor & ray_directions, // (b, m, 3), float |
| 302 | const torch::Tensor & ray_radius, // (b, )m float |
| 303 | const torch::Tensor & grid_size, // (b, 3), long |
| 304 | const torch::Tensor & grid_center, // (b, 3) float |
| 305 | const torch::Tensor & grid_width // (b, 3) float |
| 306 | ) { |
| 307 | CHECK_INPUT(ray_origins); |
| 308 | CHECK_INPUT(ray_directions); |
| 309 | CHECK_INPUT(ray_radius); |
| 310 | CHECK_INPUT(grid_size); |
| 311 | CHECK_INPUT(grid_center); |
| 312 | CHECK_INPUT(grid_width); |
| 313 | |
| 314 | return grid_ray_intersection_cuda( |
| 315 | ray_origins, |
| 316 | ray_directions, |
| 317 | ray_radius, |
| 318 | grid_size, |
| 319 | grid_center, |
| 320 | grid_width |
| 321 | ); |
| 322 | } |
| 323 | |
| 324 | |
| 325 |
nothing calls this directly
no outgoing calls
no test coverage detected