sc/source/core/opencl/op_statistical.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 1e3cf15e2d090671f0735faa83d8c57bea0a37d6
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Wed Aug 31 16:43:29 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Thu Sep 1 12:21:24 2022 +0200

    do not return "random" values from opencl FTEST if it can't handle something
    
    Change-Id: I539d184b015b79ce0511656ab5140bce8698397d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139075
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/opencl/op_statistical.cxx 
b/sc/source/core/opencl/op_statistical.cxx
index b325a68ca41c..1225306b69fb 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -6529,13 +6529,9 @@ void OpFTest::GenSlidingWindowFunction(outputstream &ss,
             ss << "    }\n";
         }
         else if (pCurSub->GetType() == formula::svSingleVectorRef)
-        {
-            ss << "return HUGE_VAL";
-        }
+            throw Unhandled(__FILE__, __LINE__);
         else if (pCurSub->GetType() == formula::svDouble)
-        {
-            ss << "return HUGE_VAL";
-        }
+            throw Unhandled(__FILE__, __LINE__);
     }
     ss << "    double fS1 = (fSumSqr1-fSum1*fSum1/length0)/(length0-1.0);\n"
         "    double fS2 = (fSumSqr2-fSum2*fSum2/length1)/(length1-1.0);\n"
commit e306e86ac70e6d47d779f0b63ea76b3a72645b5a
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Wed Aug 31 16:43:23 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Thu Sep 1 12:21:05 2022 +0200

    opencl LogNormDist cannot handle less than 4 arguments
    
    Change-Id: I0669aed4b0cac5fc2165becb9bc8861a688272c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139074
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/opencl/op_statistical.cxx 
b/sc/source/core/opencl/op_statistical.cxx
index d5dd0618e4ca..b325a68ca41c 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -5447,6 +5447,7 @@ void OpForecast::GenSlidingWindowFunction(outputstream 
&ss,
 void OpLogNormDist::GenSlidingWindowFunction(outputstream &ss,
             const std::string &sSymName, SubArguments &vSubArguments)
 {
+    CHECK_PARAMETER_COUNT(4,4);
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
     const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur0);

Reply via email to