On Tue, 28 Sep 2010 15:55:26 -0700, Adam N <interf...@gmail.com> wrote:
> Hello,
> 
> So I've looked at the sparse stuff from Git, and the SparseSolve.py
> examples, and I can see how to build a sparse matrix and a dense
> vector, and how to use the CG stuff, solving A * x = b for x. What I
> can't seem to figure out is how to do a basic
> sparse-matrix-by-dense-vector multiply, and solve A * x = b for b. I'm
> assuming the CG method requires this at some point, and I just can't
> see where it happens? Is get_elwise_kernel doing some sort of magic in
> order to return a kernel that works on sparse matrices and dense
> vectors?

Assuming you're able to make a PacketedSpMV instance as in the example,
the only thing you need to know is that you need to follow this procedure:

xp = spmv.permute(x)
yp = spmv(xp)
y = spmv.unpermute(yp)

I.e., I assume the permutation is what caused you grief.

HTH,
Andeas

Attachment: pgpDodsnAxFgY.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to