Download pc_util/src/ball_query.cpp from WatsonTang98/baseline_null: direct link, hf CLI and curl.
- Browser
- Download file 3 kB
-
https://huggingface.co/WatsonTang98/baseline_null/resolve/dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/ball_query.cpp
- Command line
-
hf download hf://WatsonTang98/baseline_null@dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/ball_query.cpp
-
curl -L -o ball_query.cpp https://huggingface.co/WatsonTang98/baseline_null/resolve/dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/ball_query.cpp
3 kB
| // #include <THC/THC.h> | |
| // extern THCState *state; | |
| // cudaStream_t stream = at::cuda::getCurrentCUDAStream(); | |
| int ball_query_wrapper_fast(int b, int n, int m, float radius, int nsample, | |
| at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor idx_tensor) { | |
| CHECK_INPUT(new_xyz_tensor); | |
| CHECK_INPUT(xyz_tensor); | |
| const float *new_xyz = new_xyz_tensor.data<float>(); | |
| const float *xyz = xyz_tensor.data<float>(); | |
| int *idx = idx_tensor.data<int>(); | |
| ball_query_kernel_launcher_fast(b, n, m, radius, nsample, new_xyz, xyz, idx); | |
| return 1; | |
| } | |
| int ball_center_query_wrapper_fast(int b, int n, int m, float radius, | |
| at::Tensor point_tensor, at::Tensor key_point_tensor, at::Tensor idx_tensor) { | |
| CHECK_INPUT(point_tensor); | |
| CHECK_INPUT(key_point_tensor); | |
| const float *point = point_tensor.data<float>(); | |
| const float *key_point = key_point_tensor.data<float>(); | |
| int *idx = idx_tensor.data<int>(); | |
| ball_center_query_kernel_launcher_fast(b, n, m, radius, point, key_point, idx); | |
| return 1; | |
| } | |
| int knn_query_wrapper_fast(int b, int n, int m, int nsample, | |
| at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor) { | |
| CHECK_INPUT(new_xyz_tensor); | |
| CHECK_INPUT(xyz_tensor); | |
| const float *new_xyz = new_xyz_tensor.data<float>(); | |
| const float *xyz = xyz_tensor.data<float>(); | |
| float *dist2 = dist2_tensor.data<float>(); | |
| int *idx = idx_tensor.data<int>(); | |
| knn_query_kernel_launcher_fast(b, n, m, nsample, new_xyz, xyz, dist2, idx); | |
| return 1; | |
| } | |
| int ball_query_wrapper_stack(int B, int M, float radius, int nsample, | |
| at::Tensor new_xyz_tensor, at::Tensor new_xyz_batch_cnt_tensor, | |
| at::Tensor xyz_tensor, at::Tensor xyz_batch_cnt_tensor, at::Tensor idx_tensor) { | |
| CHECK_INPUT(new_xyz_tensor); | |
| CHECK_INPUT(xyz_tensor); | |
| CHECK_INPUT(new_xyz_batch_cnt_tensor); | |
| CHECK_INPUT(xyz_batch_cnt_tensor); | |
| const float *new_xyz = new_xyz_tensor.data<float>(); | |
| const float *xyz = xyz_tensor.data<float>(); | |
| const int *new_xyz_batch_cnt = new_xyz_batch_cnt_tensor.data<int>(); | |
| const int *xyz_batch_cnt = xyz_batch_cnt_tensor.data<int>(); | |
| int *idx = idx_tensor.data<int>(); | |
| ball_query_kernel_launcher_stack(B, M, radius, nsample, new_xyz, new_xyz_batch_cnt, xyz, xyz_batch_cnt, idx); | |
| return 1; | |
| } |