Matrix: Replace the row-start pointer array with computed offsets

The row-start pointer array provided performance benefits on old
computers but now that computation is often cache-miss limited the
benefit of avoiding a integer multiply is more than offset by the
addition memory access into a separately allocated array.

With the new addressing scheme LUsolve is 15% faster.
This commit is contained in:
Henry Weller
2016-03-20 15:00:36 +00:00
parent 1d456a6698
commit 0ea0848047
7 changed files with 120 additions and 88 deletions

View File

@ -56,8 +56,6 @@ void Foam::solve
if (i != iMax)
{
//Info<< "Pivoted on " << i << " " << iMax << endl;
for (label k=i; k<m; k++)
{
Swap(tmpMatrix[i][k], tmpMatrix[iMax][k]);