<div class="gmail_quote">On Thu, Mar 8, 2012 at 12:54, Paul Mullowney <span dir="ltr"><<a href="mailto:paulm@txcorp.com">paulm@txcorp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">I put it in there because it was really, really easy to use the CUSP
CSR data structure in the CUSPARSE TriSolve. CUSP does not have a
TriSolve. However, CUSPARSE also supports a TriSolve based on the
ELLPACK (and Hybrid format). This is an opaque data structure again,
so it may be wise to pull CUSPARSE stuff out of <a href="http://aijcusp.cu" target="_blank">aijcusp.cu</a> and into
an <a href="http://aijcusparse.cu" target="_blank">aijcusparse.cu</a>? Does this seem sensible?<br>
<br>
Then, I suppose one can have<br>
-mat_type cusparse<br>
and thus remove -use_cusparse.<br></div></blockquote><div><br></div><div>-use_cusparse should not exist. There should also never be PetscOptions calls that don't use a prefix. In all but extreme circumstances, PetscOptionsGetXX() should not be used in library code, all options should have help strings and be processed in the XSetFromOptions_IMPL() routine.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff" text="#000000">
As for SpMV, the calls to CUSPARSE API are contained within my
txpetscgpu package and is fairly removed from PETSc. In fact, all
you see in PETSc is <br>
ierr = cuspstruct->mat->multiply(xarray, yarray);<br></div></blockquote><div><br></div><div>There are basically two choices.</div><div><br></div><div>1. txpetscgpu hides all type conversions and dispatch choices internally. Then there could be one PETSc interface file.</div>
<div><br></div><div>2. There are two (or more) PETSc Mat implementations. Some may make calls into txpetscgpu.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">
This multiply function will invoke CUSPARSE functions if
-use_cusparse is given at the command line. This can be removed if
we allow for -mat_type cusparse?</div></blockquote></div><br>