[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 3 14:33:40 UTC 2018


 sc/source/core/opencl/formulagroupcl.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit a0b059a37e775a466c6fb0043335aae4d3e93fbf
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Nov 28 16:33:02 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Dec 3 15:33:18 2018 +0100

    make OpenCL SUM() treat empty cells properly
    
    The data vector may not have all values (if last cells are empty).
    In that case GetRefRowSize() is larger than GetArrayLength().
    Other cases in this function had a similar check, this one was
    missing it for some reason (with the 'gid0' removed, since it's
    a fixed position).
    
    Change-Id: I01692b51d6ed22ee6db419508cacf556fb9e644d
    Reviewed-on: https://gerrit.libreoffice.org/64237
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 4db3fb4ebe11..2501dd8d3916 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1073,9 +1073,12 @@ public:
                         ss << "i = outLoop*" << outLoopSize << "+" << count << ";\n\t";
                         if (count == 0)
                         {
+                            temp1 << "if(i < " << mpDVR->GetArrayLength();
+                            temp1 << "){\n\t\t";
                             temp1 << "tmp = legalize(";
                             temp1 << mpCodeGen->Gen2(GenSlidingWindowDeclRef(), "tmp");
                             temp1 << ", tmp);\n\t\t\t";
+                            temp1 << "}\n\t";
                         }
                         ss << temp1.str();
                     }
@@ -1087,9 +1090,12 @@ public:
                     ss << "i = " << count << ";\n\t";
                     if (count == nCurWindowSize / outLoopSize * outLoopSize)
                     {
+                        temp2 << "if(i < " << mpDVR->GetArrayLength();
+                        temp2 << "){\n\t\t";
                         temp2 << "tmp = legalize(";
                         temp2 << mpCodeGen->Gen2(GenSlidingWindowDeclRef(), "tmp");
                         temp2 << ", tmp);\n\t\t\t";
+                        temp2 << "}\n\t";
                     }
                     ss << temp2.str();
                 }


More information about the Libreoffice-commits mailing list