[petsc-dev] Naming for functions that are safe to call from threads

Jed Brown jedbrown at mcs.anl.gov
Sat Feb 16 18:34:59 CST 2013


We've currently been naming functions with FunctionName_kernel, but these
have been very private so far. Some new work will make some of these
sharable (e.g., between matrix classes).

I've already found cases where _kernel functions call non-kernel functions,
which is definitely broken, so I'd like to adopt a consistent naming that
we can use everywhere, and even selectively open up to users (e.g., a
threaded MatSetValues).

The C standard library uses funcname_r for reentrant. What convention
should PETSc use. Note that spelling out "_kernel" uses up a lot of
characters if we use it with extern linkage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130216/b948c666/attachment.html>


More information about the petsc-dev mailing list