33#include " utils.h"
44
55void query_ball_point_kernel_dense_wrapper (int b, int n, int m, float radius, int nsample,
6- const float * new_xyz, const float * xyz, int * idx, float * dist_out);
6+ const float * new_xyz, const float * xyz, int * idx,
7+ float * dist_out);
78
89void query_ball_point_kernel_partial_wrapper (long batch_size, int size_x, int size_y, float radius,
910 int nsample, const float * x, const float * y,
1011 const long * batch_x, const long * batch_y,
1112 long * idx_out, float * dist_out);
1213
13- at::Tensor ball_query_dense (at::Tensor new_xyz, at::Tensor xyz, const float radius ,
14- const int nsample)
14+ std::pair< at::Tensor, at::Tensor> ball_query_dense (at::Tensor new_xyz, at::Tensor xyz,
15+ const float radius, const int nsample)
1516{
1617 CHECK_CONTIGUOUS (new_xyz);
1718 CHECK_CONTIGUOUS (xyz);
@@ -25,20 +26,19 @@ at::Tensor ball_query_dense(at::Tensor new_xyz, at::Tensor xyz, const float radi
2526
2627 at::Tensor idx = torch::zeros ({new_xyz.size (0 ), new_xyz.size (1 ), nsample},
2728 at::device (new_xyz.device ()).dtype (at::ScalarType::Int));
28- at::Tensor dist =
29- torch::full ({new_xyz. size ( 0 ), new_xyz. size ( 1 ), nsample}, - 1 , at::device (new_xyz.device ()).dtype (at::ScalarType::Float));
29+ at::Tensor dist = torch::full ({new_xyz. size ( 0 ), new_xyz. size ( 1 ), nsample}, - 1 ,
30+ at::device (new_xyz.device ()).dtype (at::ScalarType::Float));
3031
3132 if (new_xyz.type ().is_cuda ())
3233 {
33- query_ball_point_kernel_dense_wrapper (xyz. size ( 0 ), xyz. size ( 1 ), new_xyz. size ( 1 ), radius,
34- nsample, new_xyz.DATA_PTR <float >(),
35- xyz.DATA_PTR <float >(), idx.DATA_PTR <int >(), dist.DATA_PTR <int >());
34+ query_ball_point_kernel_dense_wrapper (
35+ xyz. size ( 0 ), xyz. size ( 1 ), new_xyz. size ( 1 ), radius, nsample, new_xyz.DATA_PTR <float >(),
36+ xyz.DATA_PTR <float >(), idx.DATA_PTR <int >(), dist.DATA_PTR <float >());
3637 }
3738 else
3839 {
3940 TORCH_CHECK (false , " CPU not supported" );
4041 }
41-
4242 return std::make_pair (idx, dist);
4343}
4444
0 commit comments