Download pc_util/src/cluster.cpp from WatsonTang98/baseline_null: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/WatsonTang98/baseline_null/resolve/dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/cluster.cpp
- Command line
-
hf download hf://WatsonTang98/baseline_null@dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/cluster.cpp
-
curl -L -o cluster.cpp https://huggingface.co/WatsonTang98/baseline_null/resolve/dc90b4028e0430b92a4e54a9ebaec51159ec00f5/pc_util/src/cluster.cpp
1.55 kB
| // #include <THC/THC.h> | |
| // extern THCState *state; | |
| // cudaStream_t stream = at::cuda::getCurrentCUDAStream(); | |
| int dbscan_wrapper_fast(int b, int n, float eps, int min_pts, at::Tensor xyz_tensor, at::Tensor idx_tensor) { | |
| CHECK_INPUT(xyz_tensor); | |
| const float *xyz = xyz_tensor.data<float>(); | |
| int *idx = idx_tensor.data<int>(); | |
| dbscan_kernel_launcher_fast(b, n, eps, min_pts, xyz, idx); | |
| return 1; | |
| } | |
| int cluster_pts_wrapper_fast(int b, int n, int m, at::Tensor xyz_tensor, at::Tensor idx_tensor, | |
| at::Tensor new_xyz_tensor, at::Tensor num_tensor) { | |
| CHECK_INPUT(xyz_tensor); | |
| CHECK_INPUT(idx_tensor); | |
| const float *xyz = xyz_tensor.data<float>(); | |
| const int *idx = idx_tensor.data<int>(); | |
| float *new_xyz = new_xyz_tensor.data<float>(); | |
| int *num = num_tensor.data<int>(); | |
| cluster_pts_kernel_launcher_fast(b, n, m, xyz, idx, new_xyz, num); | |
| return 1; | |
| } | |