officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 +- sc/source/core/opencl/formulagroupcl.cxx | 1 + sc/source/core/opencl/op_spreadsheet.cxx | 2 +- sc/source/core/tool/calcconfig.cxx | 1 + 4 files changed, 4 insertions(+), 2 deletions(-)
New commits: commit 7bb7539c0e34283baeaacf7e4ff0b19287afadc2 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Aug 25 18:33:45 2015 +0300 Add VLOOKUP to the set of opcodes that we trust the OpenCL implementation for Change-Id: I937ec900044bbc6027ff8d4ae37f2f275dde974f diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index bb74d74..c3fa523 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1373,7 +1373,7 @@ true, and a formula contains only these operators and functions, it might be calculated using OpenCL.</desc> </info> - <value>+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;CORREL;COVAR;PEARSON;SLOPE;SUMIFS</value> + <value>+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;VLOOKUP;CORREL;COVAR;PEARSON;SLOPE;SUMIFS</value> </prop> <prop oor:name="OpenCLAutoSelect" oor:type="xs:boolean" oor:nillable="false"> <!-- UIHints: Tools - Options Spreadsheet Formula --> diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index cc52ad7..868ddd1 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -67,6 +67,7 @@ void ScCalcConfig::setOpenCLConfigToDefault() maOpenCLSubsetOpCodes.insert(ocCount); maOpenCLSubsetOpCodes.insert(ocVar); maOpenCLSubsetOpCodes.insert(ocNormDist); + maOpenCLSubsetOpCodes.insert(ocVLookup); maOpenCLSubsetOpCodes.insert(ocCorrel); maOpenCLSubsetOpCodes.insert(ocCovar); maOpenCLSubsetOpCodes.insert(ocPearson); commit 41a6094095a0cd42f24eb996c7ec8c28ab9d6c1a Author: Tor Lillqvist <t...@collabora.com> Date: Tue Aug 25 19:33:36 2015 +0300 Produce the expected N/A error code in the OpenCL VLOOKUP implementation Instead of a bare NaN. Change-Id: I170c540478315eedd23f5851d54c30175d21ef96 diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 53834d7..b4882d9 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -40,6 +40,7 @@ static const char* publicFunc = "#define errIllegalFPOperation 503 // #NUM!\n" "#define errNoValue 519 // #VALUE!\n" "#define errDivisionByZero 532 // #DIV/0!\n" + "#define NOTAVAILABLE 0x7fff // #N/A\n" "\n" "double CreateDoubleError(ulong nErr)\n" "{\n" diff --git a/sc/source/core/opencl/op_spreadsheet.cxx b/sc/source/core/opencl/op_spreadsheet.cxx index 6ade850..d6853c4 100644 --- a/sc/source/core/opencl/op_spreadsheet.cxx +++ b/sc/source/core/opencl/op_spreadsheet.cxx @@ -35,7 +35,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss, } ss << ")\n {\n"; ss << " int gid0=get_global_id(0);\n"; - ss << " double tmp = NAN;\n"; + ss << " double tmp = CreateDoubleError(NOTAVAILABLE);\n"; ss << " double intermediate = DBL_MAX;\n"; ss << " int singleIndex = gid0;\n"; ss << " int rowNum = -1;\n"; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits