37 #ifndef __PCL_CUDA_SAFE_CALL_HPP__
38 #define __PCL_CUDA_SAFE_CALL_HPP__
40 #include "cuda_runtime_api.h"
41 #include <pcl/gpu/containers/initialization.h>
44 #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
46 #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__)
53 static inline void ___cudaSafeCall(cudaError_t err,
const char *file,
const int line,
const char *func =
"")
55 if (cudaSuccess != err)
56 error(cudaGetErrorString(err), file, line, func);
59 static inline int divUp(
int total,
int grain) {
return (total + grain - 1) / grain; }
static int divUp(int total, int grain)
void PCL_EXPORTS error(const char *error_string, const char *file, const int line, const char *func="")
Error handler.
static void ___cudaSafeCall(cudaError_t err, const char *file, const int line, const char *func="")