[petsc-dev] Reminder: *every* symbol with extern linkage *must* be namespaced

Jed Brown jedbrown at mcs.anl.gov
Sat Mar 17 15:41:29 CDT 2012


On Sat, Mar 17, 2012 at 15:32, Mark F. Adams <mark.adams at columbia.edu>wrote:

> done, but it won't show up until I check in my current repo, which could
> be a week.
>

Thanks, I suspect this will have the side-effect of making it easier for
the rest of us to navigate your code. I rely on tab-completion of gtags for
a lot of things, but even just having the functions names sort nicely helps.


>
>
> I don't understand why you have this gamg_setup_events. These event names
> are anything but intuitive in the sense that they don't stand alone and is
> denormalized (which makes it non-grepable). I also don't think it makes
> sense for GAMG to have its own classid since it's not a new PetscObject. I
> suggest registering with
>
>
> I bracket code that make sense for analysis, and not necessarily at
> function boundaries.  This is not standard so I will hide them with a
> private #define.
>

It is hard for me to believe that these names are more meaningful to you
than PC_GAMGCreateProl and similar. ;-)

enum tag
{SET1,SET2,GRAPH,GRAPH_MAT,GRAPH_FILTER,GRAPH_SQR,SET4,SET5,SET6,FIND_V,SET7,SET8,SET9,SET10,SET11,SET12,SET13,SET14,SET15,SET16,NUM_SET};

Making the events truly match your function names is low priority in my
opinion, but it would be nice eventually because it helps people navigate
between a log_summary and the corresponding code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120317/408c5d6c/attachment.html>


More information about the petsc-dev mailing list