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

Matthew Knepley knepley at gmail.com
Sat Feb 16 18:52:28 CST 2013


On Sat, Feb 16, 2013 at 7:34 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 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.
>

Still like that better than _r.

   Matt

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130216/09ab14c2/attachment.html>


More information about the petsc-dev mailing list