Merge pull request #13094 from alalek:ocl_reduce_sync

This commit is contained in:
Alexander Alekhin 2018-11-09 16:44:10 +00:00
commit a1dd30ed50
2 changed files with 2 additions and 2 deletions

View File

@ -526,7 +526,7 @@ bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask,
}
size_t globalsize = ngroups * wgs;
if (k.run(1, &globalsize, &wgs, false))
if (k.run(1, &globalsize, &wgs, true))
{
typedef Scalar (*part_sum)(Mat m);
part_sum funcs[3] = { ocl_part_sum<int>, ocl_part_sum<float>, ocl_part_sum<double> },

View File

@ -1168,7 +1168,7 @@ static bool ocl_dot( InputArray _src1, InputArray _src2, double & res )
k.args(src1arg, src1.cols, (int)src1.total(), dbsize, dbarg, src2arg);
size_t globalsize = dbsize * wgs;
if (k.run(1, &globalsize, &wgs, false))
if (k.run(1, &globalsize, &wgs, true))
{
res = sum(db.getMat(ACCESS_READ))[0];
return true;