Spaces:
Sleeping
Sleeping
Download spac/_kernels/src/udf_cuda.cpp from Jack04810/SPAC-4B-ZeroGPU: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/spaces/Jack04810/SPAC-4B-ZeroGPU/resolve/main/spac/_kernels/src/udf_cuda.cpp
- Command line
-
hf download hf://spaces/Jack04810/SPAC-4B-ZeroGPU/spac/_kernels/src/udf_cuda.cpp
-
curl -L -o udf_cuda.cpp https://huggingface.co/spaces/Jack04810/SPAC-4B-ZeroGPU/resolve/main/spac/_kernels/src/udf_cuda.cpp
743 Bytes
| void compute_valid_sdf_cuda(float* vertices, int* faces, int64_t* sdf, | |
| int numTriangles, int DIM, float threshold); | |
| extern "C" | |
| void compute_valid_sdf_wrapper(torch::Tensor vertices, torch::Tensor faces, | |
| torch::Tensor sdf, int numTriangles, | |
| int DIM=512, float threshold=8.0) { | |
| compute_valid_sdf_cuda(vertices.data_ptr<float>(), faces.data_ptr<int>(), | |
| sdf.data_ptr<int64_t>(), numTriangles, DIM, threshold); | |
| } | |
| PYBIND11_MODULE(TORCH_EXTENSION_NAME, module) { | |
| module.def("compute_valid_sdf", &compute_valid_sdf_wrapper, | |
| "Compute signed SDF using CUDA"); | |
| } | |