Merge pull request #2147 from ilya-lavrenov:tapi_sqrt

This commit is contained in:
Andrey Pavlenko 2014-01-14 11:34:02 +04:00 committed by OpenCV Buildbot
commit fdb1019b9e

View File

@ -2057,10 +2057,15 @@ static bool ocl_pow(InputArray _src, double power, OutputArray _dst)
ocl::KernelArg srcarg = ocl::KernelArg::ReadOnlyNoSize(src),
dstarg = ocl::KernelArg::WriteOnly(dst, cn);
if (depth == CV_32F)
k.args(srcarg, dstarg, (float)power);
if (issqrt)
k.args(srcarg, dstarg);
else
k.args(srcarg, dstarg, power);
{
if (depth == CV_32F)
k.args(srcarg, dstarg, (float)power);
else
k.args(srcarg, dstarg, power);
}
size_t globalsize[2] = { dst.cols * cn, dst.rows };
return k.run(2, globalsize, NULL, false);