fixed bug in buildPointList

This commit is contained in:
Vladislav Vinogradov 2012-08-30 09:48:16 +04:00
parent 3ae2244bd9
commit 29cdddd845

View File

@ -64,14 +64,12 @@ namespace cv { namespace gpu { namespace device
const int x = blockIdx.x * blockDim.x * PIXELS_PER_THREAD + threadIdx.x;
const int y = blockIdx.y * blockDim.y + threadIdx.y;
if (y >= src.rows)
return;
if (threadIdx.x == 0)
s_qsize[threadIdx.y] = 0;
__syncthreads();
if (y < src.rows)
{
// fill the queue
const uchar* srcRow = src.ptr(y);
for (int i = 0, xx = x; i < PIXELS_PER_THREAD && xx < src.cols; ++i, xx += blockDim.x)
@ -83,6 +81,7 @@ namespace cv { namespace gpu { namespace device
s_queues[threadIdx.y][qidx] = val;
}
}
}
__syncthreads();