Kaydet (Commit) 848c76d5 authored tarafından haochen's avatar haochen Kaydeden (comit) Markus Mohrhard

GPU Calc:Support default 2nd parameter in ROUND

Change-Id: I003ba9c945dbc3c6417d0502902610c0eaff2bda
üst 47a10f02
......@@ -1487,7 +1487,9 @@ public:
#ifdef UNROLLING_FACTOR
ss << "\tint i;\n\t";
ss << "int currentCount0, currentCount1;\n\t";
ss << "int currentCount0;\n";
for ( unsigned i = 0; i < vSubArguments.size()-1; i++)
ss << "int currentCount"<<i+1<<";\n";
std::stringstream temp3,temp4;
int outLoopSize = UNROLLING_FACTOR;
if (nCurWindowSize/outLoopSize != 0){
......
......@@ -1707,11 +1707,17 @@ void OpRound::GenSlidingWindowFunction(std::stringstream &ss,
ss << " int singleIndex = gid0;\n";
GenTmpVariables(ss,vSubArguments);
CheckAllSubArgumentIsNan(ss,vSubArguments);
ss << " for(int i=0;i<tmp1;i++)\n";
ss << " tmp0 = tmp0 * 10;\n";
if(vSubArguments.size() ==2)
{
ss << " for(int i=0;i<tmp1;i++)\n";
ss << " tmp0 = tmp0 * 10;\n";
}
ss << " double tmp=round(tmp0);\n";
ss << " for(int i=0;i<tmp1;i++)\n";
ss << " tmp = tmp / 10;\n";
if(vSubArguments.size() ==2)
{
ss << " for(int i=0;i<tmp1;i++)\n";
ss << " tmp = tmp / 10;\n";
}
ss << " return tmp;\n";
ss << "}";
}
......
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