Kaydet (Commit) 6a2241e7 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>
üst de5dd983
......@@ -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 << "}";
......
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