[petsc-dev] style guide

Kokron, Daniel S. (ARC-606.2)[CSRA, LLC] daniel.s.kokron at nasa.gov
Tue Feb 20 11:51:07 CST 2018


I created a pull request without converting the raw includes to defines or PETSC_STATIC_INLINE.  Let me know what you think.

Daniel Kokron
SciCon group
From: Smith, Barry F. [bsmith at mcs.anl.gov]
Sent: Tuesday, February 20, 2018 10:25
To: Kokron, Daniel S. (ARC-606.2)[CSRA, LLC]
Cc: petsc-dev at mcs.anl.gov
Subject: Re: [petsc-dev] style guide

> On Feb 20, 2018, at 10:21 AM, Kokron, Daniel S. (ARC-606.2)[CSRA, LLC] <daniel.s.kokron at nasa.gov> wrote:
> Developers,
> I am working with a CFD code that makes heavy use of PETSc.  The case spends most of it's time dealing with 9x9 matrices.  I spent some time adding kernels for dealing with 9x9 matrices under src/mat/impls/baij/seq.  I have also re-written chunks of src/vec/vec/impls/seq/dvec2.c to reduce memory transfer requirements.  Overall, I'm seeing about a 10% speedup for this case.  I'd like to submit these changes for inclusion into a future release.
   Thanks for your potential contributions.

> I have followed style guide excepts that I still have a few chunks of code in several 'include' files located under my src/vec/vec/impls/seq directory.  They currently have names like Case3.c and Case16.c.  Should I just move these to the top level include directory and be done with it

   We definitely don't want them in the top level include files.

> or convert them to 'defines' and put them in some other location?

    We prefer to PETSC_STATIC_INLINE functions over defines if that works.

     You could make a pull request with your current code and then we'd know exactly what it looks like and could make concrete suggestions for changes.


> Daniel Kokron
> NASA Ames (ARC-TN)
> SciCon group

More information about the petsc-dev mailing list