Kaydet (Commit) ec6d0dec authored tarafından I-Jui (Ray) Sung's avatar I-Jui (Ray) Sung

GPU Calc: fix compilation error in using sprintf

Change-Id: Iea316f3355a9105702391aa7b76268cdfc8831ef
üst a1e6bbbd
......@@ -1927,10 +1927,11 @@ void OpProduct::GenSlidingWindowFunction(std::stringstream &ss,
ss << " int gid0 = get_global_id(0);\n";
ss << " int i = 0;\n";
ss << " double product=0.0;\n\n";
char sArgNoI[5];
for (unsigned i = 0; i < vSubArguments.size(); i++)
{
sprintf(sArgNoI,"%d",i);
std::stringstream ssArgNoI;
ssArgNoI << i;
std::string sArgNoI = ssArgNoI.str();
ss << std::string(" double arg")+sArgNoI+";\n";
FormulaToken *pCur = vSubArguments[i]->GetFormulaToken();
assert(pCur);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment