diff options
author | Eike Rathke <erack@redhat.com> | 2017-10-23 15:12:22 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-10-23 16:17:18 +0200 |
commit | 443113383296ca4781fb44e58e018a337db8e73c (patch) | |
tree | 5c4ac9cf5a9f3e1c067817775bc61eb1551e67fd /sc/inc | |
parent | 4fc4b3360de37d48cebaa7b7498ce544aeadc2d8 (diff) |
Move GetElementsMax() to .cxx
Nothing else is using it so we don't need it in .hxx
Change-Id: I0df879a7be2c56a70c30f50f44a92bb527b5a9ed
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/scmatrix.hxx | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index c80ce3333ab0..4acd2c937f91 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -152,23 +152,6 @@ public: mfFirst(r.mfFirst), mfRest(r.mfRest), mnCount(r.mnCount) {} }; - /// The maximum number of elements a matrix may have at runtime. - static size_t GetElementsMax() - { - // Arbitrarily assuming 12 bytes per element, 8 bytes double plus - // overhead. Stored as an array in an mdds container it's less, but for - // strings or mixed matrix it can be much more.. - constexpr size_t nPerElem = 12; - // Arbitrarily assuming 1GB memory. Could be dynamic at some point. - constexpr size_t nMemMax = 0x40000000; - // With 1GB that's ~85M elements, or 85 whole columns. - constexpr size_t nElemMax = nMemMax / nPerElem; - // With MAXROWCOUNT==1048576 and 128 columns => 128M elements, 1.5GB - constexpr size_t nArbitraryLimit = (size_t)MAXROWCOUNT * 128; - // With the constant 1GB from above that's the actual value. - return nElemMax < nArbitraryLimit ? nElemMax : nArbitraryLimit; - } - /** Checks nC or nR for zero and uses GetElementsMax() whether a matrix of the size of nC*nR could be allocated. A zero size (both nC and nR zero) matrix is allowed for later resize. |