diff --git a/modules/core/src/sum.cpp b/modules/core/src/sum.cpp index 30cee85b4c..f94b527661 100644 --- a/modules/core/src/sum.cpp +++ b/modules/core/src/sum.cpp @@ -520,7 +520,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, ocl_part_sum, ocl_part_sum }, diff --git a/modules/core/src/umatrix.cpp b/modules/core/src/umatrix.cpp index 5e60d2c1ba..836076741c 100644 --- a/modules/core/src/umatrix.cpp +++ b/modules/core/src/umatrix.cpp @@ -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;