+ else if( iterations > 1 && countNonZero(kernel) == kernel.rows*kernel.cols )
+ {
+ anchor = Point(anchor.x*iterations, anchor.y*iterations);
+ kernel = getStructuringElement(MORPH_RECT,
+ Size(ksize.width + (iterations-1)*(ksize.width-1),
+ ksize.height + (iterations-1)*(ksize.height-1)),
+ anchor);
+ iterations = 1;
+ }
+
+ const ocl::Device & dev = ocl::Device::getDefault();
+ int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
+ bool doubleSupport = dev.doubleFPConfig() > 0;
+
+ if (depth == CV_64F && !doubleSupport)
+ return false;