[petsc-users] [petsc4py] vec.getCUSPArray for cusp vecs

Ashwin Srinath ashwinsrnth at gmail.com
Tue Jul 8 19:30:06 CDT 2014


The vec.getArray() functions returns a NumPy array. I think it'd be great
to see a vec.getGPUArray() that returns a PyCUDA GPUArray
<http://documen.tician.de/pycuda/array.html>. Thoughts?

Thanks!
Ashwin


On Tue, Jul 8, 2014 at 8:13 PM, Jed Brown <jed at jedbrown.org> wrote:

> r<#secure method=pgpmime mode=sign>
> Ashwin Srinath <ashwinsrnth at gmail.com> writes:
>
> > Hello, petsc-users,
> >
> > In PETSc, we have VecCUSPGetArray to access the underlying array from a
> Vec
> > of type 'cusp'. Does petsc4py offer something similar? If not, I'm
> > considering using petsc4py and pyCUDA together in some way, and I'd be
> > extremely grateful for any advice on doing that.
>
> It does not currently exist.  What type would you like to see returned?
> If we can find a sufficiently generic approach, it can be added.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140708/d7c623ee/attachment.html>


More information about the petsc-users mailing list