Check cuda errors to find out whether the cuda context initialization succeeded.
This commit is contained in:
parent
970395fba8
commit
e3e7fcb226
@ -109,6 +109,12 @@ CudaCompressor::~CudaCompressor()
|
||||
|
||||
bool CudaCompressor::isValid() const
|
||||
{
|
||||
#if defined HAVE_CUDA
|
||||
if (cudaGetLastError() != cudaSuccess)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return m_data != NULL && m_result != NULL && m_bitmapTable != NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user