alphalinux.org high-perf list (1998-2001)
 help / color / mirror / Atom feed
* Optimizing CRS-Matrix routines
@ 1998-12-04 11:42 Thomas Bruns
  1998-12-04 19:52 ` Adam
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Bruns @ 1998-12-04 11:42 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-12-08  0:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-04 11:42 Optimizing CRS-Matrix routines Thomas Bruns
1998-12-04 19:52 ` Adam
1998-12-05  2:06   ` pshimizu
1998-12-08  0:36     ` Adam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox