From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <366C747F.5D696495@nist.gov> Date: Mon, 07 Dec 1998 19:36:15 -0500 From: Adam C. Powell, IV Subject: Re: Optimizing CRS-Matrix routines In-Reply-To: <199812050219.LAA18332@mail.fa2.so-net.ne.jp> pshimizu@fa2.so-net.ne.jp wrote: > I can be software pipelined also. :-) > > In article <36683D70.5A8AEAF2@nist.gov> > adam.powell@nist.gov writes: > > >> An assembler version could be massively faster though... > > If the vector/matrices size is large, the routine will cause extensive > miss of the cache, and it will run only with the memory speed. In that > case assembler will not help much, I think. > (Of course this assumption strongly depends on how dense the matrices are.) It seems that with this routine (essentially gemv), the matrix elements should not be stored, since they're never re-used. So, I was thinking, the right and left side vectors could sit in cache (assuming their total size is smaller than ~10000 doubles), and the routine would be limited by either the processor or the memory speed- probably memory speed- to slurp through the matrix and indices. > Anyway, if we will write an assembler version, we should stay with > C/FORTRAN version for algorithm/strategy validation (as we did > in the gemm code) until there is no other way to speed up. > If we need, we can issue prefetch/preload instructions inline even within > the C code. Cool. So this means we can limit the cache profile of the matrix and indices, to keep the vectors in cache, right? Of course, if the vectors are too big to be cached, the optimal loading strategy will depend on the matrix structure. Ekh! Sounds like a horrible problem! Zeen, -Adam `Cold Fusion' Powell, IV http://www.ctcms.nist.gov/~powell/ ____ USDoC, National Institute of Standards & Technology (NIST) |\ ||< | Center for Theoretical and Computational Materials Science | \||_> |