<div class="gmail_quote">On Tue, Nov 1, 2011 at 11:28, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Or I can stick with a variadic function and pass in the number of arguments:</div><div>PetscMethodRegister(void (*f)(void), PetscInt nArgs, const char* arg1Type, ...), etc. </div></blockquote></div><br><div>That's fine, but there should probably be a context with which it's registered.</div>
<div><br></div><div>PetscMethodRegister(PetscMultiFList MatMFList,void(*f)(void),const char *opname,PetscInt nargs,const char *arg1type,...);</div><div><br></div><div><br></div><div>In some ways, it would be nice to have a separate PetscMultiFList for each opname. An alternative is to have one per type and dynamically create the entry for each opname.</div>