summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-11-27 16:21:43 +0100
committerLuboš Luňák <l.lunak@collabora.com>2018-12-04 16:08:14 +0100
commit9a446225f4d395b584887eb42851e40cf2ab1fc7 (patch)
treea584c21e1d321bacdb65140ebf2e789408bbb2b5 /sc
parentc0c03aadb3ec25ca5c4c07f270164158b6667cc2 (diff)
fixes for OpenCL COVAR()
Change-Id: Ie171eea334de65b993554146c11adb95e0dbb85e Reviewed-on: https://gerrit.libreoffice.org/64245 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/op_statistical.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index d18b3ffceec1..fd4508727d87 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -6843,6 +6843,7 @@ void OpPoisson::GenSlidingWindowFunction(
void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
const std::string &sSymName, SubArguments& vSubArguments)
{
+ CHECK_PARAMETER_COUNT(2,2);
ss << "\ndouble " << sSymName;
ss << "_"<< BinFuncName() <<"(";
for (size_t i = 0; i < vSubArguments.size(); i++)
@@ -6944,7 +6945,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
else {
ss << "int i = 0; i < " << nCurWindowSizeX << " && ";
ss << " i + gid0 < " << pCurDVRX->GetArrayLength();
- ss << " && i + gid0 < " << pCurDVRX->GetArrayLength();
+ ss << " && i + gid0 < " << pCurDVRY->GetArrayLength();
ss << "; i++) {\n";
ss << "if ((isnan(";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ")) || ";
@@ -7054,6 +7055,10 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
ss << " }\n";
ss << "}";
}
+ else
+ {
+ throw Unhandled(__FILE__, __LINE__);
+ }
}
else {
ss << " int cnt0 = 0,cnt1 = 0;\n";