Reset cuda error code to cudasuccess.

This commit is contained in:
cudawarped 2022-10-13 10:15:40 +03:00
parent 8b0aa6a64d
commit f89dee4f3e

View File

@ -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);
}
}
}}