mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
ocl: fix moments global_size (should be >= local_size)
This commit is contained in:
parent
cc626a3b5a
commit
c9c759f700
@ -510,7 +510,8 @@ static bool ocl_moments( InputArray _src, Moments& m, bool binary)
|
|||||||
int ntiles = xtiles*ytiles;
|
int ntiles = xtiles*ytiles;
|
||||||
UMat umbuf(1, ntiles*K, CV_32S);
|
UMat umbuf(1, ntiles*K, CV_32S);
|
||||||
|
|
||||||
size_t globalsize[] = {(size_t)xtiles, (size_t)sz.height}, localsize[] = {1, TILE_SIZE};
|
size_t globalsize[] = {(size_t)xtiles, std::max((size_t)TILE_SIZE, (size_t)sz.height)};
|
||||||
|
size_t localsize[] = {1, TILE_SIZE};
|
||||||
bool ok = k.args(ocl::KernelArg::ReadOnly(src),
|
bool ok = k.args(ocl::KernelArg::ReadOnly(src),
|
||||||
ocl::KernelArg::PtrWriteOnly(umbuf),
|
ocl::KernelArg::PtrWriteOnly(umbuf),
|
||||||
xtiles).run(2, globalsize, localsize, true);
|
xtiles).run(2, globalsize, localsize, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user