diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 29 | ||||
-rw-r--r-- | sc/source/core/opencl/op_addin.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/opencl/op_database.cxx | 82 | ||||
-rw-r--r-- | sc/source/core/opencl/op_financial.cxx | 330 | ||||
-rw-r--r-- | sc/source/core/opencl/op_logical.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 160 | ||||
-rw-r--r-- | sc/source/core/opencl/op_statistical.cxx | 466 | ||||
-rw-r--r-- | sc/source/core/opencl/opbase.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/opencl/opbase.hxx | 2 |
9 files changed, 553 insertions, 554 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 862b73ab20ea..740e26ead786 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -57,9 +57,8 @@ static const char* publicFunc = " return (as_ulong(fVal) & 0XFFFF); // any other error\n" "}\n" "\n" - "int isNan(double a) { return isnan(a); }\n" "double fsum_count(double a, double b, __private int *p) {\n" - " bool t = isNan(a);\n" + " bool t = isnan(a);\n" " (*p) += t?0:1;\n" " return t?b:a+b;\n" "}\n" @@ -75,8 +74,8 @@ static const char* publicFunc = " (*p) += t?0:1;\n" " return result;\n" "}\n" - "double fsum(double a, double b) { return isNan(a)?b:a+b; }\n" - "double legalize(double a, double b) { return isNan(a)?b:a;}\n" + "double fsum(double a, double b) { return isnan(a)?b:a+b; }\n" + "double legalize(double a, double b) { return isnan(a)?b:a;}\n" "double fsub(double a, double b) { return a-b; }\n" "double fdiv(double a, double b) { return a/b; }\n" "double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }\n" @@ -906,7 +905,7 @@ public: virtual std::string GenSlidingWindowDeclRef( bool nested ) const override { std::stringstream ss; - ss << "(!isNan(" << VectorRef::GenSlidingWindowDeclRef(); + ss << "(!isnan(" << VectorRef::GenSlidingWindowDeclRef(); ss << ")?" << VectorRef::GenSlidingWindowDeclRef(); ss << ":" << mStringArgument.GenSlidingWindowDeclRef(nested); ss << ")"; @@ -1151,7 +1150,7 @@ public: virtual std::string GenSlidingWindowDeclRef( bool nested ) const override { std::stringstream ss; - ss << "(!isNan(" << mDoubleArgument.GenSlidingWindowDeclRef(); + ss << "(!isnan(" << mDoubleArgument.GenSlidingWindowDeclRef(); ss << ")?" << mDoubleArgument.GenSlidingWindowDeclRef(); ss << ":" << mStringArgument.GenSlidingWindowDeclRef(nested); ss << ")"; @@ -1401,12 +1400,12 @@ public: ss << " tmp = " << mpCodeGen->GetBottom() << ";\n"; ss << " int loopOffset = l*512;\n"; ss << " if((loopOffset + lidx + offset + 256) < end) {\n"; - ss << " tmp = legalize((isNan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)"; + ss << " tmp = legalize((isnan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)"; ss << ", tmp);\n"; - ss << " tmp = legalize((isNan(A[loopOffset + lidx + offset+256])?tmp:tmp+1.0)"; + ss << " tmp = legalize((isnan(A[loopOffset + lidx + offset+256])?tmp:tmp+1.0)"; ss << ", tmp);\n"; ss << " } else if ((loopOffset + lidx + offset) < end)\n"; - ss << " tmp = legalize((isNan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)"; + ss << " tmp = legalize((isnan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)"; ss << ", tmp);\n"; ss << " shm_buf[lidx] = tmp;\n"; ss << " barrier(CLK_LOCAL_MEM_FENCE);\n"; @@ -1734,7 +1733,7 @@ public: if (!bNanHandled) { - ss << "if (isNan("; + ss << "if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; if (ZeroReturnZero()) @@ -1895,7 +1894,7 @@ public: static_cast<const formula::SingleVectorRefToken*> (vSubArguments[i]->GetFormulaToken()); temp3 << pSVR->GetArrayLength(); - temp3 << ")||isNan(" << vSubArguments[i] + temp3 << ")||isnan(" << vSubArguments[i] ->GenSlidingWindowDeclRef(); temp3 << ")?0:"; temp3 << vSubArguments[i]->GenSlidingWindowDeclRef(); @@ -1908,7 +1907,7 @@ public: static_cast<const formula::DoubleVectorRefToken*> (vSubArguments[i]->GetFormulaToken()); temp3 << pSVR->GetArrayLength(); - temp3 << ")||isNan(" << vSubArguments[i] + temp3 << ")||isnan(" << vSubArguments[i] ->GenSlidingWindowDeclRef(true); temp3 << ")?0:"; temp3 << vSubArguments[i]->GenSlidingWindowDeclRef(true); @@ -1971,7 +1970,7 @@ public: static_cast<const formula::SingleVectorRefToken*> (vSubArguments[i]->GetFormulaToken()); temp4 << pSVR->GetArrayLength(); - temp4 << ")||isNan(" << vSubArguments[i] + temp4 << ")||isnan(" << vSubArguments[i] ->GenSlidingWindowDeclRef(); temp4 << ")?0:"; temp4 << vSubArguments[i]->GenSlidingWindowDeclRef(); @@ -1984,7 +1983,7 @@ public: static_cast<const formula::DoubleVectorRefToken*> (vSubArguments[i]->GetFormulaToken()); temp4 << pSVR->GetArrayLength(); - temp4 << ")||isNan(" << vSubArguments[i] + temp4 << ")||isnan(" << vSubArguments[i] ->GenSlidingWindowDeclRef(true); temp4 << ")?0:"; temp4 << vSubArguments[i]->GenSlidingWindowDeclRef(true); @@ -2032,7 +2031,7 @@ public: virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override { std::stringstream ss; - ss << "(isNan(" << lhs << ")?" << rhs << ":" << rhs << "+1.0)"; + ss << "(isnan(" << lhs << ")?" << rhs << ":" << rhs << "+1.0)"; return ss.str(); } virtual std::string BinFuncName() const override { return "fcount"; } diff --git a/sc/source/core/opencl/op_addin.cxx b/sc/source/core/opencl/op_addin.cxx index 21adfe3de934..a87092eb3819 100644 --- a/sc/source/core/opencl/op_addin.cxx +++ b/sc/source/core/opencl/op_addin.cxx @@ -54,7 +54,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " x = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(x))\n"; + ss << " if (isnan(x))\n"; ss << " x = 0.0;\n"; ss << " }\n"; } @@ -86,7 +86,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " N = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(N))\n"; + ss << " if (isnan(N))\n"; ss << " N = 0.0;\n"; ss << " }\n"; } @@ -225,7 +225,7 @@ void OpGestep::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<" = 0;\n"; diff --git a/sc/source/core/opencl/op_database.cxx b/sc/source/core/opencl/op_database.cxx index 29c8df2e5408..444e3deded0d 100644 --- a/sc/source/core/opencl/op_database.cxx +++ b/sc/source/core/opencl/op_database.cxx @@ -57,7 +57,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -104,7 +104,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -120,7 +120,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -187,7 +187,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -235,7 +235,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -251,7 +251,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -318,7 +318,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -365,7 +365,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -381,7 +381,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -448,7 +448,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -496,7 +496,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -512,7 +512,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -583,7 +583,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -631,7 +631,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -647,7 +647,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -682,7 +682,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -698,7 +698,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -768,7 +768,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -816,7 +816,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -832,7 +832,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -867,7 +867,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -883,7 +883,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -951,7 +951,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -999,7 +999,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1015,7 +1015,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1083,7 +1083,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -1131,7 +1131,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1147,7 +1147,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1182,7 +1182,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1198,7 +1198,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1268,7 +1268,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss, GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=0;\n"; } @@ -1316,7 +1316,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1332,7 +1332,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1367,7 +1367,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1383,7 +1383,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1451,7 +1451,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss, ->GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=DBL_MIN;\n"; } @@ -1499,7 +1499,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1515,7 +1515,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; @@ -1582,7 +1582,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss, ->GetFormulaToken()); ss << " tmp"<<dataCol<<"="; ss << vSubArguments[dataCol]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isNan("; + ss << " if(gid0>="<<pTmpDVR1->GetArrayLength()<<" ||isnan("; ss << "tmp"<<dataCol<<"))\n"; ss << " tmp"<<dataCol<<"=DBL_MIN;\n"; } @@ -1630,7 +1630,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(isNan(tmp"<<i<<"))\n"; + ss << " if(isnan(tmp"<<i<<"))\n"; ss <<" tmp"<<i<<" = 0;\n"; } ss << " flag = false;\n"; @@ -1646,7 +1646,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss, throw Unhandled(__FILE__, __LINE__); ss << " tmp"<<i<<"="; ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n"; - ss << " if(!isNan(tmp"<<i<<")){\n"; + ss << " if(!isnan(tmp"<<i<<")){\n"; ss << " if(tmp"<<(i-dataCol-1)<<"!=tmp"; ss << i<<"){\n"; ss << " continue;\n"; diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index 69a4aacf51a4..e4ee49d8d123 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -65,7 +65,7 @@ void RRI::GenSlidingWindowFunction( ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n"; - ss<<" if(gid0>=buffer_nper_len || isNan("; + ss<<" if(gid0>=buffer_nper_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" nper = 0;\n\telse \n"; @@ -73,7 +73,7 @@ void RRI::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_pv_len || isNan("; + ss<<" if(gid0>=buffer_pv_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" pv = 0;\n\telse \n"; @@ -81,7 +81,7 @@ void RRI::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_pv_len || isNan("; + ss<<" if(gid0>=buffer_pv_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" fv = 0;\n\telse \n"; @@ -131,7 +131,7 @@ vSubArguments) { ss <<" temp="<<vSubArguments[i]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if (isNan(temp))\n"; + ss <<" if (isnan(temp))\n"; ss <<" tmp"<<i<<"= 0;\n"; ss <<" else\n"; ss <<" tmp"<<i<<"=temp;\n"; @@ -182,14 +182,14 @@ void OpDollarde::GenSlidingWindowFunction( ss<< "int buffer_frac_len = "; ss<< tmpCurDVR1->GetArrayLength(); ss << ";\n\t"; - ss<<"if((gid0)>=buffer_dollar_len || isNan("; + ss<<"if((gid0)>=buffer_dollar_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"dollar = 0;\n\telse \n\t\t"; ss<<"dollar = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if((gid0)>=buffer_frac_len || isNan("; + ss<<"if((gid0)>=buffer_frac_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"fFrac = 0;\n\telse \n\t\t"; @@ -233,14 +233,14 @@ void OpDollarfr::GenSlidingWindowFunction(std::stringstream &ss, ss<< "int buffer_frac_len = "; ss<< tmpCurDVR1->GetArrayLength(); ss << ";\n\t"; - ss<<"if((gid0)>=buffer_dollar_len || isNan("; + ss<<"if((gid0)>=buffer_dollar_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"dollar = 0;\n\telse \n\t\t"; ss<<"dollar = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if((gid0)>=buffer_frac_len || isNan("; + ss<<"if((gid0)>=buffer_frac_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"fFrac = 0;\n\telse \n\t\t"; @@ -299,7 +299,7 @@ void OpDISC::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -370,7 +370,7 @@ void OpINTRATE::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -428,7 +428,7 @@ void OpFV::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isNan("; + ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isnan("; ss << vSubArguments[j]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << j << " = " <<GetBottom() << ";\n"; @@ -479,7 +479,7 @@ void OpIPMT::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isNan("; + ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isnan("; ss << vSubArguments[j]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << j << " = " <<GetBottom() << ";\n"; @@ -552,7 +552,7 @@ void OpISPMT::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -605,7 +605,7 @@ void OpPDuration::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -667,7 +667,7 @@ void OpDuration_ADD::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isNan("; + ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isnan("; ss << vSubArguments[j]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << j << " = " <<GetBottom() << ";\n"; @@ -734,7 +734,7 @@ void OpMDuration::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -777,7 +777,7 @@ void Fvschedule::GenSlidingWindowFunction( ss << "int gid0 = get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss << "if (isNan(arg0))\n\t\t"; + ss << "if (isnan(arg0))\n\t\t"; ss << "arg0 = 0;\n\t"; ss << "double arg1;\n\t"; ss << "int arrayLength = " << pCurDVR->GetArrayLength() << ";\n\t"; @@ -785,7 +785,7 @@ void Fvschedule::GenSlidingWindowFunction( ss << " i < " << nCurWindowSize << "; i++){\n\t\t"; ss << "arg1 = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n\t\t\t"; - ss << "if (isNan(arg1))\n\t\t\t\t"; + ss << "if (isnan(arg1))\n\t\t\t\t"; ss << "arg1 = 0;\n\t\t\t"; ss << "tmp *= arg1 + 1.0;\n\t\t"; ss << "}\n\t"; @@ -824,7 +824,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fRate = 0;\n else\n"; @@ -835,7 +835,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nNumPeriods = 0;\n else\n"; @@ -847,7 +847,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fVal = 0;\n else\n"; @@ -858,7 +858,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nStartPer = 0;\n else\n"; @@ -870,7 +870,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const formula::SingleVectorRefToken *>(tmpCur4); - ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nEndPer = 0;\n else\n"; @@ -883,7 +883,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const formula::SingleVectorRefToken *>(tmpCur5); - ss <<" if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isnan("; ss <<vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nPayType = 0;\n else\n"; @@ -940,13 +940,13 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pSur); ss << " if (gid0 >= " << pSVR->GetArrayLength() << ")\n"; ss << " fSchaetzwert = 0.1;\n"; - ss << " if (isNan(fSchaetzwert))\n"; + ss << " if (isnan(fSchaetzwert))\n"; ss << " x = 0.1;\n"; ss << " else\n"; } else if (pSur->GetType() == formula::svDouble) { - ss << " if (isNan(fSchaetzwert))\n"; + ss << " if (isnan(fSchaetzwert))\n"; ss << " x = 0.1;\n"; ss << " else\n"; } @@ -970,12 +970,12 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, ss << " i++;;\n"; ss << " arg1 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg0)){\n"; + ss << " if (!isnan(arg0)){\n"; ss << " fZaehler += arg0 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg0/pow(1.0+x,nCount+1.0);\n"; ss << " nCount += 1;\n"; ss << " }\n"; - ss << " if (!isNan(arg1)){\n"; + ss << " if (!isnan(arg1)){\n"; ss << " fZaehler += arg1 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg1/pow(1.0+x,nCount+1.0);\n"; ss << " nCount += 1;\n"; @@ -989,7 +989,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, ss << " && i < (gid0+" << nCurWindowSize << " )/2*2; i++){\n"; ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg0)){\n"; + ss << " if (!isnan(arg0)){\n"; ss << " fZaehler += arg0 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg0/pow(1.0+x,nCount+1.0);\n"; ss << " nCount += 1;\n"; @@ -997,7 +997,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, ss << " i++;\n"; ss << " arg1 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg1)){\n"; + ss << " if (!isnan(arg1)){\n"; ss << " fZaehler += arg1 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg1/pow(1.0+x,nCount+1.0);\n"; ss << " nCount+=1;\n"; @@ -1014,12 +1014,12 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, ss << " i++;;\n"; ss << " arg1 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg0)){\n"; + ss << " if (!isnan(arg0)){\n"; ss << " fZaehler += arg0 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg0/pow(1.0+x,nCount+1.0);\n"; ss << " nCount += 1;\n"; ss << " }\n"; - ss << " if (!isNan(arg1)){\n"; + ss << " if (!isnan(arg1)){\n"; ss << " fZaehler += arg1 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg1/pow(1.0+x,nCount+1.0);\n"; ss << " nCount+=1;\n"; @@ -1035,12 +1035,12 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, ss << " i++;;\n"; ss << " arg1 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg0)){\n"; + ss << " if (!isnan(arg0)){\n"; ss << " fZaehler += arg0 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg0/pow(1.0+x,nCount+1.0);\n"; ss << " nCount += 1;\n"; ss << " }\n"; - ss << " if (!isNan(arg1)){\n"; + ss << " if (!isnan(arg1)){\n"; ss << " fZaehler += arg1 / pow(1.0 + x, nCount);\n"; ss << " fNenner+=-1*nCount*arg1/pow(1.0+x,nCount+1.0);\n"; ss << " nCount+=1;\n"; @@ -1051,7 +1051,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss, } ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg0))\n"; + ss << " if (isnan(arg0))\n"; ss << " continue;\n"; ss << " fZaehler += arg0 / pow(1.0+x, nCount);\n"; ss << " fNenner += -nCount * arg0 / pow(1.0+x,nCount+1.0);\n"; @@ -1115,14 +1115,14 @@ void XNPV::GenSlidingWindowFunction( ss<< "int buffer_date_len = "; ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n\t"; - ss<<"if((gid0)>=buffer_date_len || isNan("; + ss<<"if((gid0)>=buffer_date_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"return NAN;\n\telse \n"; ss<<"dateNull = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if((gid0)>=buffer_rate_len || isNan("; + ss<<"if((gid0)>=buffer_rate_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"return NAN;\n\telse \n"; @@ -1239,42 +1239,42 @@ void PriceMat::GenSlidingWindowFunction( ss<< "int buffer_base_len = "; ss<< tmpCurDVR5->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_settle_len || isNan("; + ss<<"if(gid0>=buffer_settle_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"settle = 0;\n\telse \n\t\t"; ss<<"settle = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_mat_len || isNan("; + ss<<"if(gid0>=buffer_mat_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"mat = 0;\n\telse \n\t\t"; ss<<"mat = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_issue_len || isNan("; + ss<<"if(gid0>=buffer_issue_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"issue = 0;\n\telse \n\t\t"; ss<<"issue = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_rate_len || isNan("; + ss<<"if(gid0>=buffer_rate_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"rate = 0;\n\telse \n\t\t"; ss<<"rate = "; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_yield_len || isNan("; + ss<<"if(gid0>=buffer_yield_len || isnan("; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"yield = 0;\n\telse \n\t\t"; ss<<"yield = "; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_base_len || isNan("; + ss<<"if(gid0>=buffer_base_len || isnan("; ss << vSubArguments[5]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"nBase = 0;\n\telse \n\t\t"; @@ -1341,28 +1341,28 @@ void OpSYD::GenSlidingWindowFunction(std::stringstream &ss, ss << tmpCurDVR3->GetArrayLength(); ss << ";\n"; - ss <<" if(gid0>=buffer_cost_len || isNan("; + ss <<" if(gid0>=buffer_cost_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" cost = 0;\n\telse \n"; ss <<" cost = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0>=buffer_salvage_len || isNan("; + ss <<" if(gid0>=buffer_salvage_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" salvage = 0;\n\telse \n"; ss <<" salvage = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0>=buffer_life_len || isNan("; + ss <<" if(gid0>=buffer_life_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" life = 0;\n\telse \n"; ss <<" life = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0>=buffer_period_len || isNan("; + ss <<" if(gid0>=buffer_period_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" period = 0;\n\telse \n"; @@ -1417,9 +1417,9 @@ void MIRR::GenSlidingWindowFunction( ss << "arg1 = 0.0;\n\t"; ss << "if (gid0 >= argLen2)\n\t\t"; ss << "arg2 = 0.0;\n\t"; - ss << "if (isNan(arg1))\n\t\t"; + ss << "if (isnan(arg1))\n\t\t"; ss << "arg1 = 0.0;\n\t"; - ss << "if (isNan(arg2))\n\t\t"; + ss << "if (isnan(arg2))\n\t\t"; ss << "arg2 = 0.0;\n\t"; ss << "double invest = arg1 + 1.0;\n\t"; ss << "double reinvest = arg2 + 1.0;\n\t"; @@ -1433,7 +1433,7 @@ void MIRR::GenSlidingWindowFunction( ss << " i < " << nCurWindowSize << "; i++){\n\t\t"; ss << "arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t\t"; - ss << "if (isNan(arg0))\n\t\t\t"; + ss << "if (isnan(arg0))\n\t\t\t"; ss << "continue;\n\t\t"; ss << "if (arg0 > 0.0)\n\t\t\t"; ss << "NPV_reinvest += arg0 * Pow_reinvest;\n\t\t"; @@ -1482,7 +1482,7 @@ void OpEffective::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; @@ -1556,7 +1556,7 @@ void OpTbilleq::GenSlidingWindowFunction( ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_tmp000_len || isNan("; + ss<<"if(gid0>=buffer_tmp000_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp000 = 0;\n\telse \n\t\t"; @@ -1564,7 +1564,7 @@ void OpTbilleq::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp001_len || isNan("; + ss<<"if(gid0>=buffer_tmp001_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp001 = 0;\n\telse \n\t\t"; @@ -1572,7 +1572,7 @@ void OpTbilleq::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp002_len || isNan("; + ss<<"if(gid0>=buffer_tmp002_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp002 = 0;\n\telse \n\t\t"; @@ -1618,7 +1618,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fRate = 0;\n else\n"; @@ -1629,7 +1629,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nNumPeriods = 0;\n else\n"; @@ -1641,7 +1641,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fVal = 0;\n else\n"; @@ -1652,7 +1652,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nStartPer = 0;\n else\n"; @@ -1664,7 +1664,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const formula::SingleVectorRefToken *>(tmpCur4); - ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nEndPer = 0;\n else\n"; @@ -1677,7 +1677,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const formula::SingleVectorRefToken *>(tmpCur5); - ss <<" if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isnan("; ss <<vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nPayType = 0;\n else\n"; @@ -1771,42 +1771,42 @@ void OpAccrint::GenSlidingWindowFunction( ss<< " int buffer_nMode_len = "; ss<< tmpCurDVR6->GetArrayLength(); ss << ";\n"; - ss<<" if(gid0 >= buffer_nIssue_len || isNan("; + ss<<" if(gid0 >= buffer_nIssue_len || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nStartDate = 0;\n else\n"; ss <<" nStartDate=(int)"; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_nSettle_len || isNan("; + ss <<" if(gid0 >= buffer_nSettle_len || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nEndDate = 0;\n else\n"; ss <<" nEndDate=(int)"; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss <<" if(gid0 >= buffer_fRate_len || isNan("; + ss <<" if(gid0 >= buffer_fRate_len || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fRate = 0;\n else\n"; ss <<" fRate="; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_fVal_len || isNan("; + ss <<" if(gid0 >= buffer_fVal_len || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fVal = 0;\n else\n"; ss <<" fVal="; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_nFreq_len || isNan("; + ss <<" if(gid0 >= buffer_nFreq_len || isnan("; ss <<vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" freq = 0;\n else\n"; ss <<" freq= (int)"; ss << vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_nMode_len || isNan("; + ss <<" if(gid0 >= buffer_nMode_len || isnan("; ss <<vSubArguments[6]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" mode = 0;\n else\n"; @@ -1885,14 +1885,14 @@ void OpAccrintm::GenSlidingWindowFunction( ss<< "int buffer_nMode_len = "; ss<< tmpCurDVR4->GetArrayLength(); ss << ";\n\t"; - ss <<"if(gid0 >= buffer_nIssue_len || isNan("; + ss <<"if(gid0 >= buffer_nIssue_len || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n\t\t"; ss <<"nStartDate = 0;\n\telse\n\t\t"; ss << "nStartDate=(int)"; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n\t"; - ss <<"if(gid0 >= buffer_nSettle_len || isNan("; + ss <<"if(gid0 >= buffer_nSettle_len || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n\t\t"; ss <<"nEndDate = 0;\n\telse\n\t\t"; @@ -1900,21 +1900,21 @@ void OpAccrintm::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss <<"if(gid0 >= buffer_fRate_len || isNan("; + ss <<"if(gid0 >= buffer_fRate_len || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n\t\t"; ss <<"fRate = 0;\n\telse\n\t\t"; ss << "fRate="; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<";\n\t"; - ss <<"if(gid0 >= buffer_fVal_len || isNan("; + ss <<"if(gid0 >= buffer_fVal_len || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n\t\t"; ss <<"fVal = 0;\n\telse\n\t\t"; ss << "fVal="; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss <<"if(gid0 >= buffer_nMode_len || isNan("; + ss <<"if(gid0 >= buffer_nMode_len || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n\t\t"; ss <<"mode = 0;\n\telse\n\t\t"; @@ -2037,7 +2037,7 @@ void OpYield::GenSlidingWindowFunction( ss<< tmpCurDVR6->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_tmp000_len || isNan("; + ss<<"if(gid0>=buffer_tmp000_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp000 = 0;\n\telse \n\t\t"; @@ -2045,7 +2045,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp001_len || isNan("; + ss<<"if(gid0>=buffer_tmp001_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp001 = 0;\n\telse \n\t\t"; @@ -2053,7 +2053,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp002_len || isNan("; + ss<<"if(gid0>=buffer_tmp002_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp002 = 0;\n\telse \n\t\t"; @@ -2061,7 +2061,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp003_len || isNan("; + ss<<"if(gid0>=buffer_tmp003_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp003 = 0;\n\telse \n\t\t"; @@ -2069,7 +2069,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp004_len || isNan("; + ss<<"if(gid0>=buffer_tmp004_len || isnan("; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp004 = 0;\n\telse \n\t\t"; @@ -2077,7 +2077,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp005_len || isNan("; + ss<<"if(gid0>=buffer_tmp005_len || isnan("; ss << vSubArguments[5]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp005 = 0;\n\telse \n\t\t"; @@ -2085,7 +2085,7 @@ void OpYield::GenSlidingWindowFunction( ss << vSubArguments[5]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp006_len || isNan("; + ss<<"if(gid0>=buffer_tmp006_len || isnan("; ss << vSubArguments[6]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp006 = 0;\n\telse \n\t\t"; @@ -2135,21 +2135,21 @@ void OpSLN::GenSlidingWindowFunction(std::stringstream &ss, ss<< " int buffer_dauer_len = "; ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n"; - ss<<" if(gid0>=buffer_wert_len || isNan("; + ss<<" if(gid0>=buffer_wert_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" wert = 0;\n\telse \n"; ss<<" wert = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_rest_len || isNan("; + ss<<" if(gid0>=buffer_rest_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" rest = 0;\n\telse \n"; ss<<" rest = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_dauer_len || isNan("; + ss<<" if(gid0>=buffer_dauer_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" dauer = 0;\n\telse \n"; @@ -2244,7 +2244,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss<< tmpCurDVR5->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_tmp000_len || isNan("; + ss<<"if(gid0>=buffer_tmp000_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp000 = 0;\n\telse \n\t\t"; @@ -2252,7 +2252,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp001_len || isNan("; + ss<<"if(gid0>=buffer_tmp001_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp001 = 0;\n\telse \n\t\t"; @@ -2260,7 +2260,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp002_len || isNan("; + ss<<"if(gid0>=buffer_tmp002_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp002 = 0;\n\telse \n\t\t"; @@ -2268,7 +2268,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp003_len || isNan("; + ss<<"if(gid0>=buffer_tmp003_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp003 = 0;\n\telse \n\t\t"; @@ -2276,7 +2276,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp004_len || isNan("; + ss<<"if(gid0>=buffer_tmp004_len || isnan("; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp004 = 0;\n\telse \n\t\t"; @@ -2284,7 +2284,7 @@ void OpYieldmat::GenSlidingWindowFunction( ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp005_len || isNan("; + ss<<"if(gid0>=buffer_tmp005_len || isnan("; ss << vSubArguments[5]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp005 = 0;\n\telse \n\t\t"; @@ -2338,7 +2338,7 @@ void OpPMT::GenSlidingWindowFunction(std::stringstream &ss, { ss <<" temp="<<vSubArguments[i]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if (isNan(temp))\n"; + ss <<" if (isnan(temp))\n"; ss <<" tmp"<<i<<"= 0;\n"; ss <<" else\n"; ss <<" tmp"<<i<<"=temp;\n"; @@ -2423,7 +2423,7 @@ void OpNPV::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; ss << " double temp1=1.0;"; - ss << " if (isNan(temp)){\n"; + ss << " if (isnan(temp)){\n"; ss << " tmp += 0;}\n"; ss << " else{\n"; ss << " for(int i=1;i<nCount;i+=2)\n"; @@ -2530,7 +2530,7 @@ void OpPrice::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -2628,7 +2628,7 @@ void OpOddlprice::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -2727,7 +2727,7 @@ void OpOddlyield::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -2807,7 +2807,7 @@ void OpPriceDisc::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -2869,7 +2869,7 @@ void OpNper::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -2949,7 +2949,7 @@ void OpPPMT::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg="; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " tmp"<<i<<"= 0;\n"; ss << " else\n"; ss << " tmp"<<i<<"=arg;\n"; @@ -3034,7 +3034,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3045,7 +3045,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3056,7 +3056,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3067,7 +3067,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3125,7 +3125,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3136,7 +3136,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3147,7 +3147,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3158,7 +3158,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3211,7 +3211,7 @@ void OpCouppcd::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3222,7 +3222,7 @@ void OpCouppcd::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3233,7 +3233,7 @@ void OpCouppcd::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3244,7 +3244,7 @@ void OpCouppcd::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3298,7 +3298,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3309,7 +3309,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3320,7 +3320,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3331,7 +3331,7 @@ vSubArguments) { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3398,7 +3398,7 @@ void OpCoupdaysnc::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3409,7 +3409,7 @@ void OpCoupdaysnc::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3420,7 +3420,7 @@ void OpCoupdaysnc::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3431,7 +3431,7 @@ void OpCoupdaysnc::GenSlidingWindowFunction( { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3484,7 +3484,7 @@ void OpCoupnum::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" nSettle = 0;\n else\n"; } @@ -3495,7 +3495,7 @@ void OpCoupnum::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nMat = 0;\n else\n"; } @@ -3506,7 +3506,7 @@ void OpCoupnum::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFreq = 0;\n else\n"; } @@ -3517,7 +3517,7 @@ void OpCoupnum::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3567,7 +3567,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" fCost = 0;\n else\n"; } @@ -3578,7 +3578,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nDate = 0;\n else\n"; } @@ -3589,7 +3589,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFirstPer = 0;\n else\n"; } @@ -3600,7 +3600,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" fRestVal = 0;\n else\n"; } @@ -3611,7 +3611,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const formula::SingleVectorRefToken *>(tmpCur4); - ss <<" if(isNan(" <<vSubArguments[4]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR4->GetArrayLength()<<"))\n"; ss <<" fPer = 0;\n else\n"; } @@ -3622,7 +3622,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const formula::SingleVectorRefToken *>(tmpCur5); - ss <<" if(isNan(" <<vSubArguments[5]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR5->GetArrayLength()<<"))\n"; ss <<" fRate = 0;\n else\n"; } @@ -3633,7 +3633,7 @@ void OpAmordegrc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR6= static_cast<const formula::SingleVectorRefToken *>(tmpCur6); - ss <<" if(isNan(" <<vSubArguments[6]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[6]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR6->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3715,7 +3715,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(isNan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR0->GetArrayLength()<<"))\n"; ss <<" fCost = 0;\n else\n"; } @@ -3726,7 +3726,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(isNan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR1->GetArrayLength()<<"))\n"; ss <<" nDate = 0;\n else\n"; } @@ -3737,7 +3737,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(isNan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR2->GetArrayLength()<<"))\n"; ss <<" nFirstPer = 0;\n else\n"; } @@ -3748,7 +3748,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(isNan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR3->GetArrayLength()<<"))\n"; ss <<" fRestVal = 0;\n else\n"; } @@ -3759,7 +3759,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const formula::SingleVectorRefToken *>(tmpCur4); - ss <<" if(isNan(" <<vSubArguments[4]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR4->GetArrayLength()<<"))\n"; ss <<" fPer = 0;\n else\n"; } @@ -3770,7 +3770,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const formula::SingleVectorRefToken *>(tmpCur5); - ss <<" if(isNan(" <<vSubArguments[5]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[5]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR5->GetArrayLength()<<"))\n"; ss <<" fRate = 0;\n else\n"; } @@ -3781,7 +3781,7 @@ void OpAmorlinc::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*tmpCurDVR6= static_cast<const formula::SingleVectorRefToken *>(tmpCur6); - ss <<" if(isNan(" <<vSubArguments[6]->GenSlidingWindowDeclRef(); + ss <<" if(isnan(" <<vSubArguments[6]->GenSlidingWindowDeclRef(); ss <<")||(gid0 >="<<tmpCurDVR6->GetArrayLength()<<"))\n"; ss <<" nBase = 0;\n else\n"; } @@ -3866,32 +3866,32 @@ void OpReceived::GenSlidingWindowFunction(std::stringstream &ss, ss<< " int buffer_rob_len = "; ss<< tmpCurDVR4->GetArrayLength(); ss << ";\n"; - ss <<" if(gid0 >= buffer_settle_len || isNan("; + ss <<" if(gid0 >= buffer_settle_len || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nSettle = 0;\n\telse\n"; ss <<" nSettle = (int)"<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_mat_len || isNan("; + ss <<" if(gid0 >= buffer_mat_len || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nMat = 0;\n\telse\n"; ss <<" nMat = (int)"; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_invest_len || isNan("; + ss <<" if(gid0 >= buffer_invest_len || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fInvest = 0;\n\telse\n"; ss <<" fInvest = "<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_disc_len || isNan("; + ss <<" if(gid0 >= buffer_disc_len || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fDisc = 0;\n\telse\n"; ss <<" fDisc = "<<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_rob_len || isNan("; + ss <<" if(gid0 >= buffer_rob_len || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" rOB = 0;\n\telse\n"; @@ -3976,7 +3976,7 @@ void OpYielddisc::GenSlidingWindowFunction( ss<< tmpCurDVR4->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_tmp000_len || isNan("; + ss<<"if(gid0>=buffer_tmp000_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp000 = 0;\n\telse \n\t\t"; @@ -3984,7 +3984,7 @@ void OpYielddisc::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp001_len || isNan("; + ss<<"if(gid0>=buffer_tmp001_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp001 = 0;\n\telse \n\t\t"; @@ -3992,7 +3992,7 @@ void OpYielddisc::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp002_len || isNan("; + ss<<"if(gid0>=buffer_tmp002_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp002 = 0;\n\telse \n\t\t"; @@ -4000,7 +4000,7 @@ void OpYielddisc::GenSlidingWindowFunction( ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp003_len || isNan("; + ss<<"if(gid0>=buffer_tmp003_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp003 = 0;\n\telse \n\t\t"; @@ -4008,7 +4008,7 @@ void OpYielddisc::GenSlidingWindowFunction( ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp004_len || isNan("; + ss<<"if(gid0>=buffer_tmp004_len || isnan("; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp004 = 0;\n\telse \n\t\t"; @@ -4103,15 +4103,15 @@ void RATE::GenSlidingWindowFunction( ss << " arg4=" << vSubArguments[4]->GenSlidingWindowDeclRef()<<";\n"; ss << " arg5=" << vSubArguments[5]->GenSlidingWindowDeclRef()<<";\n"; ss << " int guessLen = " << pSVR->GetArrayLength() << ";\n"; - ss << " if (isNan(arg0) || isNan(arg1) || isNan(arg2)){\n"; + ss << " if (isnan(arg0) || isnan(arg1) || isnan(arg2)){\n"; ss << " result = 523;\n"; ss << " return result;\n"; ss << " }\n"; - ss << " if (isNan(arg3))\n"; + ss << " if (isnan(arg3))\n"; ss << " arg3 = 0.0;\n"; - ss << " if (isNan(arg4))\n"; + ss << " if (isnan(arg4))\n"; ss << " arg4 = 0.0;\n"; - ss << " if (isNan(arg5))\n"; + ss << " if (isnan(arg5))\n"; ss << " arg5 = 0.1;\n"; ss << " if (gid0 >= guessLen)\n"; ss << " arg5 = 0.1;\n"; @@ -4254,7 +4254,7 @@ void OpTbillyield::GenSlidingWindowFunction( ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n\t"; - ss<<"if(gid0>=buffer_tmp000_len || isNan("; + ss<<"if(gid0>=buffer_tmp000_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp000 = 0;\n\telse \n\t\t"; @@ -4262,7 +4262,7 @@ void OpTbillyield::GenSlidingWindowFunction( ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp001_len || isNan("; + ss<<"if(gid0>=buffer_tmp001_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp001 = 0;\n\telse \n\t\t"; @@ -4270,7 +4270,7 @@ void OpTbillyield::GenSlidingWindowFunction( ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n\t"; - ss<<"if(gid0>=buffer_tmp002_len || isNan("; + ss<<"if(gid0>=buffer_tmp002_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n\t\t"; ss<<"tmp002 = 0;\n\telse \n\t\t"; @@ -4313,7 +4313,7 @@ void OpDDB::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fWert = 0;\n else\n"; @@ -4324,7 +4324,7 @@ void OpDDB::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const formula::SingleVectorRefToken *>(tmpCur1); - ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fRest = 0;\n else\n"; @@ -4336,7 +4336,7 @@ void OpDDB::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const formula::SingleVectorRefToken *>(tmpCur2); - ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fDauer = 0;\n else\n"; @@ -4348,7 +4348,7 @@ void OpDDB::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const formula::SingleVectorRefToken *>(tmpCur3); - ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fPeriode = 0;\n else\n"; @@ -4359,7 +4359,7 @@ void OpDDB::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const formula::SingleVectorRefToken *>(tmpCur4); - ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" fFaktor = 0;\n else\n"; @@ -4452,7 +4452,7 @@ tmpCur4); ss<< tmpCurDVR2->GetArrayLength(); ss << ";\n"; - ss<<" if(gid0>=buffer_zins_len || isNan("; + ss<<" if(gid0>=buffer_zins_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" zins = 0;\n else \n"; @@ -4460,7 +4460,7 @@ tmpCur4); ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_zzr_len || isNan("; + ss<<" if(gid0>=buffer_zzr_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" zzr = 0;\n else \n"; @@ -4468,7 +4468,7 @@ tmpCur4); ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss<<";\n"; - ss<<" if(gid0>=buffer_rmz_len || isNan("; + ss<<" if(gid0>=buffer_rmz_len || isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" rmz = 0;\n else \n"; @@ -4478,7 +4478,7 @@ tmpCur4); if(vSubArguments.size()>3) { - ss<<" if(gid0>=buffer_zw_len || isNan("; + ss<<" if(gid0>=buffer_zw_len || isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" zw = 0;\n else \n"; @@ -4492,7 +4492,7 @@ tmpCur4); if(vSubArguments.size()>4) { - ss<<" if(gid0>=buffer_flag_len || isNan("; + ss<<" if(gid0>=buffer_flag_len || isnan("; ss << vSubArguments[4]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" flag = 0;\n else \n"; @@ -4730,32 +4730,32 @@ void OpDB::GenSlidingWindowFunction(std::stringstream& ss, ss<< " int buffer_nMonate_len = "; ss<< tmpCurDVR4->GetArrayLength(); ss << ";\n"; - ss <<" if(gid0 >= buffer_wert_len || isNan("; + ss <<" if(gid0 >= buffer_wert_len || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nWert = 0;\n else\n"; ss <<" nWert = "<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_rest_len || isNan("; + ss <<" if(gid0 >= buffer_rest_len || isnan("; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nRest = 0;\n else\n"; ss <<" nRest = "; ss <<vSubArguments[1]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_dauer_len || isNan("; + ss <<" if(gid0 >= buffer_dauer_len || isnan("; ss <<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nDauer = 0;\n else\n"; ss <<" nDauer = "<<vSubArguments[2]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_periode_len || isNan("; + ss <<" if(gid0 >= buffer_periode_len || isnan("; ss <<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nPeriode = 0;\n else\n"; ss <<" nPeriode = "<<vSubArguments[3]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss <<" if(gid0 >= buffer_nMonate_len || isNan("; + ss <<" if(gid0 >= buffer_nMonate_len || isnan("; ss <<vSubArguments[4]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" nMonate = 0;\n else\n"; diff --git a/sc/source/core/opencl/op_logical.cxx b/sc/source/core/opencl/op_logical.cxx index 30f1f08a3884..7f63af628cab 100644 --- a/sc/source/core/opencl/op_logical.cxx +++ b/sc/source/core/opencl/op_logical.cxx @@ -45,7 +45,7 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss, formula::SingleVectorRefToken *>(tmpCur0); ss<< " int buffer_len"<<j<<" = "<<pCurDVR->GetArrayLength(); ss<< ";\n"; - ss <<" if(gid0 >= buffer_len"<<j<<" || isNan("; + ss <<" if(gid0 >= buffer_len"<<j<<" || isnan("; ss <<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" tmp = 1;\n else\n"; @@ -78,14 +78,14 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss, } if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed()) { - ss <<" if(isNan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<")||i+gid0>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 1;\n else\n"; } else { - ss <<" if(isNan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<")||i>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 1;\n else\n"; @@ -130,7 +130,7 @@ void OpOr::GenSlidingWindowFunction(std::stringstream &ss, formula::SingleVectorRefToken *>(tmpCur0); ss<< " int buffer_len"<<j<<" = "<<pCurDVR->GetArrayLength(); ss<< ";\n"; - ss <<" if(gid0 >= buffer_len"<<j<<" || isNan("; + ss <<" if(gid0 >= buffer_len"<<j<<" || isnan("; ss <<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" tmp = 0;\n else\n"; @@ -163,14 +163,14 @@ void OpOr::GenSlidingWindowFunction(std::stringstream &ss, } if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed()) { - ss <<" if(isNan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<")||i+gid0>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 0;\n else\n"; } else { - ss <<" if(isNan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef(); ss <<")||i>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 0;\n else\n"; @@ -204,7 +204,7 @@ void OpNot::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*pCurDVR= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(gid0 >= "<<pCurDVR->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<pCurDVR->GetArrayLength()<<" || isnan("; ss <<vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" tmp = 0;\n else\n"; @@ -244,7 +244,7 @@ void OpXor::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken*pCurDVR= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); - ss <<" if(gid0 >= "<<pCurDVR->GetArrayLength()<<" || isNan("; + ss <<" if(gid0 >= "<<pCurDVR->GetArrayLength()<<" || isnan("; ss <<rArg->GenSlidingWindowDeclRef(); ss <<"))\n"; ss <<" tmp = 0;\n else\n"; @@ -279,14 +279,14 @@ void OpXor::GenSlidingWindowFunction(std::stringstream &ss, } if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed()) { - ss <<" if(isNan("<<rArg->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<rArg->GenSlidingWindowDeclRef(); ss <<")||i+gid0>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 0;\n else\n"; } else { - ss <<" if(isNan("<<rArg->GenSlidingWindowDeclRef(); + ss <<" if(isnan("<<rArg->GenSlidingWindowDeclRef(); ss <<")||i>="<<pCurDVR->GetArrayLength(); ss <<")\n"; ss <<" tmp = 0;\n else\n"; @@ -324,7 +324,7 @@ void OpIf::GenSlidingWindowFunction(std::stringstream &ss, { if(vSubArguments.size()==3) { - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")|| "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); @@ -339,7 +339,7 @@ void OpIf::GenSlidingWindowFunction(std::stringstream &ss, } if(vSubArguments.size()==2) { - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")|| "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); @@ -352,7 +352,7 @@ void OpIf::GenSlidingWindowFunction(std::stringstream &ss, } if(vSubArguments.size()==1) { - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")|| "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index a7c95ad74fe4..3f28e6386143 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -49,7 +49,7 @@ void OpCos::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -89,7 +89,7 @@ void OpSec::GenSlidingWindowFunction(std::stringstream &ss, ss <<" int gid0=get_global_id(0);\n"; ss <<" double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss<<" if(isNan(arg0)||(gid0>="; + ss<<" if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -120,7 +120,7 @@ void OpSecH::GenSlidingWindowFunction(std::stringstream &ss, ss <<" int gid0=get_global_id(0);\n"; ss <<" double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss<<" if(isNan(arg0)||(gid0>="; + ss<<" if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -167,7 +167,7 @@ void OpMROUND::GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp="; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(tmp))\n"; + ss << " if (isnan(tmp))\n"; ss << " arg"<<i<<"= 0;\n"; ss << " else\n"; ss << " arg"<<i<<"=tmp;\n"; @@ -203,7 +203,7 @@ void OpCosh::GenSlidingWindowFunction(std::stringstream &ss, ss <<" int gid0=get_global_id(0);\n"; ss << " double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -239,7 +239,7 @@ void OpCot::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -288,7 +288,7 @@ void OpCoth::GenSlidingWindowFunction(std::stringstream &ss, ss <<" int gid0=get_global_id(0);\n"; ss << " double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -329,14 +329,14 @@ void OpCombinA::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan(arg" << i <<")||(gid0 >= "; + ss << " if(isnan(arg" << i <<")||(gid0 >= "; ss << pSVR->GetArrayLength(); ss << "))\n"; ss << " arg" << i << " = 0;\n"; } else if (pCur->GetType() == formula::svDouble) { - ss << " if(isNan(arg" << i <<"))\n"; + ss << " if(isnan(arg" << i <<"))\n"; ss << " arg" << i << " = 0;\n"; } } @@ -376,7 +376,7 @@ void OpEven::GenSlidingWindowFunction(std::stringstream &ss, ss <<" int gid0=get_global_id(0);\n"; ss << " double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -409,9 +409,9 @@ void OpMod::GenSlidingWindowFunction(std::stringstream &ss, ss << ";\n"; ss << " double arg1 =" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg0)||arg0 == 0)\n"; + ss << " if(isnan(arg0)||arg0 == 0)\n"; ss << " return 0;\n"; - ss << " if(isNan(arg1) || arg1 ==0)\n"; + ss << " if(isnan(arg1) || arg1 ==0)\n"; ss << " return NAN;\n"; ss << " double tem;\n"; ss << " if(arg0 < 0 && arg1 > 0)\n"; @@ -451,7 +451,7 @@ void OpLog::GenSlidingWindowFunction(std::stringstream &ss, { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan(arg" << i <<")||(gid0 >= "; + ss << " if(isnan(arg" << i <<")||(gid0 >= "; ss << pSVR->GetArrayLength(); ss << "))\n"; if( i == 0) @@ -461,7 +461,7 @@ void OpLog::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if(isNan(arg" << i <<"))\n"; + ss << " if(isnan(arg" << i <<"))\n"; if( i == 0) ss << " arg0 = 0;\n"; else if ( i == 1) @@ -492,7 +492,7 @@ void OpCsc::GenSlidingWindowFunction( ss <<"int gid0=get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss<< "if(isNan(arg0)||(gid0>="; + ss<< "if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n\t\t"; ss<<"arg0 = 0;\n\t"; @@ -784,7 +784,7 @@ void OpCscH::GenSlidingWindowFunction( ss <<"int gid0=get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss<< "if(isNan(arg0)||(gid0>="; + ss<< "if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n\t\t"; ss<<"arg0 = 0;\n\t"; @@ -818,7 +818,7 @@ void OpExp::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -918,7 +918,7 @@ void OpLog10::GenSlidingWindowFunction(std::stringstream &ss, ss <<"int gid0=get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss<< "if(isNan(arg0)||(gid0>="; + ss<< "if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n\t\t"; ss<<"arg0 = 0;\n\t"; @@ -943,7 +943,7 @@ void OpSinh::GenSlidingWindowFunction(std::stringstream &ss, ss <<" double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss <<";\n"; - ss<< " if(isNan(arg0))\n"; + ss<< " if(isnan(arg0))\n"; ss<<" arg0 = 0;\n"; ss << " double tmp=( exp(arg0)-exp(-arg0) )/2;\n"; ss << " return tmp;\n"; @@ -975,7 +975,7 @@ void OpSin::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -1018,7 +1018,7 @@ void OpAbs::GenSlidingWindowFunction(std::stringstream &ss, ss << " int buffer_len = "; ss << tmpCurDVR0->GetArrayLength(); ss << ";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp = " << GetBottom() << ";\n else \n"; @@ -1051,7 +1051,7 @@ void OpArcCos::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = "<< tmpCurDVR0->GetArrayLength()<< ";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef()<< "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1082,7 +1082,7 @@ void OpArcCosHyp::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = "<<tmpCurDVR0->GetArrayLength()<<";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1129,7 +1129,7 @@ void OpTan::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -1170,7 +1170,7 @@ void OpTanH::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double arg0 = "<< vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg0)||(gid0>="; + ss << " if(isnan(arg0)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " arg0 = 0;\n"; @@ -1208,7 +1208,7 @@ void OpPower::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg["<<i<<"] = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg["<<i; + ss << " if(isnan(arg["<<i; ss << "])||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; @@ -1223,7 +1223,7 @@ void OpPower::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg["<<i<<"] = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg["<<i; + ss << " if(isnan(arg["<<i; ss << "])||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; @@ -1273,7 +1273,7 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -1312,7 +1312,7 @@ void OpArcCot::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = " << tmpCurDVR0->GetArrayLength()<< ";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1346,7 +1346,7 @@ void OpArcCotHyp::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -1391,7 +1391,7 @@ void OpArcSin::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = " << tmpCurDVR0->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1421,7 +1421,7 @@ void OpArcSinHyp::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = "<<tmpCurDVR0->GetArrayLength()<<";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1469,12 +1469,12 @@ void OpArcTan2::GenSlidingWindowFunction(std::stringstream &ss, static_cast<const formula::SingleVectorRefToken *>(iYNum); ss << " int buffer_x_len = " << tmpCurDVRX->GetArrayLength() << ";\n"; ss << " int buffer_y_len = " << tmpCurDVRY->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_x_len || isNan("; + ss << " if((gid0)>=buffer_x_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " x_num = " << GetBottom() << ";\n"; ss << " else \n "; ss << " x_num = "<< vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if((gid0)>=buffer_y_len || isNan("; + ss << " if((gid0)>=buffer_y_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " y_num = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1508,7 +1508,7 @@ void OpArcTan::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -1546,7 +1546,7 @@ void OpArcTanH::GenSlidingWindowFunction(std::stringstream &ss, const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const formula::SingleVectorRefToken *>(tmpCur0); ss << " int buffer_len = " << tmpCurDVR0->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_len || isNan("; + ss << " if((gid0)>=buffer_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " tmp = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1578,12 +1578,12 @@ void OpBitAnd::GenSlidingWindowFunction(std::stringstream &ss, static_cast<const formula::SingleVectorRefToken *>(iNum2); ss << " int buffer_num1_len = "<<tmpCurDVRNum1->GetArrayLength()<<";\n"; ss << " int buffer_num2_len = "<<tmpCurDVRNum2->GetArrayLength()<<";\n"; - ss << " if((gid0)>=buffer_num1_len || isNan("; + ss << " if((gid0)>=buffer_num1_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num1 = " << GetBottom() << ";\n"; ss << " else \n "; ss << " num1 = " << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if((gid0)>=buffer_num2_len || isNan("; + ss << " if((gid0)>=buffer_num2_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " num2 = " << GetBottom() << ";\n"; ss << " else \n "; @@ -1842,7 +1842,7 @@ void OpOdd::GenSlidingWindowFunction( ss << " double tmp=0;\n"; ss << " double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -1887,7 +1887,7 @@ void OpCountIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " varb = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(varb)||(gid0>="; + ss << " if(isnan(varb)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " varb = 0;\n"; @@ -1941,7 +1941,7 @@ void OpCountIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " vara = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(vara))\n"; + ss << " if (isnan(vara))\n"; ss << " continue;\n"; ss << " (vara == varb) && varc++;\n"; ss << " }\n"; @@ -1954,7 +1954,7 @@ void OpCountIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " vara = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(vara)||(gid0>="; + ss << " if(isnan(vara)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " return 0;\n"; @@ -1992,7 +1992,7 @@ void OpSumIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " varb = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(varb)||(gid0>="; + ss << " if(isnan(varb)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " varb = 0;\n"; @@ -2046,12 +2046,12 @@ void OpSumIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " vara = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(vara))\n"; + ss << " if (isnan(vara))\n"; ss << " continue;\n"; ss << " varc = "; ss << vSubArguments[flag]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(varc))\n"; + ss << " if (isnan(varc))\n"; ss << " varc = 0.0f;\n"; ss << " (vara == varb)&&(sum = sum + varc);\n"; ss << " }\n"; @@ -2064,7 +2064,7 @@ void OpSumIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " vara = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(vara)||(gid0>="; + ss << " if(isnan(vara)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " return 0;\n"; @@ -2072,7 +2072,7 @@ void OpSumIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " varc = "; ss << vSubArguments[flag]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(varc)||(gid0>="; + ss << " if(isnan(varc)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " varc = 0.0f;\n"; @@ -2114,7 +2114,7 @@ void OpTrunc::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg["<<i<<"] = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg["<<i; + ss << " if(isnan(arg["<<i; ss << "])||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; @@ -2129,7 +2129,7 @@ void OpTrunc::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg["<<i<<"] = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg["<<i; + ss << " if(isnan(arg["<<i; ss << "])||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; @@ -2185,9 +2185,9 @@ void OpFloor::GenSlidingWindowFunction( ss << " arg2 = " << vSubArguments[2]->GenSlidingWindowDeclRef(); ss << ";\n"; } - ss << " if(isNan(arg0) || isNan(arg1))\n"; + ss << " if(isnan(arg0) || isnan(arg1))\n"; ss << " return 0;\n"; - ss << " if(isNan(arg2))\n"; + ss << " if(isnan(arg2))\n"; ss << " arg2 = 0.0;\n"; ss << " if(arg0*arg1<0)\n"; ss << " return NAN;\n"; @@ -2219,13 +2219,13 @@ void OpBitOr::GenSlidingWindowFunction(std::stringstream &ss, static_cast<const formula::SingleVectorRefToken *>(iNum2); ss << " int buffer_num1_len = "<<tmpCurDVRNum1->GetArrayLength()<<";\n"; ss << " int buffer_num2_len = "<<tmpCurDVRNum2->GetArrayLength()<<";\n"; - ss << " if((gid0)>=buffer_num1_len || isNan("; + ss << " if((gid0)>=buffer_num1_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num1 = " << GetBottom() << ";\n"; ss << " else \n "; ss << " num1 = floor(" << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ");\n"; - ss << " if((gid0)>=buffer_num2_len || isNan("; + ss << " if((gid0)>=buffer_num2_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " num2 = " << GetBottom() << ";\n"; ss << " else\n "; @@ -2257,13 +2257,13 @@ void OpBitXor::GenSlidingWindowFunction(std::stringstream &ss, ss << " int buffer_num1_len = " << tmpCurDVRNum1->GetArrayLength() << ";\n"; ss << " int buffer_num2_len = " << tmpCurDVRNum2->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_num1_len || isNan("; + ss << " if((gid0)>=buffer_num1_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num1 = " << GetBottom() << ";\n"; ss << " else\n "; ss << " num1 = floor(" << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ");\n"; - ss << " if((gid0)>=buffer_num2_len || isNan("; + ss << " if((gid0)>=buffer_num2_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " num2 = " << GetBottom() << ";\n"; ss << " else\n "; @@ -2295,13 +2295,13 @@ void OpBitLshift::GenSlidingWindowFunction(std::stringstream &ss, ss << " int buffer_num_len = "<< tmpCurDVRNum->GetArrayLength()<<";\n"; ss << " int buffer_shift_amount_len = "; ss << tmpCurDVRShiftAmount->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_num_len || isNan("; + ss << " if((gid0)>=buffer_num_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num = " << GetBottom() << ";\n"; ss << " else\n "; ss << " num = floor("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ");\n"; - ss << " if((gid0)>=buffer_shift_amount_len || isNan("; + ss << " if((gid0)>=buffer_shift_amount_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " shift_amount = " << GetBottom() << ";\n"; ss << " else\n "; @@ -2337,13 +2337,13 @@ void OpBitRshift::GenSlidingWindowFunction(std::stringstream &ss, ss << " int buffer_shift_amount_len = "; ss << tmpCurDVRShiftAmount->GetArrayLength() << ";\n"; - ss << " if((gid0)>=buffer_num_len || isNan("; + ss << " if((gid0)>=buffer_num_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num = " << GetBottom() << ";\n"; ss << " else\n "; ss << " num = floor("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ");\n"; - ss << " if((gid0)>=buffer_shift_amount_len || isNan("; + ss << " if((gid0)>=buffer_shift_amount_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " shift_amount = " <<GetBottom()<< ";\n"; ss << " else\n "; @@ -2407,7 +2407,7 @@ void OpSumSQ::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << rArg->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " sum += pown(arg, 2);\n"; ss << " }\n"; @@ -2420,7 +2420,7 @@ void OpSumSQ::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << rArg->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg)||(gid0>="; + ss << " if(isnan(arg)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " arg = 0.0f;\n"; @@ -2471,7 +2471,7 @@ void OpSqrtPi::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -2509,12 +2509,12 @@ void OpCeil::GenSlidingWindowFunction(std::stringstream &ss, ss << " double num = " << GetBottom() << ";\n"; ss << " double significance = " << GetBottom() << ";\n"; ss << " double bAbs = 0;\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num = " << GetBottom() << ";\n"; ss << " else\n "; ss << " num = " << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " return 0.0;\n"; ss << " else\n "; @@ -2539,7 +2539,7 @@ void OpCeil::GenSlidingWindowFunction(std::stringstream &ss, { ss<< " if("; } - ss << "isNan("; + ss << "isnan("; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << "))\n"; ss << " bAbs = 0;\n"; ss << " else\n "; @@ -2577,13 +2577,13 @@ void OpCombin::GenSlidingWindowFunction(std::stringstream &ss, if(iNum->GetType() == formula::svSingleVectorRef && iNumChosen->GetType() == formula::svSingleVectorRef) { - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num = " << GetBottom() << ";\n"; ss << " else\n "; ss << " num = floor("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ");\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " num_chosen = " << GetBottom() << ";\n"; ss << " else\n "; @@ -2679,15 +2679,15 @@ void OpConvert::GenSlidingWindowFunction( ss << ";\n"; ss << " double arg2 = " << vSubArguments[2]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; - ss<< " if(isNan(arg1)||(gid0>="; + ss<< " if(isnan(arg1)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg1 = 0;\n"; - ss<< " if(isNan(arg2)||(gid0>="; + ss<< " if(isnan(arg2)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n"; ss<<" arg2 = 0;\n"; @@ -2755,21 +2755,21 @@ void OpProduct::GenSlidingWindowFunction(std::stringstream &ss, ss << "0; i < " << pDVR->GetArrayLength() << "; i++)\n"; ss << " {\n"; } - ss << "if(!isNan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; ss << "product = product*"; ss << rArg->GenSlidingWindowDeclRef()<<";\n"; ss << " }\n"; } else if (pCur->GetType() == formula::svSingleVectorRef) { - ss << "if(!isNan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; ss << "product = product*"; ss << rArg->GenSlidingWindowDeclRef()<<";\n"; } else { - ss << "if(!isNan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; ss << "product = product*"; ss << rArg->GenSlidingWindowDeclRef()<<";\n"; } @@ -2962,7 +2962,7 @@ void OpDeg::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ")||(gid0>="; ss << tmpCurDVR->GetArrayLength(); @@ -3014,7 +3014,7 @@ void OpFact::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[0]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg0 = 0;\n"; @@ -3061,12 +3061,12 @@ void OpQuotient::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0 = get_global_id(0);\n"; ss << " double num1 = 1.0;\n"; ss << " double num2 = 1.0;\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << "))\n"; ss << " num1 = 1.0;\n"; ss << " else \n "; ss << " num1 = " << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << "))\n"; ss << " num2 = 1.0;\n"; ss << " else \n "; @@ -3105,7 +3105,7 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, ss << " var["<<i<<"] = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(var["<<i<<"])||(gid0>="; + ss << " if(isnan(var["<<i<<"])||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " var["<<i<<"] = 0;\n"; @@ -3161,7 +3161,7 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, ss << " coeff = "; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(coeff))\n"; + ss << " if (isnan(coeff))\n"; ss << " continue;\n"; ss << " res = res + coeff * pow(var[0],"; ss << " var[1] + j * var[2]);\n"; @@ -3176,7 +3176,7 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, ss << " coeff = "; ss << vSubArguments[3]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(coeff)||(gid0>="; + ss << " if(isnan(coeff)||(gid0>="; ss << tmpCurDVR->GetArrayLength(); ss << "))\n"; ss << " return 0;\n"; diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index 203b54810a0a..2668770b742b 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -79,7 +79,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -93,7 +93,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -159,7 +159,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -170,7 +170,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken*>(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " {\n"; @@ -273,7 +273,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fSumSqr += arg * arg;\n"; @@ -301,7 +301,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " mu = " ; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(mu))\n"; + ss << " if (isnan(mu))\n"; ss << " mu = 0.0;\n"; ss << " }\n"; @@ -365,7 +365,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss, } ss << " arg = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fSumSqr += arg * arg;\n"; @@ -391,7 +391,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " mu = " ; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(mu))\n"; + ss << " if (isnan(mu))\n"; ss << " mu = 0.0;\n"; ss << " }\n"; } @@ -421,7 +421,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " sigma = " ; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(sigma))\n"; + ss << " if (isnan(sigma))\n"; ss << " sigma = 0.0;\n"; ss << " }\n"; } @@ -520,7 +520,7 @@ void OpTTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " mode = " ; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(mode))\n"; + ss << " if (isnan(mode))\n"; ss << " mode = 0.0;\n"; ss << " else\n"; ss << " mode = floor(mode);\n"; @@ -554,7 +554,7 @@ void OpTTest::GenSlidingWindowFunction(std::stringstream &ss, assert(pSVR); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[3]->GenSlidingWindowDeclRef() << "))\n"; ss << " type=0.0;\n"; ss << " else\n"; @@ -641,7 +641,7 @@ void OpTTest::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[0]->GenSlidingWindowDeclRef(true) << ";\n"; ss << " arg2 = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(true) << ";\n"; - ss << " if (isNan(arg1)||isNan(arg2))\n"; + ss << " if (isnan(arg1)||isnan(arg2))\n"; ss << " continue;\n"; ss << " fSum1 += arg1;\n"; ss << " fSum2 += arg2;\n"; @@ -709,7 +709,7 @@ void OpTTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg1 = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef(true) << ";\n"; - ss << " if (isNan(arg1))\n"; + ss << " if (isnan(arg1))\n"; ss << " continue;\n"; ss << " fSum1 += arg1;\n"; ss << " fSumSqr1 += arg1 * arg1;\n"; @@ -742,7 +742,7 @@ void OpTTest::GenSlidingWindowFunction(std::stringstream &ss, } ss << " arg2 = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef(true) << ";\n"; - ss << " if (isNan(arg2))\n"; + ss << " if (isnan(arg2))\n"; ss << " continue;\n"; ss << " fSum2 += arg2;\n"; ss << " fSumSqr2 += arg2 * arg2;\n"; @@ -851,7 +851,7 @@ void OpVarP::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -865,7 +865,7 @@ void OpVarP::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -931,7 +931,7 @@ void OpVarP::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -944,7 +944,7 @@ void OpVarP::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -1026,7 +1026,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " x = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(x))\n"; + ss << " if(isnan(x))\n"; ss << " x = 0.0;\n"; ss << " }\n"; } @@ -1058,7 +1058,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " fDF = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(fDF))\n"; + ss << " if(isnan(fDF))\n"; ss << " fDF = 0.0;\n"; ss << " else\n"; ss << " fDF = floor(fDF);\n"; @@ -1094,7 +1094,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " fFlag = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(fFlag))\n"; + ss << " if(isnan(fFlag))\n"; ss << " fFlag = 0.0;\n"; ss << " else\n"; ss << " fFlag = floor(fFlag);\n"; @@ -1161,7 +1161,7 @@ void OpExponDist::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -1250,7 +1250,7 @@ void OpFdist::GenSlidingWindowFunction(std::stringstream &ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -1311,7 +1311,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " x = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(x))\n"; + ss << " if (isnan(x))\n"; ss << " x = 0.0;\n"; ss << " }\n"; } @@ -1343,7 +1343,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " mu = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(mu))\n"; + ss << " if (isnan(mu))\n"; ss << " mu = 0.0;\n"; ss << " }\n"; } @@ -1375,7 +1375,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " sigma = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(sigma))\n"; + ss << " if (isnan(sigma))\n"; ss << " sigma = 0.0;\n"; ss << " }\n"; } @@ -1437,7 +1437,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " x = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(x))\n"; + ss << " if (isnan(x))\n"; ss << " x = 0.0;\n"; ss << " }\n"; } @@ -1469,7 +1469,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " alpha = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(alpha))\n"; + ss << " if (isnan(alpha))\n"; ss << " alpha = 0.0;\n"; ss << " }\n"; } @@ -1501,7 +1501,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " beta = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(beta))\n"; + ss << " if (isnan(beta))\n"; ss << " beta = 0.0;\n"; ss << " }\n"; } @@ -1533,7 +1533,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " kum = "; ss << vSubArguments[3]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(kum))\n"; + ss << " if (isnan(kum))\n"; ss << " kum = 0.0;\n"; ss << " }\n"; } @@ -1622,7 +1622,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -1636,7 +1636,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -1705,7 +1705,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -1718,7 +1718,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -1781,7 +1781,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " dx = (arg - fMean) * pow(fStdDev,-1.0);\n"; ss << " xcube = xcube + dx * dx * dx;\n"; @@ -1795,7 +1795,7 @@ void OpSkew::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " dx = (arg - fMean) * pow(fStdDev,-1.0);\n"; ss << " xcube = xcube + dx * dx * dx;\n"; @@ -1879,7 +1879,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -1893,7 +1893,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -1962,7 +1962,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -1975,7 +1975,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -2038,7 +2038,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " dx = (arg - fMean) * pow(fStdDev,-1.0);\n"; ss << " xcube = xcube + dx * dx * dx;\n"; @@ -2052,7 +2052,7 @@ void OpSkewp::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " dx = (arg - fMean) * pow(fStdDev,-1.0);\n"; ss << " xcube = xcube + dx * dx * dx;\n"; @@ -2140,7 +2140,7 @@ void OpTInv::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " x = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(x))\n"; + ss << " if(isnan(x))\n"; ss << " x = 0.0;\n"; ss << " }\n"; } @@ -2172,7 +2172,7 @@ void OpTInv::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " fDF = "; ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(fDF))\n"; + ss << " if(isnan(fDF))\n"; ss << " fDF = 0.0;\n"; ss << " else\n"; ss << " fDF = floor(fDF);\n"; @@ -2262,7 +2262,7 @@ void OpStDev::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -2276,7 +2276,7 @@ void OpStDev::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -2340,7 +2340,7 @@ void OpStDev::GenSlidingWindowFunction(std::stringstream &ss, } ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -2353,7 +2353,7 @@ void OpStDev::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -2436,7 +2436,7 @@ void OpStDevP::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -2450,7 +2450,7 @@ void OpStDevP::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -2516,7 +2516,7 @@ void OpStDevP::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -2529,7 +2529,7 @@ void OpStDevP::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -2649,7 +2649,7 @@ void OpSlope::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX) || isNan(argY))\n"; + ss << " if (isnan(argX) || isnan(argY))\n"; ss << " continue;\n"; ss << " fSumX += argX;\n"; ss << " fSumY += argY;\n"; @@ -2695,7 +2695,7 @@ void OpSlope::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX) || isNan(argY))\n"; + ss << " if (isnan(argX) || isnan(argY))\n"; ss << " continue;\n"; ss << " fSumDeltaXDeltaY += (argX-fMeanX)*(argY-fMeanY);\n"; ss << " fSumSqrDeltaX += (argX-fMeanX) * (argX-fMeanX);\n"; @@ -2803,7 +2803,7 @@ void OpSTEYX::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX) || isNan(argY))\n"; + ss << " if (isnan(argX) || isnan(argY))\n"; ss << " continue;\n"; ss << " fSumX += argX;\n"; ss << " fSumY += argY;\n"; @@ -2849,7 +2849,7 @@ void OpSTEYX::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX)||isNan(argY))\n"; + ss << " if (isnan(argX)||isnan(argY))\n"; ss << " continue;\n"; ss << " fSumDeltaXDeltaY +=(argX-fMeanX)*(argY-fMeanY);\n"; ss << " fSumSqrDeltaX += (argX-fMeanX)*(argX-fMeanX);\n"; @@ -2905,7 +2905,7 @@ vSubArguments) static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<pSVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -2914,7 +2914,7 @@ vSubArguments) { ss << " arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg0))\n"; + ss << " if(isnan(arg0))\n"; ss << " return DBL_MAX;\n"; } ss << " if (fabs(arg0) >= 1.0)\n"; @@ -2942,7 +2942,7 @@ void OpFisherInv::GenSlidingWindowFunction( ss <<"int gid0=get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss<< "if(isNan(arg0)||(gid0>="; + ss<< "if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n\t\t"; ss<<"arg0 = 0;\n\t"; @@ -3017,7 +3017,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t"; ss << "arg0 = 0.0;\n\t\t\t"; @@ -3034,7 +3034,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t"; ss << "arg0 = 0.0;\n\t\t\t"; @@ -3052,7 +3052,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t"; ss << "arg0 = 0.0;\n\t\t\t"; @@ -3069,7 +3069,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i + gid0 >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i + gid0 >= "; ss << pCurDVRX->GetArrayLength() << ") || (i + gid0 >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t"; ss << "arg0 = 0.0;\n\t\t\t"; @@ -3098,7 +3098,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t\t"; ss << "arg0 = vXMean;\n\t\t\t\t"; @@ -3114,7 +3114,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t\t"; ss << "arg0 = vXMean;\n\t\t\t\t"; @@ -3130,7 +3130,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i >= "; ss << pCurDVRX->GetArrayLength() << ") || (i >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t\t"; ss << "arg0 = vXMean;\n\t\t\t\t"; @@ -3146,7 +3146,7 @@ void OpCorrel::GenSlidingWindowFunction( ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; ss << "arg1 = " << vSubArguments[1] ->GenSlidingWindowDeclRef(true) << ";\n\t\t\t"; - ss << "if(isNan(arg0) || isNan(arg1) || (i + gid0 >= "; + ss << "if(isnan(arg0) || isnan(arg1) || (i + gid0 >= "; ss << pCurDVRX->GetArrayLength() << ") || (i + gid0 >="; ss << pCurDVRY->GetArrayLength() << ")) {\n\t\t\t\t"; ss << "arg0 = vXMean;\n\t\t\t\t"; @@ -3203,7 +3203,7 @@ void OpNegbinomdist::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -3286,7 +3286,7 @@ void OpPearson::GenSlidingWindowFunction( ss << ";\n"; ss << " fIny = "<<vSubArguments[1]->GenSlidingWindowDeclRef(true); ss << " ;\n"; - ss << " if(isNan(fInx)||isNan(fIny)){fInx=0.0;fIny=0.0;fCount = fCount-1;}\n"; + ss << " if(isnan(fInx)||isnan(fIny)){fInx=0.0;fIny=0.0;fCount = fCount-1;}\n"; ss << " fSumX += fInx;\n"; ss << " fSumY += fIny;\n"; ss << " fCount = fCount + 1;\n"; @@ -3313,7 +3313,7 @@ void OpPearson::GenSlidingWindowFunction( ss << " ;\n"; ss << " fIny = "<<vSubArguments[1]->GenSlidingWindowDeclRef(true); ss << " ;\n"; - ss << " if(isNan(fInx)||isNan(fIny)){fInx=0.0;fIny=0.0;}\n"; + ss << " if(isnan(fInx)||isnan(fIny)){fInx=0.0;fIny=0.0;}\n"; ss << " fSumDeltaXDeltaY += (fInx - fMeanX) * (fIny - fMeanY);\n"; ss << " fSumX += pow(fInx - fMeanX,2);\n"; ss << " fSumY += pow(fIny - fMeanY,2);\n"; @@ -3344,7 +3344,7 @@ formula::SingleVectorRefToken *>(tmpCur); ss <<"int gid0=get_global_id(0);\n\t"; ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n\t"; - ss<< "if(isNan(arg0)||(gid0>="; + ss<< "if(isnan(arg0)||(gid0>="; ss<<tmpCurDVR->GetArrayLength(); ss<<"))\n\t\t"; ss<<"arg0 = 0;\n\t"; @@ -3394,7 +3394,7 @@ vSubArguments) static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<pSVR->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -3403,7 +3403,7 @@ vSubArguments) { ss << " arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg0))\n"; + ss << " if(isnan(arg0))\n"; ss << " return DBL_MAX;\n"; } ss << " double tmp=gauss(arg0);\n"; @@ -3480,7 +3480,7 @@ void OpGeoMean::GenSlidingWindowFunction( ss << " tmp0 ="; rArg->GenDeclRef(ss); ss << "["<<p1.c_str()<<"];\n"; - ss << " if(!isNan(tmp0))\n"; + ss << " if(!isnan(tmp0))\n"; ss << " {\n"; ss << " tmp += log(tmp0);\n"; ss << " count++;\n"; @@ -3489,7 +3489,7 @@ void OpGeoMean::GenSlidingWindowFunction( ss << " tmp0 ="; rArg->GenDeclRef(ss); ss << "["<<p2.c_str()<<"];\n"; - ss << " if(!isNan(tmp0))\n"; + ss << " if(!isnan(tmp0))\n"; ss << " {\n"; ss << " tmp += log(tmp0);\n"; ss << " count++;\n"; @@ -3501,7 +3501,7 @@ void OpGeoMean::GenSlidingWindowFunction( ss << " tmp0 ="; rArg->GenDeclRef(ss); ss << "["<<p1.c_str()<<"];\n"; - ss << " if(!isNan(tmp0))\n"; + ss << " if(!isnan(tmp0))\n"; ss << " {\n"; ss << " tmp += log(tmp0);\n"; ss << " count++;\n"; @@ -3545,7 +3545,7 @@ void OpGeoMean::GenSlidingWindowFunction( ss <<";\n"; //ss <<"printf(\"\\n********************tmp0 is %f\",tmp0);\n"; } - ss << " if(!isNan(tmp0))\n"; + ss << " if(!isnan(tmp0))\n"; ss << " {\n"; ss << " current_sum += log(tmp0);\n"; ss << " current_count++;\n"; @@ -3613,7 +3613,7 @@ vSubArguments) ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -3630,7 +3630,7 @@ vSubArguments) ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss << " nVal += (1.0 * pow( tmp,-1));\n"; ss << " totallength +=1;\n"; @@ -3699,7 +3699,7 @@ void OpConfidence::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -3773,7 +3773,7 @@ void OpCritBinom::GenSlidingWindowFunction(std::stringstream& ss, } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -3876,14 +3876,14 @@ void OpRsq::GenSlidingWindowFunction( ss << " for(int i=0; i<"<<nCurWindowSize<<"; i++)\n"; ss << " {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(true); ss << "))\n"; ss << " fInx = 0;\n"; ss << " else\n"; ss << " fInx = "<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(true); ss << "))\n"; ss << " fIny = 0;\n"; @@ -3900,14 +3900,14 @@ void OpRsq::GenSlidingWindowFunction( ss << " fSumY = 0.0;\n"; ss << " for(int i=0; i<"<<nCurWindowSize<<"; i++)\n"; ss << " {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(true); ss << "))\n"; ss << " fInx = 0;\n"; ss << " else\n"; ss << " fInx = "<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " fIny = 0;\n"; @@ -4001,7 +4001,7 @@ void OpChiInv::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << "if (isNan("; + ss << "if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4062,7 +4062,7 @@ void OpNormdist::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4126,7 +4126,7 @@ void OpNormsdist::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4186,7 +4186,7 @@ void OpPermut::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4240,13 +4240,13 @@ void OpPermutationA::GenSlidingWindowFunction( ss << " int buffer_fInb_len = "; ss << tmpCurDVR1->GetArrayLength(); ss << ";\n"; - ss << " if((gid0)>=buffer_fIna_len || isNan("; + ss << " if((gid0)>=buffer_fIna_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " inA = 0;\nelse \n"; ss << " inA = "<<vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << "if((gid0)>=buffer_fInb_len || isNan("; + ss << "if((gid0)>=buffer_fInb_len || isnan("; ss << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << "inB = 0;\nelse \n"; @@ -4296,7 +4296,7 @@ void OpPhi::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4355,7 +4355,7 @@ void OpNorminv::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4567,7 +4567,7 @@ void OpNormsinv:: GenSlidingWindowFunction } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -4787,7 +4787,7 @@ void OpMedian::GenSlidingWindowFunction( ss << "int buffer_fIna_len = "; ss << tmpCurDVR0->GetArrayLength(); ss << ";\n"; - ss<<"if((i+gid0)>=buffer_fIna_len || isNan("; + ss<<"if((i+gid0)>=buffer_fIna_len || isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss<<"))\n"; ss<<" dataIna = 0;\n"; @@ -4843,7 +4843,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -4859,7 +4859,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss << " fSum += tmp;\n"; ss << " totallength +=1;\n"; @@ -4894,7 +4894,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -4908,7 +4908,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss << " vSum += (tmp-fMean)*(tmp-fMean);\n"; ss << " }\n"; @@ -4939,7 +4939,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -4954,7 +4954,7 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss<< " dx = (tmp -fMean) / fStdDev;\n"; ss<< " xpower4 = xpower4 + (dx * dx * dx * dx);\n"; @@ -5073,7 +5073,7 @@ void OpIntercept::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX) || isNan(argY))\n"; + ss << " if (isnan(argX) || isnan(argY))\n"; ss << " continue;\n"; ss << " fSumX += argX;\n"; ss << " fSumY += argY;\n"; @@ -5119,7 +5119,7 @@ void OpIntercept::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ";\n"; ss << " argY = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (isNan(argX) || isNan(argY))\n"; + ss << " if (isnan(argX) || isnan(argY))\n"; ss << " continue;\n"; ss << " fSumDeltaXDeltaY += (argX-fMeanX)*(argY-fMeanY);\n"; ss << " fSumSqrDeltaX += (argX-fMeanX) * (argX-fMeanX);\n"; @@ -5185,7 +5185,7 @@ void OpLogInv:: GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5199,7 +5199,7 @@ void OpLogInv:: GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5418,7 +5418,7 @@ void OpForecast::GenSlidingWindowFunction(std::stringstream &ss, ss << "return HUGE_VAL"; else { - ss<< " if(isNan(arg0)||(gid0>="; + ss<< " if(isnan(arg0)||(gid0>="; ss<<pCurDVR0->GetArrayLength(); ss<<"))\n"; ss<<" arg0 = 0;\n"; @@ -5437,14 +5437,14 @@ void OpForecast::GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg2 = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg1)||((gid0+i)>="; + ss << " if(isnan(arg1)||((gid0+i)>="; ss << pCurDVR1->GetArrayLength(); ss << "))\n"; ss << " {\n"; ss << " length--;\n"; ss << " continue;\n"; ss << " }\n"; - ss << " if(isNan(arg2)||((gid0+i)>="; + ss << " if(isnan(arg2)||((gid0+i)>="; ss << pCurDVR2->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -5464,13 +5464,13 @@ void OpForecast::GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg2 = "; ss << vSubArguments[2]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg1)||((gid0+i)>="; + ss << " if(isnan(arg1)||((gid0+i)>="; ss <<pCurDVR1->GetArrayLength(); ss <<"))\n"; ss <<" {\n"; ss <<" continue;\n"; ss <<" }\n"; - ss << " if(isNan(arg2)||((gid0+i)>="; + ss << " if(isnan(arg2)||((gid0+i)>="; ss <<pCurDVR2->GetArrayLength(); ss <<"))\n"; ss <<" {\n"; @@ -5541,7 +5541,7 @@ void OpLogNormDist::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5555,7 +5555,7 @@ void OpLogNormDist::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5566,19 +5566,19 @@ void OpLogNormDist::GenSlidingWindowFunction(std::stringstream &ss, } } ss << " double tmp;\n"; - ss << " if(isNan(arg0)||(gid0>="; + ss << " if(isnan(arg0)||(gid0>="; ss << tmpCurDVR0->GetArrayLength(); ss << "))\n"; ss << " arg0 = 0;\n"; - ss << " if(isNan(arg1)||(gid0>="; + ss << " if(isnan(arg1)||(gid0>="; ss << tmpCurDVR1->GetArrayLength(); ss << "))\n"; ss << " arg1 = 0;\n"; - ss << " if(isNan(arg2)||(gid0>="; + ss << " if(isnan(arg2)||(gid0>="; ss << tmpCurDVR2->GetArrayLength(); ss << "))\n"; ss << " arg2 = 0;\n"; - ss << " if(isNan(arg3)||(gid0>="; + ss << " if(isnan(arg3)||(gid0>="; ss << tmpCurDVR3->GetArrayLength(); ss << "))\n"; ss << " arg3 = 0;\n"; @@ -5656,7 +5656,7 @@ void OpGammaDist::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5670,7 +5670,7 @@ void OpGammaDist::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -5766,7 +5766,7 @@ void OpChiDist::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -5876,7 +5876,7 @@ void OpBinomdist::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -6013,7 +6013,7 @@ vSubArguments) if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -6100,7 +6100,7 @@ vSubArguments) if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -6187,7 +6187,7 @@ void OpGammaInv::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6201,7 +6201,7 @@ void OpGammaInv::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6379,7 +6379,7 @@ void OpFInv::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6393,7 +6393,7 @@ void OpFInv::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6562,7 +6562,7 @@ void OpFTest::GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(true); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -6663,7 +6663,7 @@ void OpB::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6676,7 +6676,7 @@ void OpB::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -6808,7 +6808,7 @@ void OpPoisson::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -6924,9 +6924,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = gid0; i < " << nCurWindowSizeX; ss << " && i < " << pCurDVRX->GetArrayLength() << " && i < "; ss << pCurDVRY->GetArrayLength() << "; i++){\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") ||"; - ss << " isNan("<< vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << " isnan("<< vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")) {\n"; ss << " arg0 = 0.0;\n"; ss << " arg1 = 0.0;\n"; @@ -6947,9 +6947,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = 0; i < gid0 + " << nCurWindowSizeX << " && "; ss << " i < " << pCurDVRX->GetArrayLength() << " && "; ss << " i < " << pCurDVRY->GetArrayLength() << "; i++) {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") ||"; - ss << " isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << " isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")) {\n"; ss << " arg0 = 0.0;\n"; ss << " arg1 = 0.0;\n"; @@ -6969,9 +6969,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = 0; i < " << nCurWindowSizeX << " && i < "; ss << pCurDVRX->GetArrayLength() << " && i < "; ss << pCurDVRY->GetArrayLength() << "; i++) {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") ||"; - ss << " isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << " isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")) {\n"; ss << " arg0 = 0.0;\n"; ss << " arg1 = 0.0;\n"; @@ -6992,9 +6992,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << " i + gid0 < " << pCurDVRX->GetArrayLength(); ss << " && i + gid0 < " << pCurDVRX->GetArrayLength(); ss << "; i++) {\n"; - ss << "if ((isNan("; + ss << "if ((isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ")) || "; - ss << "(isNan("<< vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << "(isnan("<< vSubArguments[1]->GenSlidingWindowDeclRef(); ss << "))) {\n"; ss << " arg0 = 0.0;\n"; ss << " arg1 = 0.0;\n"; @@ -7022,9 +7022,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = gid0; i < " << nCurWindowSizeX; ss << " && i < " << pCurDVRX->GetArrayLength() << " && i < "; ss << pCurDVRY->GetArrayLength() << "; i++){\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") ||"; - ss << " isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << " isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")){\n"; ss << " arg0 = vMean0;\n"; ss << " arg1 = vMean1;\n"; @@ -7041,9 +7041,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = 0; i < gid0 + " << nCurWindowSizeX << " && "; ss << " i < " << pCurDVRX->GetArrayLength() << " && "; ss << " i < " << pCurDVRY->GetArrayLength() << "; i++) {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") || "; - ss << "isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << "isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")) {\n"; ss << " arg0 = vMean0;\n"; ss << " arg1 = vMean1;\n"; @@ -7060,9 +7060,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << "int i = 0; i < " << nCurWindowSizeX << " && i < "; ss << pCurDVRX->GetArrayLength() << " && i < "; ss << pCurDVRY->GetArrayLength() << "; i++) {\n"; - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ") || "; - ss << "isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << "isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << ")) {\n"; ss << " arg0 = vMean0;\n"; ss << " arg1 = vMean1;\n"; @@ -7080,9 +7080,9 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << " i + gid0 < " << pCurDVRX->GetArrayLength(); ss << " && i + gid0 < " << pCurDVRX->GetArrayLength(); ss << "; i++) {\n"; - ss << "if((isNan("; + ss << "if((isnan("; ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ")) || "; - ss << "(isNan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss << "(isnan(" << vSubArguments[1]->GenSlidingWindowDeclRef(); ss << "))) {\n"; ss << " arg0 = vMean0;\n"; ss << " arg1 = vMean1;\n"; @@ -7109,7 +7109,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, if (pCur->GetType() == formula::svSingleVectorRef){ const formula::SingleVectorRefToken* pTVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ") || gid0 >= " << pTVR->GetArrayLength() << ")\n"; ss << " arg" << i << " = 0;\n else\n"; @@ -7119,7 +7119,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ss << " vSum" << i << " += arg" << i << ";\n"; } else if (pCur->GetType() == formula::svDouble){ - ss << " if(isNan ( "; + ss << " if(isnan ( "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << "))\n"; ss << " arg" << i << " = 0;\n else\n"; ss << " arg" << i << " = "; @@ -7141,7 +7141,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, if (pCur->GetType() == formula::svSingleVectorRef) { const formula::SingleVectorRefToken* pTVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ") || gid0 >= " << pTVR->GetArrayLength() << ")\n"; ss << " arg" << i << " = vMean" << i << ";\n"; @@ -7152,7 +7152,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, else if (pCur->GetType() == formula::svDouble) { ss << " arg" << i << " = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << i << "))\n"; + ss << " if(isnan(arg" << i << "))\n"; ss << " arg" << i << " = vMean" << i << ";\n"; } else { @@ -7212,7 +7212,7 @@ void OpBetaDist::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -7225,7 +7225,7 @@ void OpBetaDist::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -7353,7 +7353,7 @@ void OpBetainv::GenSlidingWindowFunction( } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"<<i<<"= 0;\n"; @@ -7417,7 +7417,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "gid0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << i << " = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << i << ") || (i >= "; + ss << " if(isnan(arg" << i << ") || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << i << " = 0.0;\n"; ss << " --cnt;\n"; @@ -7429,7 +7429,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < gid0 + " << nCurWindowSize << "; i++) {\n"; ss << " arg" << i << " = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << i << ") || (i >= "; + ss << " if(isnan(arg" << i << ") || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << i << " = 0.0;\n"; ss << " --cnt;\n"; @@ -7441,7 +7441,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << i << " = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << i << ") || (i >= "; + ss << " if(isnan(arg" << i << ") || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << i << " = 0.0;\n"; ss << " --cnt;\n"; @@ -7453,7 +7453,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << i << " = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << i << ") || (i + gid0 >= "; + ss << " if(isnan(arg" << i << ") || (i + gid0 >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << i << " = 0.0;\n"; ss << " --cnt;\n"; @@ -7467,7 +7467,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken* pTVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ") || gid0 >= " << pTVR->GetArrayLength() << ")\n"; ss << " arg" << i << " = 0;\n else\n"; @@ -7478,7 +7478,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if(isNan ( "; + ss << " if(isnan ( "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << "))\n"; ss << " arg" << i << " = 0;\n else\n"; ss << " arg" << i << " = "; @@ -7509,7 +7509,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "gid0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << k << " = "; ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan( arg" << k << " ) || (i >= "; + ss << " if(isnan( arg" << k << " ) || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << k << " = vXMean;\n"; ss << " }\n"; @@ -7519,7 +7519,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < gid0 + " << nCurWindowSize << "; i++) {\n"; ss << " arg" << k << " = "; ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan( arg" << k << ") || (i >= "; + ss << " if(isnan( arg" << k << ") || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << k << " = vMean;\n"; ss << " }\n"; @@ -7529,7 +7529,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << k << " = "; ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << k << ") || (i >= "; + ss << " if(isnan(arg" << k << ") || (i >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << k << " = vMean;\n"; ss << " }\n"; @@ -7539,7 +7539,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, ss << "0; i < " << nCurWindowSize << "; i++) {\n"; ss << " arg" << k << " = "; ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << k << ") || (i + gid0 >= "; + ss << " if(isnan(arg" << k << ") || (i + gid0 >= "; ss << pCurDVR->GetArrayLength() << ")) {\n"; ss << " arg" << k << " = vMean;\n"; ss << " }\n"; @@ -7551,7 +7551,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, { const formula::SingleVectorRefToken* pTVR = static_cast< const formula::SingleVectorRefToken* >(pCur); - ss << " if(isNan("; + ss << " if(isnan("; ss << vSubArguments[k]->GenSlidingWindowDeclRef(); ss << ") || gid0 >= " << pTVR->GetArrayLength() << ")\n"; ss << " arg" << k << " = vMean;\n else\n"; @@ -7563,7 +7563,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss, { ss << " arg" << k << " = "; ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if(isNan(arg" << k << "))\n"; + ss << " if(isnan(arg" << k << "))\n"; ss << " arg" << k << " = vMean;\n"; ss << " vSum += pow( arg" << k << " - vMean, 2 );\n"; } @@ -7622,7 +7622,7 @@ void OpHypGeomDist::GenSlidingWindowFunction(std::stringstream &ss, static_cast< const formula::SingleVectorRefToken* >(pCur); ss << " if (gid0 < " << pSVR->GetArrayLength() << ")\n"; ss << " {\n"; - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -7636,7 +7636,7 @@ void OpHypGeomDist::GenSlidingWindowFunction(std::stringstream &ss, } else if (pCur->GetType() == formula::svDouble) { - ss << " if (isNan("; + ss << " if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " arg"<<i<<"= 0;\n"; @@ -7780,7 +7780,7 @@ void OpMinA::GenSlidingWindowFunction( if(isMixed == svDoubleVectorRefDoubleString || isMixed == svSingleVectorRefDoubleString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp0 = tmp0 > "; @@ -7788,7 +7788,7 @@ void OpMinA::GenSlidingWindowFunction( ss << " ? "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << " : tmp0;\n"; - ss << " else if(isNan("; + ss << " else if(isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ") && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); @@ -7799,7 +7799,7 @@ void OpMinA::GenSlidingWindowFunction( else if(isMixed == svDoubleVectorRefDouble || isMixed == svSingleVectorRefDouble) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp0 = tmp0 > "; @@ -7930,12 +7930,12 @@ vSubArguments) if(isMixed == svDoubleVectorRefDoubleString || isMixed == svSingleVectorRefDoubleString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ")){\n"; ss << " nCount+=1.0;\n"; ss << " }\n"; - ss << " else if(isNan("; + ss << " else if(isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ") && "; ss<< vSubArguments[i]->GenStringSlidingWindowDeclRef(); @@ -7946,7 +7946,7 @@ vSubArguments) else if(isMixed == svDoubleVectorRefDouble || isMixed == svSingleVectorRefDouble) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ")){\n"; ss << " nCount+=1.0;\n"; @@ -7954,7 +7954,7 @@ vSubArguments) } else if(isMixed == svDoubleVectorRefString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " nCount+=1.0;\n"; @@ -8069,7 +8069,7 @@ vSubArguments) if(isMixed == svDoubleVectorRefDoubleString || isMixed == svSingleVectorRefDoubleString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp0 = tmp0 < "; @@ -8077,7 +8077,7 @@ vSubArguments) ss << " ? "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << " : tmp0;\n"; - ss << " else if(isNan("; + ss << " else if(isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ") && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); @@ -8088,7 +8088,7 @@ vSubArguments) else if(isMixed == svDoubleVectorRefDouble || isMixed == svSingleVectorRefDouble) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp0 = tmp0 < "; @@ -8219,7 +8219,7 @@ vSubArguments) if(isMixed == svDoubleVectorRefDoubleString || isMixed == svSingleVectorRefDoubleString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ")){\n"; ss << " tmp0 +="; @@ -8227,7 +8227,7 @@ vSubArguments) ss << ";\n"; ss << " nCount+=1.0;\n"; ss << " }\n"; - ss << " else if(isNan("; + ss << " else if(isnan("; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ") && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); @@ -8238,7 +8238,7 @@ vSubArguments) else if(isMixed == svDoubleVectorRefDouble || isMixed == svSingleVectorRefDouble) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ")){\n"; ss << " tmp0 +="; @@ -8249,7 +8249,7 @@ vSubArguments) } else if(isMixed == svDoubleVectorRefString) { - ss << " if (!isNan("; + ss << " if (!isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " nCount+=1.0;\n"; @@ -8362,11 +8362,11 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -8382,7 +8382,7 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; @@ -8426,12 +8426,12 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; ss << " }\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " fCount = fCount + 1.0;\n"; @@ -8443,7 +8443,7 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -8537,11 +8537,11 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " arg = 0.0;\n"; @@ -8554,7 +8554,7 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -8597,9 +8597,9 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -8614,7 +8614,7 @@ void OpVarA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; ss << " }\n"; @@ -8731,11 +8731,11 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -8751,7 +8751,7 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; @@ -8794,12 +8794,12 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; ss << " }\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " fCount = fCount + 1.0;\n"; @@ -8811,7 +8811,7 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -8905,11 +8905,11 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " arg = 0.0;\n"; @@ -8922,7 +8922,7 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -8965,9 +8965,9 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -8982,7 +8982,7 @@ void OpVarPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; ss << " }\n"; @@ -9098,11 +9098,11 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -9118,7 +9118,7 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; @@ -9161,12 +9161,12 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; ss << " }\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " fCount = fCount + 1.0;\n"; @@ -9178,7 +9178,7 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -9272,11 +9272,11 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " arg = 0.0;\n"; @@ -9289,7 +9289,7 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -9332,9 +9332,9 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -9349,7 +9349,7 @@ void OpStDevA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; ss << " }\n"; @@ -9466,11 +9466,11 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -9486,7 +9486,7 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; @@ -9529,12 +9529,12 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount = fCount + 1.0;\n"; ss << " }\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " fCount = fCount + 1.0;\n"; @@ -9546,7 +9546,7 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " fSum += arg;\n"; ss << " fCount += 1.0;\n"; @@ -9640,11 +9640,11 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " == 0)\n"; ss << " continue;\n"; - ss << " if(isNan(arg) && "; + ss << " if(isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " arg = 0.0;\n"; @@ -9657,7 +9657,7 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (isNan(arg))\n"; + ss << " if (isnan(arg))\n"; ss << " continue;\n"; ss << " vSum += (arg - fMean) * (arg - fMean);\n"; ss << " }\n"; @@ -9700,9 +9700,9 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg = "; ss << vSubArguments[i]->GenDoubleSlidingWindowDeclRef(); ss << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; - ss << " if (isNan(arg) && "; + ss << " if (isnan(arg) && "; ss << vSubArguments[i]->GenStringSlidingWindowDeclRef(); ss << " != 0)\n"; ss << " {\n"; @@ -9717,7 +9717,7 @@ void OpStDevPA::GenSlidingWindowFunction(std::stringstream &ss, ss << " {\n"; ss << " arg = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef() << ";\n"; - ss << " if (!isNan(arg))\n"; + ss << " if (!isnan(arg))\n"; ss << " {\n"; ss << " vSum += (arg - fMean)*(arg - fMean);\n"; ss << " }\n"; @@ -9796,7 +9796,7 @@ void OpAveDev:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -9812,7 +9812,7 @@ void OpAveDev:: GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss << " sum += tmp;\n"; ss << " totallength +=1;\n"; @@ -9844,7 +9844,7 @@ void OpAveDev:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double arg"<<i<<" = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(isNan(arg"<<i<<")||((gid0+i)>="; + ss << " if(isnan(arg"<<i<<")||((gid0+i)>="; ss << pDVR->GetArrayLength(); ss << "))\n"; ss << " {\n"; @@ -9858,7 +9858,7 @@ void OpAveDev:: GenSlidingWindowFunction(std::stringstream &ss, ss << " tmp = "; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - ss << " if(!isNan(tmp))\n"; + ss << " if(!isnan(tmp))\n"; ss << " {\n"; ss << " sum += fabs(tmp-mean);\n"; ss << " }\n"; diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx index 0c4c4d2f563b..c4e0de0572b8 100644 --- a/sc/source/core/opencl/opbase.cxx +++ b/sc/source/core/opencl/opbase.cxx @@ -229,7 +229,7 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream& ss, ss << " if(singleIndex>="; ss << pTmpDVR1->GetArrayLength(); ss << " ||"; - ss << "isNan("; + ss << "isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(true); ss << "))\n"; ss << " tmp"; @@ -249,7 +249,7 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream& ss, ss << " if(doubleIndex>="; ss << pTmpDVR2->GetArrayLength(); ss << " ||"; - ss << "isNan("; + ss << "isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"; @@ -265,7 +265,7 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream& ss, vSubArguments[i]->GetFormulaToken()->GetOpCode() != ocPush) { ss << " if("; - ss << "isNan("; + ss << "isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; ss << " tmp"; diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx index ec7661ae1e27..39a76da1aaa3 100644 --- a/sc/source/core/opencl/opbase.hxx +++ b/sc/source/core/opencl/opbase.hxx @@ -217,7 +217,7 @@ public: SubArguments& vSubArguments, int argumentNum ); static void CheckAllSubArgumentIsNan( std::stringstream& ss, SubArguments& vSubArguments ); - // only check isNan + // only check isnan static void CheckSubArgumentIsNan2( std::stringstream& ss, SubArguments& vSubArguments, int argumentNum, const std::string& p ); static void UnrollDoubleVector( std::stringstream& ss, |