summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-10 21:55:14 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-10 21:57:10 +0200
commitec643628b8c2c627f9db52447d964519c30917b4 (patch)
tree82b04d4cc23c240737bb504eac2753be185a90cd /sc
parentabc57d344806b8d0bca113900702c155354124ac (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 6f42d2c42469..8305dd1c8c4d 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -2169,8 +2169,8 @@ public:
if (argno == 1)
{
ss <<
- "if (isnan(" << vSubArguments[argno]->GetName() << "[gid0])) {\n"
- " if (GetDoubleErrorValue(" << vSubArguments[argno]->GetName() << "[gid0]) == errNoValue)\n"
+ "if (isnan(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ")) {\n"
+ " if (GetDoubleErrorValue(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ") == errNoValue)\n"
" return CreateDoubleError(errDivisionByZero);\n"
"}\n";
return true;
@@ -2178,9 +2178,9 @@ public:
else if (argno == 0)
{
ss <<
- "if (isnan(" << vSubArguments[argno]->GetName() << "[gid0])) {\n"
- " if (GetDoubleErrorValue(" << vSubArguments[argno]->GetName() << "[gid0]) == errNoValue) {\n"
- " if (" << vSubArguments[1]->GetName() << "[gid0] == 0)\n"
+ "if (isnan(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ")) {\n"
+ " if (GetDoubleErrorValue(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ") == errNoValue) {\n"
+ " if (" << vSubArguments[1]->GenSlidingWindowDeclRef() << " == 0)\n"
" return CreateDoubleError(errDivisionByZero);\n"
" return 0;\n"
" }\n"