Hi
I have a problem with my code.
When I use CUDA version 1.1, no error occured.
But now I am using v.2.0, an error occured.
Somtimes no error eccured in v.2.0.
The error message is " CUDA error in file ‘xxx. cu’ in line 261 ~~~ : unspecified launch failure"
I don’t know what part in my source code is wrong.
please help me…
My source code is the following.
in “xxx. cu” file
RefineUncoveredArea<<< dimGrid, dimBlock, 0 >>> (m_pVirtualView[i].m_pImage, m_pVirtualView[i].m_pDisparityMap,m_xWidth,m_yHeight,xWidthStep);
CUDA_SAFE_CALL( cudaThreadSynchronize() ); // line 261 : here is error occured
in “xxx_kernel.cu” file
__global__ void
RefineUncoveredArea(unsigned char* d_pImageArray, unsigned char* d_depth, int xWidth, int yHeight, int xWidthStep)
{
unsigned int iX = blockIdx.x * blockDim.x + threadIdx.x;
unsigned int iY = blockIdx.y * blockDim.y + threadIdx.y;
unsigned char disparity, disparityUp, disparityDown, disparityRight, disparityLeft;
if(1 <= iX && xWidth-1 > iX && 1 <= iY && yHeight-1 > iY)
{
 disparity = ((unsigned char*) d_depth)[iY*xWidth + iX];
Â
 if(0 != disparity)
 {
�  disparityUp = ((unsigned char*) d_depth)[(iY-1)*xWidth + iX];
�  if(0 != disparityUp)
�   return;
�  disparityDown = ((unsigned char*) d_depth)[(iY+1)*xWidth + iX];
�  if(0 != disparityDown)
�   return;
�  disparityLeft = ((unsigned char*) d_depth)[iY*xWidth + iX-1];
�  if(0 != disparityLeft)
�   return;
�  disparityRight = ((unsigned char*) d_depth)[iY*xWidth + iX+1];
�  if(0 != disparityRight)
�   return;
� Â
�  d_pImageArray[iY*xWidthStep + 3*iX    ] = 0;
�  d_pImageArray[iY*xWidthStep + 3*iX + 1] = 0;
�  d_pImageArray[iY*xWidthStep + 3*iX + 2] = 0;
�  d_depth[iY*xWidth + iX] = 0;
�  }
 }
Â
}
}
Thanks in advance.