MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / getCudaDrvErrorString

Function getCudaDrvErrorString

Common/drvapi_error_string.h:454–466  ·  view source on GitHub ↗

This is just a linear search through the array, since the error_id's are not always ocurring consecutively

Source from the content-addressed store, hash-verified

452// This is just a linear search through the array, since the error_id's are not
453// always ocurring consecutively
454inline const char *getCudaDrvErrorString(CUresult error_id) {
455 int index = 0;
456
457 while (sCudaDrvErrorString[index].error_id != error_id &&
458 sCudaDrvErrorString[index].error_id != -1) {
459 index++;
460 }
461
462 if (sCudaDrvErrorString[index].error_id == error_id)
463 return (const char *)sCudaDrvErrorString[index].error_string;
464 else
465 return (const char *)"CUDA_ERROR not found!";
466}
467
468#endif // __cuda_cuda_h__
469

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected