[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Tue Feb 10 11:57:52 PST 2015
sc/source/core/opencl/formulagroupcl.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit ec643628b8c2c627f9db52447d964519c30917b4
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 10 21:55:14 2015 +0200
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
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 6f42d2c..8305dd1 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"
More information about the Libreoffice-commits
mailing list