Fix build of ocl module
This commit is contained in:
parent
33ef7990b0
commit
877dfae044
@ -492,7 +492,7 @@ namespace cv
|
|||||||
{
|
{
|
||||||
src_sign << (int64)(*source) << clCxt->impl->oclcontext;
|
src_sign << (int64)(*source) << clCxt->impl->oclcontext;
|
||||||
}
|
}
|
||||||
srcsign = src_sign.str();
|
srcsign = src_sign.str().c_str();
|
||||||
|
|
||||||
program = NULL;
|
program = NULL;
|
||||||
program = programCache->progLookup(srcsign);
|
program = programCache->progLookup(srcsign);
|
||||||
@ -613,7 +613,7 @@ namespace cv
|
|||||||
idxStr << "_C" << channels;
|
idxStr << "_C" << channels;
|
||||||
if(depth != -1)
|
if(depth != -1)
|
||||||
idxStr << "_D" << depth;
|
idxStr << "_D" << depth;
|
||||||
kernelName += idxStr.str();
|
kernelName = kernelName + idxStr.str().c_str();
|
||||||
|
|
||||||
cl_kernel kernel;
|
cl_kernel kernel;
|
||||||
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
||||||
@ -723,7 +723,7 @@ namespace cv
|
|||||||
idxStr << "_C" << channels;
|
idxStr << "_C" << channels;
|
||||||
if(depth != -1)
|
if(depth != -1)
|
||||||
idxStr << "_D" << depth;
|
idxStr << "_D" << depth;
|
||||||
kernelName += idxStr.str();
|
kernelName = kernelName + idxStr.str().c_str();
|
||||||
|
|
||||||
cl_kernel kernel;
|
cl_kernel kernel;
|
||||||
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
||||||
|
@ -353,9 +353,9 @@ void cv::ocl::oclMat::copyTo( oclMat &mat, const oclMat &mask) const
|
|||||||
static void convert_run(const oclMat &src, oclMat &dst, double alpha, double beta)
|
static void convert_run(const oclMat &src, oclMat &dst, double alpha, double beta)
|
||||||
{
|
{
|
||||||
String kernelName = "convert_to_S";
|
String kernelName = "convert_to_S";
|
||||||
Stringstream idxStr;
|
std::stringstream idxStr;
|
||||||
idxStr << src.depth();
|
idxStr << src.depth();
|
||||||
kernelName += idxStr.str();
|
kernelName = kernelName + idxStr.str().c_str();
|
||||||
float alpha_f = alpha, beta_f = beta;
|
float alpha_f = alpha, beta_f = beta;
|
||||||
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
|
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
|
||||||
std::vector<std::pair<size_t , const void *> > args;
|
std::vector<std::pair<size_t , const void *> > args;
|
||||||
|
@ -67,12 +67,12 @@ namespace cv
|
|||||||
//construct kernel name
|
//construct kernel name
|
||||||
//The rule is functionName_Cn_Dn, C represent Channels, D Represent DataType Depth, n represent an integer number
|
//The rule is functionName_Cn_Dn, C represent Channels, D Represent DataType Depth, n represent an integer number
|
||||||
//for exmaple split_C2_D2, represent the split kernel with channels =2 and dataType Depth = 2(Data type is char)
|
//for exmaple split_C2_D2, represent the split kernel with channels =2 and dataType Depth = 2(Data type is char)
|
||||||
Stringstream idxStr;
|
std::stringstream idxStr;
|
||||||
if(channels != -1)
|
if(channels != -1)
|
||||||
idxStr << "_C" << channels;
|
idxStr << "_C" << channels;
|
||||||
if(depth != -1)
|
if(depth != -1)
|
||||||
idxStr << "_D" << depth;
|
idxStr << "_D" << depth;
|
||||||
kernelName += idxStr.str();
|
kernelName = kernelName + idxStr.str().c_str();
|
||||||
|
|
||||||
cl_kernel kernel;
|
cl_kernel kernel;
|
||||||
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
|
||||||
|
@ -115,9 +115,9 @@ inline int divUp(int total, int grain)
|
|||||||
static void convert_run_cus(const oclMat &src, oclMat &dst, double alpha, double beta)
|
static void convert_run_cus(const oclMat &src, oclMat &dst, double alpha, double beta)
|
||||||
{
|
{
|
||||||
String kernelName = "convert_to_S";
|
String kernelName = "convert_to_S";
|
||||||
Stringstream idxStr;
|
std::stringstream idxStr;
|
||||||
idxStr << src.depth();
|
idxStr << src.depth();
|
||||||
kernelName += idxStr.str();
|
kernelName = kernelName + idxStr.str().c_str();
|
||||||
float alpha_f = (float)alpha, beta_f = (float)beta;
|
float alpha_f = (float)alpha, beta_f = (float)beta;
|
||||||
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
|
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
|
||||||
std::vector<std::pair<size_t , const void *> > args;
|
std::vector<std::pair<size_t , const void *> > args;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user