[petsc-dev] Preprocessor hell: #define VecType

Jed Brown jedbrown at mcs.anl.gov
Wed Oct 3 10:37:01 CDT 2012


On Wed, Oct 3, 2012 at 10:33 AM, Karl Rupp <rupp at mcs.anl.gov> wrote:

> Onward to a CPP free PETSc :-)
>>
>
> Just to double-check: Are you referring to the C preprocessor or C++? I
> know that your are not a close friend with both...


CPP = C preprocessor.

There is no mandatory C++ in PETSc core, though external package interfaces
(e.g. Elemental) may require it.

I personally would not object to very localized use of templates in the
implementation, most notably in the BAIJ kernels. The only alternative to
deal with the rampant code duplication is fairly hairy use of the
preprocessor. This code works, however, and streamlining it hasn't been a
high priority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121003/84f78664/attachment.html>


More information about the petsc-dev mailing list