[petsc-dev] Mat sub class

Mark Adams mfadams at lbl.gov
Mon Sep 7 19:57:07 CDT 2020


On Mon, Sep 7, 2020 at 8:14 PM Barry Smith <bsmith at petsc.dev> wrote:

>
>  Why not just put the support in MatSeqAIJCUSPARSE ? No need for a new
> class.


Yea, that is what I'm thinking.

And one syntax problem I have is getting a pointer to a device
function (ie, matsetvalues). I don't know if it is possible. I am thinking
I need to just put it in cusparsematimpl.h.


>
>
>   Barry
>
>
> > On Sep 7, 2020, at 6:28 PM, Mark Adams <mfadams at lbl.gov> wrote:
> >
> > I am adding support for matrix assembly on the GPU. I made a new Mat
> class, that is a "child" of MatSeqAIJCUSPARSE, but I am thinking that is
> the wrong approach.
> >
> > I have added a Mat type struct object to MatSeqAIJCUSPARSE, that is on
> the GPU, and override some methods like MatAssemblyEnd and MatDestroy, and
> registered constructors for this new class.
> >
> > One thought is to add a MatCreateGPUMat_SeqAIJCUSPARES method that adds
> this object, and then checking for that object in places where it is
> relevant.
> >
> > And/Or, I see some business about a "subclass" in MatSetType. I'm not
> sure how that works, but maybe that is useful.
> >
> > Any thoughts would be appreciated,
> > Thanks,
> > Mark
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200907/a432c778/attachment.html>


More information about the petsc-dev mailing list