| 85 | |
| 86 | private: |
| 87 | static bool evalError(cudaError err, const char* file, const int line) |
| 88 | { |
| 89 | if (cudaErrorCudartUnloading == err) { |
| 90 | std::string msg = format("cudaCheckError() failed at %s:%i : %s\nThis error can happen in multi-threaded applications during shut-down and is ignored.\n", |
| 91 | file, line, cudaGetErrorString(err)); |
| 92 | CUMAT_LOG_SEVERE(msg); |
| 93 | return false; |
| 94 | } |
| 95 | else if (cudaSuccess != err) { |
| 96 | std::string msg = format("cudaSafeCall() failed at %s:%i : %s\n", |
| 97 | file, line, cudaGetErrorString(err)); |
| 98 | CUMAT_LOG_SEVERE(msg); |
| 99 | throw cuda_error(msg); |
| 100 | } |
| 101 | return true; |
| 102 | } |
| 103 | static bool evalErrorNoThrow(cudaError err, const char* file, const int line) |
| 104 | { |
| 105 | if (cudaSuccess != err) { |
nothing calls this directly
no outgoing calls
no test coverage detected