[petsc-dev] Mat sub class

Mark Adams mfadams at lbl.gov
Mon Sep 7 18:28:21 CDT 2020


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/5d970409/attachment.html>


More information about the petsc-dev mailing list