Change name to pyrad

This commit is contained in:
Matt Tancik committed 2022-05-31 14:15:06 -07:00
1 parent ee1dcdd197
commit 1a8ad9a763
87 files changed
+186 -187

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
/*
This file uses pybind to make CUDA calls.
*/
#include <torch/extension.h>
#include <vector>
// CUDA forward declarations
std::vector<torch::Tensor> sample_uniformly_along_ray_bundle(
torch::Tensor origins,
torch::Tensor directions,
torch::Tensor nears,
torch::Tensor fars,
torch::Tensor offsets,
int max_num_samples);
// C++ interface
#define CHECK_CUDA(x) TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) \
CHECK_CUDA(x); \
CHECK_CONTIGUOUS(x)
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
{
m.def("sample_uniformly_along_ray_bundle", &sample_uniformly_along_ray_bundle);
}