DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
DeviceExceptions.cu.h File Reference

Go to the source code of this file.

Macros

#define DEVICE_API_CHECK(cmd)
 
#define DEVICEBLAS_API_CHECK(expr)
 

Macro Definition Documentation

◆ DEVICE_API_CHECK

#define DEVICE_API_CHECK ( cmd)
Value:
do \
{ \
cudaError_t e = cmd; \
if (e != cudaSuccess) \
{ \
printf("Failed: Cuda error %s:%d '%s'\n", \
__FILE__, \
__LINE__, \
cudaGetErrorString(e)); \
exit(EXIT_FAILURE); \
} \
} \
while (0)

◆ DEVICEBLAS_API_CHECK

#define DEVICEBLAS_API_CHECK ( expr)
Value:
{ \
cublasStatus_t __cublas_error = expr; \
if ((__cublas_error) != CUBLAS_STATUS_SUCCESS) \
{ \
printf( \
"cuBLAS error on or before line number %d in file: %s. Error code: %d.\n", \
__LINE__, \
__FILE__, \
__cublas_error); \
} \
}