summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-19 18:48:14 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-19 18:55:37 +0200
commit44f941692521c21f5c152f3bab84b07f19f22353 (patch)
tree4925a8a85a3fb1f3e296d5e16ff5c5bd9cd47cd5
parentf8e17ff09f03240a71b1292b9bd8af9a17c10ca7 (diff)
Add opcodes for binary operators + - * /
These are of course very common, and one would hope they are correctly implemented in our OpenCL code. Change-Id: I0ca6d3983502b18a1ea56522d4f20673ad94357d
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs2
-rw-r--r--sc/source/core/tool/calcconfig.cxx6
2 files changed, 7 insertions, 1 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index abf01b0f4037..bfb5f882c30d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1373,7 +1373,7 @@
might be calculated using OpenCL.</desc>
<!-- numeric values correspond to RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUBPRODUCT;PROUDCT;NORMDIST;MIN;MAX;SUM;AVERAGE;SUMIFS -->
</info>
- <value>82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403</value>
+ <value>40;41;42;43;82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403</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 ff81e982a6f4..0ec1e17dcc0f 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -40,6 +40,12 @@ void ScCalcConfig::setOpenCLConfigToDefault()
mbOpenCLAutoSelect = true;
mnOpenCLMinimumFormulaGroupSize = 100;
+ // Keep in order of opcode value, is that clearest? (Random order,
+ // at least, would make no sense at all.)
+ maOpenCLSubsetOpCodes.insert(ocAdd);
+ maOpenCLSubsetOpCodes.insert(ocSub);
+ maOpenCLSubsetOpCodes.insert(ocMul);
+ maOpenCLSubsetOpCodes.insert(ocDiv);
maOpenCLSubsetOpCodes.insert(ocSin);
maOpenCLSubsetOpCodes.insert(ocCos);
maOpenCLSubsetOpCodes.insert(ocTan);