Jetson Inference
DNN Vision Library
|
Error checking and logging macros. More...
Macros | |
#define | CUDA(x) cudaCheckError((x), #x, __FILE__, __LINE__) |
Execute a CUDA call and print out any errors. More... | |
#define | CUDA_SUCCESS(x) (CUDA(x) == cudaSuccess) |
Evaluates to true on success. More... | |
#define | CUDA_FAILED(x) (CUDA(x) != cudaSuccess) |
Evaluates to true on failure. More... | |
#define | CUDA_VERIFY(x) if(CUDA_FAILED(x)) return false; |
Return from the boolean function if CUDA call fails. More... | |
#define | LOG_CUDA "[cuda] " |
LOG_CUDA string. More... | |
#define | CUDA_FREE(x) if(x != NULL) { cudaFree(x); x = NULL; } |
Check for non-NULL pointer before freeing it, and then set the pointer to NULL. More... | |
#define | CUDA_FREE_HOST(x) if(x != NULL) { cudaFreeHost(x); x = NULL; } |
Check for non-NULL pointer before freeing it, and then set the pointer to NULL. More... | |
Functions | |
cudaError_t | cudaCheckError (cudaError_t retval, const char *txt, const char *file, int line) |
cudaCheckError More... | |
Error checking and logging macros.
#define CUDA | ( | x | ) | cudaCheckError((x), #x, __FILE__, __LINE__) |
Execute a CUDA call and print out any errors.
#define CUDA_FAILED | ( | x | ) | (CUDA(x) != cudaSuccess) |
Evaluates to true on failure.
#define CUDA_FREE | ( | x | ) | if(x != NULL) { cudaFree(x); x = NULL; } |
Check for non-NULL pointer before freeing it, and then set the pointer to NULL.
#define CUDA_FREE_HOST | ( | x | ) | if(x != NULL) { cudaFreeHost(x); x = NULL; } |
Check for non-NULL pointer before freeing it, and then set the pointer to NULL.
#define CUDA_SUCCESS | ( | x | ) | (CUDA(x) == cudaSuccess) |
Evaluates to true on success.
#define CUDA_VERIFY | ( | x | ) | if(CUDA_FAILED(x)) return false; |
Return from the boolean function if CUDA call fails.
#define LOG_CUDA "[cuda] " |
LOG_CUDA string.
|
inline |
cudaCheckError