Lines Matching full:comps
232 __global__ void lableTiles(const PtrStepSzb edges, PtrStepSzi comps)
362 if (y + CTA_SIZE_Y * i < comps.rows) comps(y + CTA_SIZE_Y * i, x + CTA_SIZE_X * j) = label;
366 __device__ __forceinline__ int root(const PtrStepSzi& comps, int label)
370 int y = label / comps.cols;
371 int x = label - y * comps.cols;
373 int parent = comps(y, x);
382 __device__ __forceinline__ void isConnected(PtrStepSzi& comps, int l1, int l2, bool& changed)
384 int r1 = root(comps, l1);
385 int r2 = root(comps, l2);
392 int y = ma / comps.cols;
393 int x = ma - y * comps.cols;
395 atomicMin(&comps.ptr(y)[x], mi);
400 const PtrStepSzb edges, PtrStepSzi comps, const int yIncomplete, int xIncomplete)
459 int lc = comps(y,x);
460 int lu = comps(y - 1, x);
462 isConnected(comps, lc, lu, changed);
478 int lc = comps(y, x);
479 int ll = comps(y, x - 1);
481 isConnected(comps, lc, ll, changed);
488 __global__ void flatten(const PtrStepSzb edges, PtrStepSzi comps)
493 if( x < comps.cols && y < comps.rows)
494 comps(y, x) = root(comps, comps(y, x));
499 void labelComponents(const PtrStepSzb& edges, PtrStepSzi comps, int flags, cudaStream_t stream)
505 lableTiles<<<grid, block, 0, stream>>>(edges, comps);
515 crossMerge<<<mergeGrid, mergeBlock, 0, stream>>>(2, 2, tileSizeY, tileSizeX, edges, comps, (int)ceilf(grid.y / 2.f) - grid.y / 2, (int)ceilf(grid.x / 2.f) - grid.x / 2);
525 flatten<<<grid, block, 0, stream>>>(edges, comps);