37 #ifndef __PCL_CUDA_SAFE_CALL_HPP__
38 #define __PCL_CUDA_SAFE_CALL_HPP__
40 #include <cuda_runtime_api.h>
45 #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
47 #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__)
57 const char* func =
"")
59 if (cudaSuccess != err) {
60 std::cout <<
"Error: " << cudaGetErrorString(err) <<
"\t" << file <<
":" << line
61 <<
":" << func << std::endl;
69 return (total + grain - 1) / grain;
static int divUp(int total, int grain)
static void ___cudaSafeCall(cudaError_t err, const char *file, const int line, const char *func="")