CoreNEURON
utils_cuda.h File Reference
#include <stdio.h>
#include <cuda_runtime_api.h>

Go to the source code of this file.

Macros

#define CHECKLAST(MSG)
 
#define CHECKCALL(RET)
 

Macro Definition Documentation

◆ CHECKCALL

#define CHECKCALL (   RET)
Value:
do { \
cudaError_t e = (RET); \
if (e != cudaSuccess) { \
fprintf(stderr, "%s:%d: CUDA Error: %s\n", __FILE__, __LINE__, cudaGetErrorString(e)); \
exit(1); \
} \
} while (0)

Definition at line 28 of file utils_cuda.h.

◆ CHECKLAST

#define CHECKLAST (   MSG)
Value:
do { \
cudaError_t e = cudaGetLastError(); \
if (e != cudaSuccess) { \
fprintf(stderr, \
"%s:%d: CUDA Error: %s: %s\n", \
__FILE__, \
__LINE__, \
(MSG), \
cudaGetErrorString(e)); \
exit(1); \
} \
} while (0)

Definition at line 15 of file utils_cuda.h.