evgeny
06-20-2006, 02:09 AM
Hi,
Following to my previously e-mail,
the same procedure as discribed in 1) for svdcmp() function may be realized in qrdcmp() function.
Let suppose that we are receiving an input matrix allocated as transposed matrix in memory, i.e. equations are formed columns instead of lines (FORTRAN style).
Than all NR-code may be rewritten as row-oriented operations instead of column-oriented operations
by simple replacement a[i][j] on a[j][i].
Than introduce a temporary pointer on row before each internal loop:
tmp = *(a+j);
than do loop on j:
*(tmp + j) = ...
This gives a significant speed up of the function up to LAPACK performance.
PS. Row-oriented operations are useful also in tred2() function, as it works with symmetric matrix in up-right matrix corner.
Evgeny
Following to my previously e-mail,
the same procedure as discribed in 1) for svdcmp() function may be realized in qrdcmp() function.
Let suppose that we are receiving an input matrix allocated as transposed matrix in memory, i.e. equations are formed columns instead of lines (FORTRAN style).
Than all NR-code may be rewritten as row-oriented operations instead of column-oriented operations
by simple replacement a[i][j] on a[j][i].
Than introduce a temporary pointer on row before each internal loop:
tmp = *(a+j);
than do loop on j:
*(tmp + j) = ...
This gives a significant speed up of the function up to LAPACK performance.
PS. Row-oriented operations are useful also in tred2() function, as it works with symmetric matrix in up-right matrix corner.
Evgeny