[petsc-users] Extracting CSR format from matrices for CUDA

Dave May dave.mayhem23 at gmail.com
Fri Feb 12 12:21:34 CST 2016


On 12 February 2016 at 19:16, Bhalla, Amneet Pal S <amneetb at live.unc.edu>
wrote:

> Hi Folks,
>
> I want to extract the CSR format from PETSc matrices and ship it to CUDA.
> Is there an easy way of doing this?
>

Yep, see these web pages

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetRowIJ.html

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetColumnIJ.html

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqAIJGetArray.html



> If so is there an example/source code showing this extraction?
>

Not that I know of.
But there isn't much to it, the description on these webpages should be
sufficient.

Thanks,
  Dave



>
> Thanks,
>
> — Amneet
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160212/5d84aaee/attachment.html>


More information about the petsc-users mailing list