Fix build of ocl module
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 22 Mar 2013 17:17:13 +0000 (21:17 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 22 Mar 2013 18:14:57 +0000 (22:14 +0400)
modules/ocl/src/initialization.cpp
modules/ocl/src/matrix_operations.cpp
modules/ocl/src/mcwutil.cpp
modules/ocl/src/pyrlk.cpp

index 6e46943..36f6869 100644 (file)
@@ -492,7 +492,7 @@ namespace cv
             {
                 src_sign << (int64)(*source) << clCxt->impl->oclcontext;
             }
-            srcsign = src_sign.str();
+            srcsign = src_sign.str().c_str();
 
             program = NULL;
             program = programCache->progLookup(srcsign);
@@ -613,7 +613,7 @@ namespace cv
                 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);
@@ -723,7 +723,7 @@ namespace cv
                 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);
index ac04eb1..0e9b388 100644 (file)
@@ -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)
 {
     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;
index 574ca0f..9f104f1 100644 (file)
@@ -67,12 +67,12 @@ namespace cv
             //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);
index 5d088c3..d62e291 100644 (file)
@@ -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)
 {
     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;