Kaydet (Commit) 1b0dc235 authored tarafından Luboš Luňák's avatar Luboš Luňák

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: 's avatarLuboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 6a2241e7)
Reviewed-on: https://gerrit.libreoffice.org/64532
üst 7a8d6a23
...@@ -3080,7 +3080,7 @@ void OpQuotient::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -3080,7 +3080,7 @@ void OpQuotient::GenSlidingWindowFunction(std::stringstream &ss,
void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss,
const std::string &sSymName, SubArguments &vSubArguments) const std::string &sSymName, SubArguments &vSubArguments)
{ {
if( vSubArguments.size() != 4){return;} CHECK_PARAMETER_COUNT(4,4);
ss << "\ndouble " << sSymName; ss << "\ndouble " << sSymName;
ss << "_"<< BinFuncName() <<"("; ss << "_"<< BinFuncName() <<"(";
for (size_t i = 0; i < vSubArguments.size(); i++) for (size_t i = 0; i < vSubArguments.size(); i++)
...@@ -3184,6 +3184,8 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -3184,6 +3184,8 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss,
ss << "))\n"; ss << "))\n";
ss << " return 0;\n"; ss << " return 0;\n";
} }
else
throw Unhandled(__FILE__, __LINE__);
} }
ss << " return res;\n"; ss << " return res;\n";
ss << "}"; ss << "}";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment