GPU Calc:Add more judge for NAN in SingleVector parameter
Change-Id: I01f2576e9d8f6a2e677d1fb08097bc81f15bfbe0
This commit is contained in:
@@ -64,10 +64,10 @@ std::string VectorRef::GenSlidingWindowDeclRef(bool nested) const
|
||||
std::stringstream ss;
|
||||
formula::SingleVectorRefToken *pSVR =
|
||||
dynamic_cast<formula::SingleVectorRefToken*>(DynamicKernelArgument::GetFormulaToken());
|
||||
if (pSVR&&nested)
|
||||
if (pSVR&&!nested)
|
||||
ss << "(gid0 < " << pSVR->GetArrayLength() << "?";
|
||||
ss << mSymName << "[gid0]";
|
||||
if (pSVR&&nested)
|
||||
if (pSVR&&!nested)
|
||||
ss << ":NAN)";
|
||||
return ss.str();
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream & ss,
|
||||
ss<< " if(";
|
||||
}
|
||||
ss<< "isNan(";
|
||||
ss<< vSubArguments[i]->GenSlidingWindowDeclRef(false);
|
||||
ss<< vSubArguments[i]->GenSlidingWindowDeclRef(true);
|
||||
ss<<"))\n";
|
||||
ss<< " tmp";
|
||||
ss<< i;
|
||||
@@ -164,7 +164,7 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream & ss,
|
||||
ss <<" tmp";
|
||||
ss <<i;
|
||||
ss << "=";
|
||||
ss << vSubArguments[i]->GenSlidingWindowDeclRef(false);
|
||||
ss << vSubArguments[i]->GenSlidingWindowDeclRef(true);
|
||||
ss<<";\n";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user