I have this naive question about this error-handler I found on Stack Overflow. Here it is:
#define CUDA_HANDLE_ERROR(ans) { gpuAssert((ans), __FILE__, __LINE__); }
inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true)
{
if (code != cudaSuccess)
{
fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
if (abort) exit(code);
}
}
The only thing which I didn't get is bool abort = true
statement in the parameter section of gpuAssert(..)
.
What's the purpose of this abort
flag ?