Kaydet (Commit) ec643628 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Avoid OpenCL compilation error in some cases

We do need to use GenSlidingWindowDeclRef(). We can't assume it is always a
vector element that is taking part in the calculation.

Change-Id: Ifcda5bdc4564d5d13755b10d9296802cee723182
üst abc57d34
...@@ -2169,8 +2169,8 @@ public: ...@@ -2169,8 +2169,8 @@ public:
if (argno == 1) if (argno == 1)
{ {
ss << ss <<
"if (isnan(" << vSubArguments[argno]->GetName() << "[gid0])) {\n" "if (isnan(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ")) {\n"
" if (GetDoubleErrorValue(" << vSubArguments[argno]->GetName() << "[gid0]) == errNoValue)\n" " if (GetDoubleErrorValue(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ") == errNoValue)\n"
" return CreateDoubleError(errDivisionByZero);\n" " return CreateDoubleError(errDivisionByZero);\n"
"}\n"; "}\n";
return true; return true;
...@@ -2178,9 +2178,9 @@ public: ...@@ -2178,9 +2178,9 @@ public:
else if (argno == 0) else if (argno == 0)
{ {
ss << ss <<
"if (isnan(" << vSubArguments[argno]->GetName() << "[gid0])) {\n" "if (isnan(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ")) {\n"
" if (GetDoubleErrorValue(" << vSubArguments[argno]->GetName() << "[gid0]) == errNoValue) {\n" " if (GetDoubleErrorValue(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ") == errNoValue) {\n"
" if (" << vSubArguments[1]->GetName() << "[gid0] == 0)\n" " if (" << vSubArguments[1]->GenSlidingWindowDeclRef() << " == 0)\n"
" return CreateDoubleError(errDivisionByZero);\n" " return CreateDoubleError(errDivisionByZero);\n"
" return 0;\n" " return 0;\n"
" }\n" " }\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment