Remove verbose error checking.

This commit is contained in:
castano 2009-03-18 05:51:15 +00:00
parent 8529dcf755
commit 35ff0e5aa6

View File

@ -90,34 +90,21 @@ CudaCompressor::CudaCompressor() : m_bitmapTable(NULL), m_bitmapTableCTX(NULL),
#if defined HAVE_CUDA #if defined HAVE_CUDA
// Allocate and upload bitmaps. // Allocate and upload bitmaps.
cudaMalloc((void**) &m_bitmapTable, 992 * sizeof(uint)); cudaMalloc((void**) &m_bitmapTable, 992 * sizeof(uint));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess) {
fprintf(stderr, "CUDA Error: %s\n", cudaGetErrorString(err));
fflush(stderr);
nvDebugBreak();
}
if (m_bitmapTable != NULL) if (m_bitmapTable != NULL)
{ {
cudaMemcpy(m_bitmapTable, s_bitmapTable, 992 * sizeof(uint), cudaMemcpyHostToDevice); cudaMemcpy(m_bitmapTable, s_bitmapTable, 992 * sizeof(uint), cudaMemcpyHostToDevice);
if (cudaGetLastError() != cudaSuccess) nvDebugBreak();
} }
cudaMalloc((void**) &m_bitmapTableCTX, 704 * sizeof(uint)); cudaMalloc((void**) &m_bitmapTableCTX, 704 * sizeof(uint));
if (cudaGetLastError() != cudaSuccess) nvDebugBreak();
if (m_bitmapTableCTX != NULL) if (m_bitmapTableCTX != NULL)
{ {
cudaMemcpy(m_bitmapTableCTX, s_bitmapTableCTX, 704 * sizeof(uint), cudaMemcpyHostToDevice); cudaMemcpy(m_bitmapTableCTX, s_bitmapTableCTX, 704 * sizeof(uint), cudaMemcpyHostToDevice);
if (cudaGetLastError() != cudaSuccess) nvDebugBreak();
} }
// Allocate scratch buffers. // Allocate scratch buffers.
cudaMalloc((void**) &m_data, MAX_BLOCKS * 64U); cudaMalloc((void**) &m_data, MAX_BLOCKS * 64U);
if (cudaGetLastError() != cudaSuccess) nvDebugBreak();
cudaMalloc((void**) &m_result, MAX_BLOCKS * 8U); cudaMalloc((void**) &m_result, MAX_BLOCKS * 8U);
if (cudaGetLastError() != cudaSuccess) nvDebugBreak();
#endif #endif
} }