1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

refactoring

This commit is contained in:
Ilya Lavrenov
2013-12-03 00:41:07 +04:00
parent 49e729f89d
commit 49474903cb
5 changed files with 51 additions and 39 deletions
+4 -2
View File
@@ -2378,10 +2378,12 @@ static bool ocl_setIdentity( InputOutputArray _m, const Scalar& s )
if (cn == 3)
return false;
UMat m = _m.getUMat();
ocl::Kernel k("setIdentity", ocl::core::set_identity_oclsrc,
format("-D T=%s", ocl::memopTypeToStr(type)));
if (k.empty())
return false;
UMat m = _m.getUMat();
k.args(ocl::KernelArg::WriteOnly(m), ocl::KernelArg::Constant(Mat(1, 1, type, s)));
size_t globalsize[2] = { m.cols, m.rows };