Skip to content

Commit

Permalink
Use cuGetErrorString (from Scott Gray via Alex Park)
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 13, 2015
1 parent c23afd6 commit d246056
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cpp/cuda.hpp
Expand Up @@ -240,6 +240,11 @@ namespace pycuda

static const char *curesult_to_str(CUresult e)
{
#if CUDAPP_CUDA_VERSION >= 6000
const char* errstr;
cuGetErrorString(e, &errstr);
return errstr;
#else
switch (e)
{
case CUDA_SUCCESS: return "success";
Expand Down Expand Up @@ -337,6 +342,7 @@ namespace pycuda

default: return "invalid/unknown error code";
}
#endif
}
};

Expand Down

0 comments on commit d246056

Please sign in to comment.