mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #22633 from cudawarped:fix_3361
Reset cuda runtime error code to cudasuccess on runtime failure.
This commit is contained in:
commit
a60496f9df
@ -65,8 +65,10 @@
|
||||
namespace cv { namespace cuda {
|
||||
static inline void checkCudaError(cudaError_t err, const char* file, const int line, const char* func)
|
||||
{
|
||||
if (cudaSuccess != err)
|
||||
if (cudaSuccess != err) {
|
||||
cudaGetLastError(); // reset the last stored error to cudaSuccess
|
||||
cv::error(cv::Error::GpuApiCallError, cudaGetErrorString(err), func, file, line);
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user