[petsc-dev] Mat sub class
Barry Smith
bsmith at petsc.dev
Mon Sep 7 19:14:52 CDT 2020
Why not just put the support in MatSeqAIJCUSPARSE ? No need for a new class.
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
More information about the petsc-dev
mailing list