From: Thomas Bruns <Thomas.Bruns@ptb.de>
Subject: Optimizing CRS-Matrix routines
Date: Fri, 4 Dec 1998 12:42:42 +1 [thread overview]
Message-ID: <3667cc2e2696002@u8455.bs.ptb.de> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
Hi,
recently I modified the code of a FEM-Application due to the
information on loop otimization from Mr. Goto, and it was a real
improvement.
But those optimization base on fixed loop-boundaries.
How can I optimize code as it is used in sparse matrix applications
where the index of the non-zero-elements is a an array of it`s own
like:
---------------------------
double vector[MatrixDimension];
double vector[MatrixDimension];
double matrix[NumberOfNonZeroElements]; /* only nze of matrix */
int matrix_idx[NumberOfNonZeroElements]; /* col_idxt */
int matrix_ptr[MatrixDimension+1]; /* start of row */
for (row=0; row<MaxRow; row++)
for(ptr=matrix_ptr[row]; ptr<matrixptr[row+1]; ptr++)
vector[matrix_idx[ptr]] += matrix[ptr]*vector[matrix_idx[ptr]]
---------------------------
You can't do manual loop-unrolling here, can you ?!?!
Any Information welcome !
Thanks,
Thomas
------------------------------------------------------
Dipl. Phys. Thomas Bruns phone : 0531/592-1217
Physikalisch Technische Bundesanstalt Fax : -1205
Bundesalle 100 e-mail: Thomas.Bruns@ptb.de
Postfach 3345
38023 Braunscweig
next reply other threads:[~1998-12-04 11:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-04 11:42 Thomas Bruns [this message]
1998-12-04 19:52 ` Optimizing CRS-Matrix routines Adam
1998-12-05 2:06 ` pshimizu
1998-12-08 0:36 ` Adam
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox