diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2019-05-29 10:28:22 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2019-10-01 18:10:09 +0200 |
commit | 845e1cdca3349c72e3083186502285d5b776abbe (patch) | |
tree | a4496df89f4b7f21a1ab98c3e672b9d75d1a52e2 /sc/inc/table.hxx | |
parent | 1028841feb815dfcfee97422f3de1e06e48db580 (diff) |
Thread a group of formula-groups together if possible
Just before about to thread a FG, look to left and right for
"mutually" independent FG's with some restrictions and thread
this group of FG's together treating it as a single but longer
computation load.
For now the restrictions are :-
All formula-groups in a FG "group" must have :-
1. Same length
2. Same relative position.
3. Same weight.
This is very helpful in cases similar to the below :
There are lots of (say 32) consecutive formula-groups
all with same "small" length (say 8) and same weight.
By conventional formula-group-threading the speed-up is
limited to 8x even if we have a 256 core processor, but
with this threading-multiple-formula-groups patch
(in this case) we can get a speed-up of 256x provided
we have a >= 256 core machine. So effectively with this
patch the speed-up is now only limited to the number of
cells in a range consisting of mutually indepdendent
formula-groups rather than number of cells in each
formula-group.
Change-Id: Ib25b5abbb583fa207e8befff9a908d14313f3d51
Reviewed-on: https://gerrit.libreoffice.org/79485
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index b3ea9016725e..78bfa854e33d 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1012,8 +1012,9 @@ public: void SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults, size_t nLen ); - void CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nCol, SCROW nRow, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal); - void HandleStuffAfterParallelCalculation( SCCOL nCol, SCROW nRow, size_t nLen); + void CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nColStart, SCCOL nColEnd, + SCROW nRowStart, SCROW nRowEnd, unsigned nThisThread, unsigned nThreadsTotal); + void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen); /** * Either start all formula cells as listeners unconditionally, or start |