Merge pull request #1557 from ilya-lavrenov:ocl_minor_doc_update
This commit is contained in:
@@ -481,13 +481,13 @@ static void arithmetic_minMax_run(const oclMat &src, const oclMat & mask, cl_mem
|
||||
}
|
||||
|
||||
template <typename T, typename WT>
|
||||
void arithmetic_minMax(const oclMat &src, double *minVal, double *maxVal,
|
||||
const oclMat &mask, oclMat &buf)
|
||||
void arithmetic_minMax(const oclMat &src, double *minVal, double *maxVal, const oclMat &mask)
|
||||
{
|
||||
size_t groupnum = src.clCxt->getDeviceInfo().maxComputeUnits;
|
||||
CV_Assert(groupnum != 0);
|
||||
|
||||
int dbsize = groupnum * 2 * src.elemSize();
|
||||
oclMat buf;
|
||||
ensureSizeIsEnough(1, dbsize, CV_8UC1, buf);
|
||||
|
||||
cl_mem buf_data = reinterpret_cast<cl_mem>(buf.data);
|
||||
@@ -509,15 +509,9 @@ void arithmetic_minMax(const oclMat &src, double *minVal, double *maxVal,
|
||||
}
|
||||
}
|
||||
|
||||
typedef void (*minMaxFunc)(const oclMat &src, double *minVal, double *maxVal, const oclMat &mask);
|
||||
|
||||
void cv::ocl::minMax(const oclMat &src, double *minVal, double *maxVal, const oclMat &mask)
|
||||
{
|
||||
oclMat buf;
|
||||
minMax_buf(src, minVal, maxVal, mask, buf);
|
||||
}
|
||||
|
||||
typedef void (*minMaxFunc)(const oclMat &src, double *minVal, double *maxVal, const oclMat &mask, oclMat &buf);
|
||||
|
||||
void cv::ocl::minMax_buf(const oclMat &src, double *minVal, double *maxVal, const oclMat &mask, oclMat &buf)
|
||||
{
|
||||
CV_Assert(src.channels() == 1);
|
||||
CV_Assert(src.size() == mask.size() || mask.empty());
|
||||
@@ -531,7 +525,7 @@ void cv::ocl::minMax_buf(const oclMat &src, double *minVal, double *maxVal, cons
|
||||
CV_Error(CV_GpuNotSupported, "Selected device doesn't support double");
|
||||
}
|
||||
|
||||
static minMaxFunc functab[8] =
|
||||
static minMaxFunc functab[] =
|
||||
{
|
||||
arithmetic_minMax<uchar, int>,
|
||||
arithmetic_minMax<char, int>,
|
||||
@@ -543,9 +537,10 @@ void cv::ocl::minMax_buf(const oclMat &src, double *minVal, double *maxVal, cons
|
||||
0
|
||||
};
|
||||
|
||||
minMaxFunc func;
|
||||
func = functab[src.depth()];
|
||||
func(src, minVal, maxVal, mask, buf);
|
||||
minMaxFunc func = functab[src.depth()];
|
||||
CV_Assert(func != 0);
|
||||
|
||||
func(src, minVal, maxVal, mask);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -212,7 +212,7 @@ void cv::ocl::GoodFeaturesToTrackDetector_OCL::operator ()(const oclMat& image,
|
||||
cornerMinEigenVal_dxdy(image, eig_, Dx_, Dy_, blockSize, 3);
|
||||
|
||||
double maxVal = 0;
|
||||
minMax_buf(eig_, 0, &maxVal, oclMat(), minMaxbuf_);
|
||||
minMax(eig_, NULL, &maxVal);
|
||||
|
||||
ensureSizeIsEnough(1, std::max(1000, static_cast<int>(image.size().area() * 0.05)), CV_32FC2, tmpCorners_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user