<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 7, 2020 at 8:14 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Why not just put the support in MatSeqAIJCUSPARSE ? No need for a new class.</blockquote><div><br></div><div>Yea, that is what I'm thinking.</div><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
Barry<br>
<br>
<br>
> On Sep 7, 2020, at 6:28 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
> <br>
> 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. <br>
> <br>
> 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.<br>
> <br>
> 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.<br>
> <br>
> And/Or, I see some business about a "subclass" in MatSetType. I'm not sure how that works, but maybe that is useful.<br>
> <br>
> Any thoughts would be appreciated,<br>
> Thanks,<br>
> Mark<br>
<br>
</blockquote></div></div>