<br><br><div class="gmail_quote">On Tue, Nov 1, 2011 at 12:40 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@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 class="im"><div class="gmail_quote">On Tue, Nov 1, 2011 at 11:28, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">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><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>
<div><br></div></blockquote><div>I think I like the latter option better.</div><div><br></div><div>Dmitry. </div></div><br>