32 #ifdef BUILD_CUDA_MODULE 35 #include <cuda_runtime.h> 37 #endif // #ifdef BUILD_CUDA_MODULE 44 #ifdef BUILD_CUDA_MODULE 45 #define OPEN3D_ML_CUDA_CHECK(err) \ 47 { open3d::ml::__OPEN3D_ML_CUDA_CHECK((err), __FILE__, __LINE__); } 53 #ifdef BUILD_CUDA_MODULE 54 inline int GetCUDACurrentDeviceTextureAlignment() {
57 cudaError_t err = cudaGetDevice(&device);
58 if (err != cudaSuccess) {
59 throw std::runtime_error(
60 "GetCUDACurrentDeviceTextureAlignment(): cudaGetDevice failed " 62 std::string(cudaGetErrorString(err)));
66 err = cudaDeviceGetAttribute(&value, cudaDevAttrTextureAlignment, device);
67 if (err != cudaSuccess) {
68 throw std::runtime_error(
69 "GetCUDACurrentDeviceTextureAlignment(): cudaGetDevice failed " 71 std::string(cudaGetErrorString(err)));
77 inline void __OPEN3D_ML_CUDA_CHECK(cudaError_t err,
81 if (err != cudaSuccess) {
82 fprintf(stderr,
"%s:%d CUDA runtime error: %s\n", file, line,
83 cudaGetErrorString(err));
Definition: PinholeCameraIntrinsic.cpp:35