freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freepooma-devel] Sparse matrix


From: Richard Guenther
Subject: Re: [Freepooma-devel] Sparse matrix
Date: Thu, 17 Aug 2006 10:26:37 +0200 (CEST)

On Thu, 17 Aug 2006, Carolina Simões Gomes wrote:


But is there a way to do this multiplication using metaprogramming? I´ve been trying to do it, however, I always end up having to use some execution-time based parameter and of course then the template stuff does not work. To represent the matrix rows, I use a STL vector, which is dynamic so I can discard all zero-values and have a matrix with variable row size.

Well sure it is possible to do sparse matrix multiplication using
metaprogramming.  The only drawback is that if you want "full"
optimization you cannot have runtime parameters and so you have to
specify matrix population explicitly as well as matrix size.  For
small matrices a trick is to use a bit-mask as template parameter
that specifies population, for large matrices you are lost with
complete metaprogramming anyway because of usual compiler constraints.

So, while it is possible, it is not practical to do (sparse) matrix
multiplication using metaprogramming for matrices that are bigger
than very small (like max. 4x4 or slightly larger).

You may also want to look at http://osl.iu.edu/research/mtl/

Richard.


Thanks in advance,
Carol.


From: Richard Guenther <address@hidden>
To: Carolina Simões Gomes <address@hidden>
CC: address@hidden
Subject: Re: [Freepooma-devel] Sparse matrix
Date: Thu, 17 Aug 2006 10:06:35 +0200 (CEST)

On Thu, 17 Aug 2006, Carolina Simões Gomes wrote:



Hi there!
I´m new to the list.
I´d like to know how can I do a processor-time economic multiplication between a sparse matrix and a full vector using POOMA?

No, POOMA does not have a sparse matrix facility.  Also the tensor
and matrix classes in the Tiny package are only for small matrices
(otherwise your compiler will have lots of fun ;)).

I suggest you check out the PETSc library, to which you can also
interface from POOMA.

http://www-unix.mcs.anl.gov/petsc/petsc-as/

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

_________________________________________________________________
Acompanhe os desfiles do evento São Paulo Fashion Week. http://www.msn.com.br/diversao/spfw/



_______________________________________________
Freepooma-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freepooma-devel


--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]