summaryrefslogtreecommitdiff
path: root/sc/source/core/opencl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-11-16 17:46:43 +0100
committerLuboš Luňák <l.lunak@collabora.com>2018-12-04 16:06:31 +0100
commit6a2241e7db0c1db232b33dce619a203aadf21ec0 (patch)
treec5606a39fd98c52df63177312692b174621bd352 /sc/source/core/opencl
parentde5dd98320533888973432797254bfc5c9b52680 (diff)
opencl SERIESSUM does not handle plain double arguments
sc_subsequent_filters_test in ScFiltersTest::testFunctionsODS() also checks "SERIESSUM(2;3;2;3)", which the opencl code does not handle. At least bail out gracefully instead of returning 0. Change-Id: I154dca8cc437a6225b4eb98012232d80683f0114 Reviewed-on: https://gerrit.libreoffice.org/64242 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/opencl')
-rw-r--r--sc/source/core/opencl/op_math.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index 74c8dd4ceb87..a9216f72b3e7 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -3081,7 +3081,7 @@ void OpQuotient::GenSlidingWindowFunction(std::stringstream &ss,
void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss,
const std::string &sSymName, SubArguments &vSubArguments)
{
- if( vSubArguments.size() != 4){return;}
+ CHECK_PARAMETER_COUNT(4,4);
ss << "\ndouble " << sSymName;
ss << "_"<< BinFuncName() <<"(";
for (size_t i = 0; i < vSubArguments.size(); i++)
@@ -3185,6 +3185,8 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss,
ss << "))\n";
ss << " return 0;\n";
}
+ else
+ throw Unhandled(__FILE__, __LINE__);
}
ss << " return res;\n";
ss << "}";