Check cuda errors to find out whether the cuda context initialization succeeded.

This commit is contained in:
castano 2008-02-28 17:52:32 +00:00
parent 970395fba8
commit e3e7fcb226

View File

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