Coding/Layout Recommendations & Tips
Peano - How-TosCoding/Layout Recommendations & Tips
Description
coding.doxys::Coding/Layout Recommendations & Tips ( Page )
 
Coding Standards and Eclipse
If you are working with eclipse, there's a coding standard file available within
the internal section. It is called peano-stylefile.xml.

Nomenclature and Formating

General

Layout

Header Files

Implementation files

Nomenclature

Classes

Methods and functions

Variables

Documentation Guidelines

In Peano, we follow a ''It's all in the code'' and ''document immediatly'' policy. Consequently, the whole documentation of the Peano software is threefold:

Avoid implicit typecasts

Obviously gcc does not complain if you do something like

double myDouble;
int    myInt = 1;

myDouble = myInt;


This lead to some bugs which are really hard to find. In particular if you use the linear algebra toolbox with vectors of different types. Consequently, we compile with the flag -Wconversions switched on always. In this mode, gcc detects type conversions such as the one from above.

The bad news about this compile flag is that we have to insert tons of static_cast into the code everywhere. However, that is better than having bugs.

The standard C++ library

If you use the standard library of C++, be aware of a couple of things:
Coding for different compilers

As HPC guys, the Peano developers have to ensure that the code runs on several supercomputers. With tailored compilers for different architectures, we support the following compilers:
Please check regularly whether your modifications pass the compilers from above. Below is a list of experiences for troubleshooting. Please augment this list and share your experience.


If you encounter problems with the CLX, have a look at the following documents:
 
Source
The documentation for this Page was generated from the following file:
  • coding.doxys