[petsc-dev] multiple dispatch code currently in PETSc
Jed Brown
jedbrown at mcs.anl.gov
Tue Jan 15 15:20:37 CST 2013
On Tue, Jan 15, 2013 at 3:14 PM, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
> There is, by the way, the 'type' field in the header, which the docs say
> should no longer be used, and which is typically set to 0 or -1 in calls to
> PetscHeaderCreate. So, barring some subtle backward-compatibility issue
> this can be reused to hold the typeid, which is computed or looked up on
> each PetscObjectChangeTypeName()?
The usual way to do this would be to make the classid field be either a
pointer or an index into a global petsc_classes data structure. I recently
set up that infrastructure for Fortran pointers, but that class object
could be used for multiple dispatch as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130115/e551523f/attachment.html>
More information about the petsc-dev
mailing list