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

GPU Calc: Support nested formula of string compared in AND formula.

such as AND(MOD($B4, 3)=0, $A4="NQSO")

Change-Id: Ie891d4e56eaa39f769f018b6db53ee209dd15540
üst 2d73c5cd
...@@ -42,7 +42,6 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -42,7 +42,6 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss,
FormulaToken *tmpCur0 = vSubArguments[j]->GetFormulaToken(); FormulaToken *tmpCur0 = vSubArguments[j]->GetFormulaToken();
if(tmpCur0->GetType() == formula::svSingleVectorRef) if(tmpCur0->GetType() == formula::svSingleVectorRef)
{ {
#ifdef ISNAN
const formula::SingleVectorRefToken*pCurDVR= static_cast<const const formula::SingleVectorRefToken*pCurDVR= static_cast<const
formula::SingleVectorRefToken *>(tmpCur0); formula::SingleVectorRefToken *>(tmpCur0);
ss<< " int buffer_len"<<j<<" = "<<pCurDVR->GetArrayLength(); ss<< " int buffer_len"<<j<<" = "<<pCurDVR->GetArrayLength();
...@@ -51,7 +50,6 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -51,7 +50,6 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss,
ss <<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<vSubArguments[j]->GenSlidingWindowDeclRef();
ss <<"))\n"; ss <<"))\n";
ss <<" tmp = 1;\n else\n"; ss <<" tmp = 1;\n else\n";
#endif
ss <<" tmp = "; ss <<" tmp = ";
ss <<vSubArguments[j]->GenSlidingWindowDeclRef()<<";\n"; ss <<vSubArguments[j]->GenSlidingWindowDeclRef()<<";\n";
ss <<" tmp"<<j<<" = tmp"<<j<<" && tmp;\n"; ss <<" tmp"<<j<<" = tmp"<<j<<" && tmp;\n";
...@@ -100,6 +98,11 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -100,6 +98,11 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss,
ss <<" tmp"<<j<<" = tmp"<<j<<" && tmp;\n"; ss <<" tmp"<<j<<" = tmp"<<j<<" && tmp;\n";
ss <<" }\n"; ss <<" }\n";
} }
else
{
ss <<" tmp"<<j<<" = ";
ss <<vSubArguments[j]->GenSlidingWindowDeclRef()<<";\n";
}
ss <<" t = t && tmp"<<j<<";\n"; ss <<" t = t && tmp"<<j<<";\n";
} }
ss << " return t;\n"; ss << " return t;\n";
......
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