#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));
\
}}
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition: AMReX.cpp:225
◆ 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_CURAND_SAFE_CALL
#define AMREX_CURAND_SAFE_CALL |
( |
|
x | ) |
|
Value: do { if((x)!=CURAND_STATUS_SUCCESS) { \
std::string errStr(std::string("CURAND error in file ") + __FILE__ \
+
" line " + std::to_string(__LINE__));
\
◆ 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__) \
}}
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