fix #4343 : cv::cuda::findMinMaxLoc incorrect output for single row matrix

This commit is contained in:
Vladislav Vinogradov
2015-05-18 14:16:55 +03:00
parent 8b791477df
commit e22979f334
2 changed files with 39 additions and 1 deletions

View File

@@ -156,7 +156,7 @@ namespace grid_minmaxloc_detail
__host__ void minMaxLoc(const SrcPtr& src, ResType* minVal, ResType* maxVal, int* minLoc, int* maxLoc, const MaskPtr& mask, int rows, int cols, cudaStream_t stream)
{
dim3 block, grid;
getLaunchCfg<Policy>(cols, rows, block, grid);
getLaunchCfg<Policy>(rows, cols, block, grid);
const int patch_x = divUp(divUp(cols, grid.x), block.x);
const int patch_y = divUp(divUp(rows, grid.y), block.y);