Fills `err` from the CUDA runtime, naming the call that failed. A bare "invalid argument" with no call site is the least useful error this API can produce and the easiest to avoid.
| 12 | /// Fills `err` from the CUDA runtime, naming the call that failed. A bare "invalid argument" with no call |
| 13 | /// site is the least useful error this API can produce and the easiest to avoid. |
| 14 | bool fail(std::string& err, const char* what, cudaError_t e) { |
| 15 | err = std::string(what) + ": " + cudaGetErrorString(e); |
| 16 | return false; |
| 17 | } |
| 18 | |
| 19 | } // namespace |
| 20 |