#include <AMReX_Config.H>
#include <AMReX_Utility.H>
#include <string>
Go to the source code of this file.
◆ AMREX_CUDA_SAFE_CALL
#define AMREX_CUDA_SAFE_CALL |
( |
|
call | ) |
|
Value: { \
cudaError_t amrex_i_err = call; \
if (cudaSuccess != amrex_i_err) { \
std::string errStr(std::string("CUDA error ") + std::to_string(amrex_i_err) \
+ std::string(" in file ") + __FILE__ \
+ " line " + std::to_string(__LINE__) \
+ ": " + cudaGetErrorString(amrex_i_err)); \
amrex::Abort(errStr); \
}}
◆ AMREX_CUFFT_SAFE_CALL
#define AMREX_CUFFT_SAFE_CALL |
( |
|
call | ) |
|
Value: { \
cufftResult_t amrex_i_err = call; \
if (CUFFT_SUCCESS != amrex_i_err) { \
std::string errStr(std::string("CUFFT error ")+std::to_string(amrex_i_err) \
+ std::string(" in file ") + __FILE__ \
+ " line " + std::to_string(__LINE__)); \
amrex::Abort(errStr); \
}}
◆ AMREX_CURAND_SAFE_CALL
#define AMREX_CURAND_SAFE_CALL |
( |
|
call | ) |
|
Value: { \
curandStatus_t amrex_i_err = call; \
if (CURAND_STATUS_SUCCESS != amrex_i_err) { \
std::string errStr(std::string("CURAND error ") + std::to_string(amrex_i_err) \
+ std::string(" in file ") + __FILE__ \
+ " line " + std::to_string(__LINE__)); \
amrex::Abort(errStr); \
}}
◆ AMREX_GPU_ERROR_CHECK
◆ AMREX_GPU_SAFE_CALL
#define AMREX_GPU_SAFE_CALL |
( |
|
call | ) |
|
Value: { \
std::string errStr(std::string("GPU error in file ") + __FILE__ \
+ " line " + std::to_string(__LINE__) \
amrex::Abort(errStr); \
}}
const char * gpuGetErrorString(gpuError_t error)
Definition AMReX_GpuError.H:42
cudaError_t gpuError_t
Definition AMReX_GpuError.H:33
constexpr gpuError_t gpuSuccess
Definition AMReX_GpuError.H:34