This is just a linear search through the array, since the error_id's are not always ocurring consecutively
| 452 | // This is just a linear search through the array, since the error_id's are not |
| 453 | // always ocurring consecutively |
| 454 | inline 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 |
nothing calls this directly
no outgoing calls
no test coverage detected