{
src_sign << (int64)(*source) << clCxt->impl->oclcontext;
}
- srcsign = src_sign.str();
+ srcsign = src_sign.str().c_str();
program = NULL;
program = programCache->progLookup(srcsign);
idxStr << "_C" << channels;
if(depth != -1)
idxStr << "_D" << depth;
- kernelName += idxStr.str();
+ kernelName = kernelName + idxStr.str().c_str();
cl_kernel kernel;
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
idxStr << "_C" << channels;
if(depth != -1)
idxStr << "_D" << depth;
- kernelName += idxStr.str();
+ kernelName = kernelName + idxStr.str().c_str();
cl_kernel kernel;
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
static void convert_run(const oclMat &src, oclMat &dst, double alpha, double beta)
{
String kernelName = "convert_to_S";
- Stringstream idxStr;
+ std::stringstream idxStr;
idxStr << src.depth();
- kernelName += idxStr.str();
+ kernelName = kernelName + idxStr.str().c_str();
float alpha_f = alpha, beta_f = beta;
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
std::vector<std::pair<size_t , const void *> > args;
//construct kernel name
//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)
- Stringstream idxStr;
+ std::stringstream idxStr;
if(channels != -1)
idxStr << "_C" << channels;
if(depth != -1)
idxStr << "_D" << depth;
- kernelName += idxStr.str();
+ kernelName = kernelName + idxStr.str().c_str();
cl_kernel kernel;
kernel = openCLGetKernelFromSource(clCxt, source, kernelName, build_options);
static void convert_run_cus(const oclMat &src, oclMat &dst, double alpha, double beta)
{
String kernelName = "convert_to_S";
- Stringstream idxStr;
+ std::stringstream idxStr;
idxStr << src.depth();
- kernelName += idxStr.str();
+ kernelName = kernelName + idxStr.str().c_str();
float alpha_f = (float)alpha, beta_f = (float)beta;
CV_DbgAssert(src.rows == dst.rows && src.cols == dst.cols);
std::vector<std::pair<size_t , const void *> > args;