summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-10 21:55:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-02-10 20:43:53 +0000
commit6490772ace0f8e30923952c8c01d6c9baa755085 (patch)
tree0a4401b0b4994d6efca26c746c7c7c368af7d0d4
parent51131616c3244234cfd23e18d871622574dd66c8 (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: Iec3be0477f52c995ec77c8c6aca57365c965ab09 Reviewed-on: https://gerrit.libreoffice.org/14407 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-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 a60f9eda8b7e..f4c4d68a2f03 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -2170,8 +2170,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;
@@ -2179,9 +2179,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"