From 877dfae04427a3efa2050a3f5a40863fd5ae911d Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Fri, 22 Mar 2013 21:17:13 +0400 Subject: [PATCH] Fix build of ocl module --- modules/ocl/src/initialization.cpp | 6 +++--- modules/ocl/src/matrix_operations.cpp | 4 ++-- modules/ocl/src/mcwutil.cpp | 4 ++-- modules/ocl/src/pyrlk.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/ocl/src/initialization.cpp b/modules/ocl/src/initialization.cpp index 6e46943..36f6869 100644 --- a/modules/ocl/src/initialization.cpp +++ b/modules/ocl/src/initialization.cpp @@ -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); diff --git a/modules/ocl/src/matrix_operations.cpp b/modules/ocl/src/matrix_operations.cpp index ac04eb1..0e9b388 100644 --- a/modules/ocl/src/matrix_operations.cpp +++ b/modules/ocl/src/matrix_operations.cpp @@ -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 > args; diff --git a/modules/ocl/src/mcwutil.cpp b/modules/ocl/src/mcwutil.cpp index 574ca0f..9f104f1 100644 --- a/modules/ocl/src/mcwutil.cpp +++ b/modules/ocl/src/mcwutil.cpp @@ -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); diff --git a/modules/ocl/src/pyrlk.cpp b/modules/ocl/src/pyrlk.cpp index 5d088c3..d62e291 100644 --- a/modules/ocl/src/pyrlk.cpp +++ b/modules/ocl/src/pyrlk.cpp @@ -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 > args; -- 2.7.4