mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
All modules (except ocl and gpu) compiles and pass tests
This commit is contained in:
+48
-48
@@ -129,7 +129,7 @@ inline int divUp(int total, int grain)
|
||||
/////////////////////// add subtract multiply divide /////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString, void *_scalar)
|
||||
void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString, void *_scalar)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -188,11 +188,11 @@ void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::st
|
||||
|
||||
openCLExecuteKernel(clCxt, kernelString, kernelName, globalThreads, localThreads, args, -1, depth);
|
||||
}
|
||||
static void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
arithmetic_run<char>(src1, src2, dst, kernelName, kernelString, (void *)NULL);
|
||||
}
|
||||
static void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_run(const oclMat &src1, const oclMat &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ void cv::ocl::subtract(const oclMat &src1, const oclMat &src2, oclMat &dst, cons
|
||||
{
|
||||
arithmetic_run(src1, src2, dst, mask, "arithm_sub_with_mask", &arithm_sub);
|
||||
}
|
||||
typedef void (*MulDivFunc)(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName,
|
||||
typedef void (*MulDivFunc)(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName,
|
||||
const char **kernelString, void *scalar);
|
||||
|
||||
void cv::ocl::multiply(const oclMat &src1, const oclMat &src2, oclMat &dst, double scalar)
|
||||
@@ -286,7 +286,7 @@ void cv::ocl::divide(const oclMat &src1, const oclMat &src2, oclMat &dst, double
|
||||
|
||||
}
|
||||
template <typename WT , typename CL_WT>
|
||||
void arithmetic_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar)
|
||||
void arithmetic_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ void arithmetic_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst,
|
||||
openCLExecuteKernel(clCxt, kernelString, kernelName, globalThreads, localThreads, args, channels, depth);
|
||||
}
|
||||
|
||||
static void arithmetic_scalar_run(const oclMat &src, oclMat &dst, std::string kernelName, const char **kernelString, double scalar)
|
||||
static void arithmetic_scalar_run(const oclMat &src, oclMat &dst, cv::String kernelName, const char **kernelString, double scalar)
|
||||
{
|
||||
if(!src.clCxt->supportsFeature(Context::CL_DOUBLE) && src.type() == CV_64F)
|
||||
{
|
||||
@@ -415,10 +415,10 @@ static void arithmetic_scalar_run(const oclMat &src, oclMat &dst, std::string ke
|
||||
openCLExecuteKernel(clCxt, kernelString, kernelName, globalThreads, localThreads, args, -1, depth);
|
||||
}
|
||||
|
||||
typedef void (*ArithmeticFuncS)(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar);
|
||||
typedef void (*ArithmeticFuncS)(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar);
|
||||
|
||||
|
||||
static void arithmetic_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar)
|
||||
static void arithmetic_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar)
|
||||
{
|
||||
static ArithmeticFuncS tab[8] =
|
||||
{
|
||||
@@ -436,14 +436,14 @@ static void arithmetic_scalar(const oclMat &src1, const Scalar &src2, oclMat &ds
|
||||
cv::ocl::error("Unsupported arithmetic operation", __FILE__, __LINE__);
|
||||
func(src1, src2, dst, mask, kernelName, kernelString, isMatSubScalar);
|
||||
}
|
||||
static void arithmetic_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
arithmetic_scalar(src1, src2, dst, mask, kernelName, kernelString, 0);
|
||||
}
|
||||
|
||||
void cv::ocl::add(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask)
|
||||
{
|
||||
std::string kernelName = mask.data ? "arithm_s_add_with_mask" : "arithm_s_add";
|
||||
cv::String kernelName = mask.data ? "arithm_s_add_with_mask" : "arithm_s_add";
|
||||
const char **kernelString = mask.data ? &arithm_add_scalar_mask : &arithm_add_scalar;
|
||||
|
||||
arithmetic_scalar( src1, src2, dst, mask, kernelName, kernelString);
|
||||
@@ -451,13 +451,13 @@ void cv::ocl::add(const oclMat &src1, const Scalar &src2, oclMat &dst, const ocl
|
||||
|
||||
void cv::ocl::subtract(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask)
|
||||
{
|
||||
std::string kernelName = mask.data ? "arithm_s_sub_with_mask" : "arithm_s_sub";
|
||||
cv::String kernelName = mask.data ? "arithm_s_sub_with_mask" : "arithm_s_sub";
|
||||
const char **kernelString = mask.data ? &arithm_sub_scalar_mask : &arithm_sub_scalar;
|
||||
arithmetic_scalar( src1, src2, dst, mask, kernelName, kernelString, 1);
|
||||
}
|
||||
void cv::ocl::subtract(const Scalar &src2, const oclMat &src1, oclMat &dst, const oclMat &mask)
|
||||
{
|
||||
std::string kernelName = mask.data ? "arithm_s_sub_with_mask" : "arithm_s_sub";
|
||||
cv::String kernelName = mask.data ? "arithm_s_sub_with_mask" : "arithm_s_sub";
|
||||
const char **kernelString = mask.data ? &arithm_sub_scalar_mask : &arithm_sub_scalar;
|
||||
arithmetic_scalar( src1, src2, dst, mask, kernelName, kernelString, -1);
|
||||
}
|
||||
@@ -469,7 +469,7 @@ void cv::ocl::divide(double scalar, const oclMat &src, oclMat &dst)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string kernelName = "arithm_s_div";
|
||||
cv::String kernelName = "arithm_s_div";
|
||||
arithmetic_scalar_run(src, dst, kernelName, &arithm_div, scalar);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -481,14 +481,14 @@ void cv::ocl::absdiff(const oclMat &src1, const oclMat &src2, oclMat &dst)
|
||||
}
|
||||
void cv::ocl::absdiff(const oclMat &src1, const Scalar &src2, oclMat &dst)
|
||||
{
|
||||
std::string kernelName = "arithm_s_absdiff";
|
||||
cv::String kernelName = "arithm_s_absdiff";
|
||||
oclMat mask;
|
||||
arithmetic_scalar( src1, src2, dst, mask, kernelName, &arithm_absdiff);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////// compare ///////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void compare_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void compare_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
dst.create(src1.size(), CV_8UC1);
|
||||
CV_Assert(src1.oclchannels() == 1);
|
||||
@@ -528,7 +528,7 @@ void cv::ocl::compare(const oclMat &src1, const oclMat &src2, oclMat &dst , int
|
||||
std::cout << "Selected device do not support double" << std::endl;
|
||||
return;
|
||||
}
|
||||
std::string kernelName;
|
||||
cv::String kernelName;
|
||||
const char **kernelString = NULL;
|
||||
switch( cmpOp )
|
||||
{
|
||||
@@ -700,7 +700,7 @@ void cv::ocl::meanStdDev(const oclMat &src, Scalar &mean, Scalar &stddev)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////// minMax /////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_minMax_run(const oclMat &src, const oclMat &mask, cl_mem &dst, int vlen , int groupnum, std::string kernelName)
|
||||
static void arithmetic_minMax_run(const oclMat &src, const oclMat &mask, cl_mem &dst, int vlen , int groupnum, cv::String kernelName)
|
||||
{
|
||||
std::vector<std::pair<size_t , const void *> > args;
|
||||
int all_cols = src.step / (vlen * src.elemSize1());
|
||||
@@ -737,7 +737,7 @@ static void arithmetic_minMax_run(const oclMat &src, const oclMat &mask, cl_mem
|
||||
}
|
||||
|
||||
|
||||
static void arithmetic_minMax_mask_run(const oclMat &src, const oclMat &mask, cl_mem &dst, int vlen, int groupnum, std::string kernelName)
|
||||
static void arithmetic_minMax_mask_run(const oclMat &src, const oclMat &mask, cl_mem &dst, int vlen, int groupnum, cv::String kernelName)
|
||||
{
|
||||
std::vector<std::pair<size_t , const void *> > args;
|
||||
size_t gt[3] = {groupnum * 256, 1, 1}, lt[3] = {256, 1, 1};
|
||||
@@ -891,7 +891,7 @@ double cv::ocl::norm(const oclMat &src1, const oclMat &src2, int normType)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////// flip //////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_flip_rows_run(const oclMat &src, oclMat &dst, std::string kernelName)
|
||||
static void arithmetic_flip_rows_run(const oclMat &src, oclMat &dst, cv::String kernelName)
|
||||
{
|
||||
if(!src.clCxt->supportsFeature(Context::CL_DOUBLE) && src.type() == CV_64F)
|
||||
{
|
||||
@@ -940,7 +940,7 @@ static void arithmetic_flip_rows_run(const oclMat &src, oclMat &dst, std::string
|
||||
|
||||
openCLExecuteKernel(clCxt, &arithm_flip, kernelName, globalThreads, localThreads, args, -1, depth);
|
||||
}
|
||||
static void arithmetic_flip_cols_run(const oclMat &src, oclMat &dst, std::string kernelName, bool isVertical)
|
||||
static void arithmetic_flip_cols_run(const oclMat &src, oclMat &dst, cv::String kernelName, bool isVertical)
|
||||
{
|
||||
if(!src.clCxt->supportsFeature(Context::CL_DOUBLE) && src.type() == CV_64F)
|
||||
{
|
||||
@@ -1011,7 +1011,7 @@ void cv::ocl::flip(const oclMat &src, oclMat &dst, int flipCode)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////// LUT //////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_lut_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName)
|
||||
static void arithmetic_lut_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName)
|
||||
{
|
||||
Context *clCxt = src1.clCxt;
|
||||
int channels = src1.oclchannels();
|
||||
@@ -1105,14 +1105,14 @@ void cv::ocl::LUT(const oclMat &src, const oclMat &lut, oclMat &dst)
|
||||
CV_Assert((lut.oclchannels() == 1 || lut.oclchannels() == cn) && lut.rows == 1 && lut.cols == 256);
|
||||
dst.create(src.size(), CV_MAKETYPE(lut.depth(), cn));
|
||||
//oclMat _lut(lut);
|
||||
std::string kernelName = "LUT";
|
||||
cv::String kernelName = "LUT";
|
||||
arithmetic_lut_run(src, lut, dst, kernelName);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// exp log /////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_exp_log_run(const oclMat &src, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_exp_log_run(const oclMat &src, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
dst.create(src.size(), src.type());
|
||||
CV_Assert(src.cols == dst.cols &&
|
||||
@@ -1161,7 +1161,7 @@ void cv::ocl::log(const oclMat &src, oclMat &dst)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////// magnitude phase ///////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_magnitude_phase_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName)
|
||||
static void arithmetic_magnitude_phase_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -1209,7 +1209,7 @@ void cv::ocl::magnitude(const oclMat &src1, const oclMat &src2, oclMat &dst)
|
||||
arithmetic_magnitude_phase_run(src1, src2, dst, "arithm_magnitude");
|
||||
}
|
||||
|
||||
static void arithmetic_phase_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_phase_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -1256,7 +1256,7 @@ void cv::ocl::phase(const oclMat &x, const oclMat &y, oclMat &Angle , bool angle
|
||||
{
|
||||
CV_Assert(x.type() == y.type() && x.size() == y.size() && (x.depth() == CV_32F || x.depth() == CV_64F));
|
||||
Angle.create(x.size(), x.type());
|
||||
std::string kernelName = angleInDegrees ? "arithm_phase_indegrees" : "arithm_phase_inradians";
|
||||
cv::String kernelName = angleInDegrees ? "arithm_phase_indegrees" : "arithm_phase_inradians";
|
||||
if(angleInDegrees)
|
||||
{
|
||||
arithmetic_phase_run(x, y, Angle, kernelName, &arithm_phase);
|
||||
@@ -1273,7 +1273,7 @@ void cv::ocl::phase(const oclMat &x, const oclMat &y, oclMat &Angle , bool angle
|
||||
////////////////////////////////// cartToPolar ///////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_cartToPolar_run(const oclMat &src1, const oclMat &src2, oclMat &dst_mag, oclMat &dst_cart,
|
||||
std::string kernelName, bool angleInDegrees)
|
||||
cv::String kernelName, bool angleInDegrees)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -1328,7 +1328,7 @@ void cv::ocl::cartToPolar(const oclMat &x, const oclMat &y, oclMat &mag, oclMat
|
||||
////////////////////////////////// polarToCart ///////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_ptc_run(const oclMat &src1, const oclMat &src2, oclMat &dst1, oclMat &dst2, bool angleInDegrees,
|
||||
std::string kernelName)
|
||||
cv::String kernelName)
|
||||
{
|
||||
if(!src1.clCxt->supportsFeature(Context::CL_DOUBLE) && src1.type() == CV_64F)
|
||||
{
|
||||
@@ -1530,7 +1530,7 @@ void cv::ocl::minMaxLoc(const oclMat &src, double *minVal, double *maxVal,
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////// countNonZero ///////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void arithmetic_countNonZero_run(const oclMat &src, cl_mem &dst, int vlen , int groupnum, std::string kernelName)
|
||||
static void arithmetic_countNonZero_run(const oclMat &src, cl_mem &dst, int vlen , int groupnum, cv::String kernelName)
|
||||
{
|
||||
std::vector<std::pair<size_t , const void *> > args;
|
||||
int all_cols = src.step / (vlen * src.elemSize1());
|
||||
@@ -1568,7 +1568,7 @@ int cv::ocl::countNonZero(const oclMat &src)
|
||||
int vlen = 8 , dbsize = groupnum * vlen;
|
||||
//cl_ulong start, end;
|
||||
Context *clCxt = src.clCxt;
|
||||
std::string kernelName = "arithm_op_nonzero";
|
||||
cv::String kernelName = "arithm_op_nonzero";
|
||||
int *p = new int[dbsize], nonzero = 0;
|
||||
cl_mem dstBuffer = openCLCreateBuffer(clCxt, CL_MEM_WRITE_ONLY, dbsize * sizeof(int));
|
||||
arithmetic_countNonZero_run(src, dstBuffer, vlen, groupnum, kernelName);
|
||||
@@ -1587,7 +1587,7 @@ int cv::ocl::countNonZero(const oclMat &src)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////bitwise_op////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static void bitwise_run(const oclMat &src1, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void bitwise_run(const oclMat &src1, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
dst.create(src1.size(), src1.type());
|
||||
|
||||
@@ -1629,7 +1629,7 @@ static void bitwise_run(const oclMat &src1, oclMat &dst, std::string kernelName,
|
||||
|
||||
|
||||
template<typename T>
|
||||
void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString, void *_scalar)
|
||||
void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString, void *_scalar)
|
||||
{
|
||||
dst.create(src1.size(), src1.type());
|
||||
CV_Assert(src1.cols == src2.cols && src2.cols == dst.cols &&
|
||||
@@ -1681,11 +1681,11 @@ void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::strin
|
||||
|
||||
openCLExecuteKernel(clCxt, kernelString, kernelName, globalThreads, localThreads, args, -1, depth);
|
||||
}
|
||||
static void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
bitwise_run<char>(src1, src2, dst, kernelName, kernelString, (void *)NULL);
|
||||
}
|
||||
static void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString)
|
||||
static void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
dst.create(src1.size(), src1.type());
|
||||
CV_Assert(src1.cols == src2.cols && src2.cols == dst.cols &&
|
||||
@@ -1738,7 +1738,7 @@ static void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, con
|
||||
|
||||
|
||||
template <typename WT , typename CL_WT>
|
||||
void bitwise_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar)
|
||||
void bitwise_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar)
|
||||
{
|
||||
dst.create(src1.size(), src1.type());
|
||||
|
||||
@@ -1804,10 +1804,10 @@ void bitwise_scalar_run(const oclMat &src1, const Scalar &src2, oclMat &dst, con
|
||||
}
|
||||
|
||||
|
||||
typedef void (*BitwiseFuncS)(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar);
|
||||
typedef void (*BitwiseFuncS)(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar);
|
||||
|
||||
|
||||
static void bitwise_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString, int isMatSubScalar)
|
||||
static void bitwise_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString, int isMatSubScalar)
|
||||
{
|
||||
static BitwiseFuncS tab[8] =
|
||||
{
|
||||
@@ -1837,7 +1837,7 @@ static void bitwise_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst,
|
||||
cv::ocl::error("Unsupported arithmetic operation", __FILE__, __LINE__);
|
||||
func(src1, src2, dst, mask, kernelName, kernelString, isMatSubScalar);
|
||||
}
|
||||
static void bitwise_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, std::string kernelName, const char **kernelString)
|
||||
static void bitwise_scalar(const oclMat &src1, const Scalar &src2, oclMat &dst, const oclMat &mask, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
bitwise_scalar(src1, src2, dst, mask, kernelName, kernelString, 0);
|
||||
}
|
||||
@@ -1850,7 +1850,7 @@ void cv::ocl::bitwise_not(const oclMat &src, oclMat &dst)
|
||||
return;
|
||||
}
|
||||
dst.create(src.size(), src.type());
|
||||
std::string kernelName = "arithm_bitwise_not";
|
||||
cv::String kernelName = "arithm_bitwise_not";
|
||||
bitwise_run(src, dst, kernelName, &arithm_bitwise_not);
|
||||
}
|
||||
|
||||
@@ -1863,7 +1863,7 @@ void cv::ocl::bitwise_or(const oclMat &src1, const oclMat &src2, oclMat &dst, co
|
||||
return;
|
||||
}
|
||||
oclMat emptyMat;
|
||||
std::string kernelName = mask.empty() ? "arithm_bitwise_or" : "arithm_bitwise_or_with_mask";
|
||||
cv::String kernelName = mask.empty() ? "arithm_bitwise_or" : "arithm_bitwise_or_with_mask";
|
||||
if (mask.empty())
|
||||
bitwise_run(src1, src2, dst, kernelName, &arithm_bitwise_or);
|
||||
else
|
||||
@@ -1878,7 +1878,7 @@ void cv::ocl::bitwise_or(const oclMat &src1, const Scalar &src2, oclMat &dst, co
|
||||
std::cout << "Selected device do not support double" << std::endl;
|
||||
return;
|
||||
}
|
||||
std::string kernelName = mask.data ? "arithm_s_bitwise_or_with_mask" : "arithm_s_bitwise_or";
|
||||
cv::String kernelName = mask.data ? "arithm_s_bitwise_or_with_mask" : "arithm_s_bitwise_or";
|
||||
if (mask.data)
|
||||
bitwise_scalar( src1, src2, dst, mask, kernelName, &arithm_bitwise_or_scalar_mask);
|
||||
else
|
||||
@@ -1895,7 +1895,7 @@ void cv::ocl::bitwise_and(const oclMat &src1, const oclMat &src2, oclMat &dst, c
|
||||
}
|
||||
oclMat emptyMat;
|
||||
|
||||
std::string kernelName = mask.empty() ? "arithm_bitwise_and" : "arithm_bitwise_and_with_mask";
|
||||
cv::String kernelName = mask.empty() ? "arithm_bitwise_and" : "arithm_bitwise_and_with_mask";
|
||||
|
||||
if (mask.empty())
|
||||
bitwise_run(src1, src2, dst, kernelName, &arithm_bitwise_and);
|
||||
@@ -1910,7 +1910,7 @@ void cv::ocl::bitwise_and(const oclMat &src1, const Scalar &src2, oclMat &dst, c
|
||||
std::cout << "Selected device do not support double" << std::endl;
|
||||
return;
|
||||
}
|
||||
std::string kernelName = mask.data ? "arithm_s_bitwise_and_with_mask" : "arithm_s_bitwise_and";
|
||||
cv::String kernelName = mask.data ? "arithm_s_bitwise_and_with_mask" : "arithm_s_bitwise_and";
|
||||
if (mask.data)
|
||||
bitwise_scalar(src1, src2, dst, mask, kernelName, &arithm_bitwise_and_scalar_mask);
|
||||
else
|
||||
@@ -1925,7 +1925,7 @@ void cv::ocl::bitwise_xor(const oclMat &src1, const oclMat &src2, oclMat &dst, c
|
||||
return;
|
||||
}
|
||||
oclMat emptyMat;
|
||||
std::string kernelName = mask.empty() ? "arithm_bitwise_xor" : "arithm_bitwise_xor_with_mask";
|
||||
cv::String kernelName = mask.empty() ? "arithm_bitwise_xor" : "arithm_bitwise_xor_with_mask";
|
||||
|
||||
|
||||
if (mask.empty())
|
||||
@@ -1943,7 +1943,7 @@ void cv::ocl::bitwise_xor(const oclMat &src1, const Scalar &src2, oclMat &dst, c
|
||||
std::cout << "Selected device do not support double" << std::endl;
|
||||
return;
|
||||
}
|
||||
std::string kernelName = mask.data ? "arithm_s_bitwise_xor_with_mask" : "arithm_s_bitwise_xor";
|
||||
cv::String kernelName = mask.data ? "arithm_s_bitwise_xor_with_mask" : "arithm_s_bitwise_xor";
|
||||
if (mask.data)
|
||||
bitwise_scalar( src1, src2, dst, mask, kernelName, &arithm_bitwise_xor_scalar_mask);
|
||||
else
|
||||
@@ -2033,7 +2033,7 @@ oclMatExpr::operator oclMat() const
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#define TILE_DIM (32)
|
||||
#define BLOCK_ROWS (256/TILE_DIM)
|
||||
static void transpose_run(const oclMat &src, oclMat &dst, std::string kernelName)
|
||||
static void transpose_run(const oclMat &src, oclMat &dst, cv::String kernelName)
|
||||
{
|
||||
if(!src.clCxt->supportsFeature(Context::CL_DOUBLE) && src.type() == CV_64F)
|
||||
{
|
||||
@@ -2250,7 +2250,7 @@ void cv::ocl::magnitudeSqr(const oclMat &src1, oclMat &dst)
|
||||
openCLExecuteKernel(clCxt, &arithm_magnitudeSqr, "magnitudeSqr", globalThreads, localThreads, args, 2, depth);
|
||||
}
|
||||
|
||||
static void arithmetic_pow_run(const oclMat &src1, double p, oclMat &dst, std::string kernelName, const char **kernelString)
|
||||
static void arithmetic_pow_run(const oclMat &src1, double p, oclMat &dst, cv::String kernelName, const char **kernelString)
|
||||
{
|
||||
CV_Assert(src1.cols == dst.cols && src1.rows == dst.rows);
|
||||
CV_Assert(src1.type() == dst.type());
|
||||
@@ -2301,7 +2301,7 @@ void cv::ocl::pow(const oclMat &x, double p, oclMat &y)
|
||||
|
||||
CV_Assert((x.type() == y.type() && x.size() == y.size() && x.depth() == CV_32F) || x.depth() == CV_64F);
|
||||
y.create(x.size(), x.type());
|
||||
std::string kernelName = "arithm_pow";
|
||||
cv::String kernelName = "arithm_pow";
|
||||
|
||||
arithmetic_pow_run(x, p, y, kernelName, &arithm_pow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user