fixed bug in buildPointList
This commit is contained in:
parent
3ae2244bd9
commit
29cdddd845
@ -64,14 +64,12 @@ namespace cv { namespace gpu { namespace device
|
|||||||
const int x = blockIdx.x * blockDim.x * PIXELS_PER_THREAD + threadIdx.x;
|
const int x = blockIdx.x * blockDim.x * PIXELS_PER_THREAD + threadIdx.x;
|
||||||
const int y = blockIdx.y * blockDim.y + threadIdx.y;
|
const int y = blockIdx.y * blockDim.y + threadIdx.y;
|
||||||
|
|
||||||
if (y >= src.rows)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (threadIdx.x == 0)
|
if (threadIdx.x == 0)
|
||||||
s_qsize[threadIdx.y] = 0;
|
s_qsize[threadIdx.y] = 0;
|
||||||
|
|
||||||
__syncthreads();
|
__syncthreads();
|
||||||
|
|
||||||
|
if (y < src.rows)
|
||||||
|
{
|
||||||
// fill the queue
|
// fill the queue
|
||||||
const uchar* srcRow = src.ptr(y);
|
const uchar* srcRow = src.ptr(y);
|
||||||
for (int i = 0, xx = x; i < PIXELS_PER_THREAD && xx < src.cols; ++i, xx += blockDim.x)
|
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;
|
s_queues[threadIdx.y][qidx] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__syncthreads();
|
__syncthreads();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user