Skip to content

Commit

Permalink
Merge pull request opencv#22865 from cpoerschke:3.4-issue-22860
Browse files Browse the repository at this point in the history
ocl_minMaxIdx to call minmaxloc.cl for OpenCL 1.2+ only
  • Loading branch information
cpoerschke authored Dec 3, 2022
1 parent 416830f commit 4792837
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/core/src/minmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,12 @@ bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* minLoc
return false;
#endif

if (dev.deviceVersionMajor() == 1 && dev.deviceVersionMinor() < 2)
{
// 'static' storage class specifier used by "minmaxloc" is available from OpenCL 1.2+ only
return false;
}

bool doubleSupport = dev.doubleFPConfig() > 0, haveMask = !_mask.empty(),
haveSrc2 = _src2.kind() != _InputArray::NONE;
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type),
Expand Down

0 comments on commit 4792837

Please sign in to comment.