Commit 5a3200d5 authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #2567 from apavlenko:fix_compare_scalar

parents 9a3895d8 271f60ba
......@@ -2621,12 +2621,11 @@ static bool ocl_compare(InputArray _src1, InputArray _src2, OutputArray _dst, in
int type1 = _src1.type(), depth1 = CV_MAT_DEPTH(type1), cn = CV_MAT_CN(type1),
type2 = _src2.type(), depth2 = CV_MAT_DEPTH(type2);
if (!haveScalar)
{
if ( (!doubleSupport && depth1 == CV_64F) ||
!_src1.sameSize(_src2) || type1 != type2)
if (!doubleSupport && depth1 == CV_64F)
return false;
if (!haveScalar && (!_src1.sameSize(_src2) || type1 != type2))
return false;
}
int kercn = haveScalar ? cn : ocl::predictOptimalVectorWidth(_src1, _src2, _dst);
// Workaround for bug with "?:" operator in AMD OpenCL compiler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment