GENIE
|
Go to the source code of this file.
Macros | |
#define | cudaCheckErrors(err) __cudaSafeCall( err, __FILE__, __LINE__ ) |
The wrapper function to validate CUDA calls. More... | |
#define | CUDA_CHECK_ERROR(err) __cudaSafeCall( err, __FILE__, __LINE__ ) |
#define | CUDA_LAST_ERROR() __cudaGetLastError (__FILE__, __LINE__) |
Functions | |
void | __cudaSafeCall (cudaError err, const char *file, const int line) |
The hidden wrapper function to validate CUDA calls. More... | |
void | __cudaGetLastError (const char *file, const int line) |
#define CUDA_CHECK_ERROR | ( | err | ) | __cudaSafeCall( err, __FILE__, __LINE__ ) |
Definition at line 24 of file cuda_macros.h.
#define CUDA_LAST_ERROR | ( | ) | __cudaGetLastError (__FILE__, __LINE__) |
Definition at line 33 of file cuda_macros.h.
cudaCheckErrors | ( | err | ) | __cudaSafeCall( err, __FILE__, __LINE__ ) |
The wrapper function to validate CUDA calls.
Check for existing cuda errors.
Please wrap all CUDA calls with this function.
Once a CUDA error is detected, a genie::exception::gpu_runtime_error will be thrown and the error will be logged.
err | The CUDA error. |
Once a CUDA error is detected, a genie::exception::gpu_runtime_error will be thrown and the error will be logged.
Definition at line 23 of file cuda_macros.h.
|
inline |
Definition at line 64 of file cuda_macros.h.
|
inline |
The hidden wrapper function to validate CUDA calls.
This function should not be called directly. It is wrapped in a macro expansion cudaCheckErrors( err ) . Please wrap all CUDA calls with cudaCheckErrors.
Once cuda errors are detected, a genie::exception::gpu_runtime_error will be thrown and the errors will be logged.
err | The CUDA error. |
file | The source code file name. |
line | The line number that indicates the source of the error. |
Definition at line 49 of file cuda_macros.h.