The old definition would have unused mnCount s.
The template has been modified to expand functionality.
Redefined operator for sum and sum square.
Memory usage change explanation:
The old code would use an array of IterateResultMultiple.
Then use them to iterate.
The count is stored in a last IterateResultMultiple.
So if we are inputed N operators we are:
Wasting N counters.
Wasting 1 accumulator.
Solution:
We move the array to the accumulator place (inside the structure).
Then we use only N accumulators.
The structure with the array has only 1 counter.
Change-Id: I76de74214d9bcb245f009e1226020bfe4dce40d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115542
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>