dev:codingconventions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:codingconventions [2016/12/07 14:29] – Add a coding convention. agloess | dev:codingconventions [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Coding Conventions ====== | ====== Coding Conventions ====== | ||
+ | |||
===== Stick to the standard ===== | ===== Stick to the standard ===== | ||
- | | + | |
- | * Avoid using new OOP aspects, because compilers do not yet support them well enough. | + | |
- | * OpenMP code should follow | + | * OpenMP code should follow version 3.X of the standard |
- | * MPI should should follow | + | * MPI should should follow version |
- | * Extended functionality should match [[wp> | + | * Extended functionality should match [[wp> |
===== Write explicit code ===== | ===== Write explicit code ===== | ||
Line 21: | Line 22: | ||
===== Don't use poorly designed language features ===== | ===== Don't use poorly designed language features ===== | ||
* Do not use the '' | * Do not use the '' | ||
- | * Do not use left-hand-side (lhs) reallocations of allocatables [-Wrealloc-lhs-all]. [[http://www.tddft.org/pipermail/octopus-devel/2012-February/005510.html | + | * Do not use left-hand-side (lhs) reallocations of allocatables [-Wrealloc-lhs]. [[https://github.com/cp2k/cp2k/issues/726 | Why? ]] |
* Do not use '' | * Do not use '' | ||
* Do not use '' | * Do not use '' | ||
Line 38: | Line 39: | ||
===== Use existing infrastructure ===== | ===== Use existing infrastructure ===== | ||
- | For many common | + | |
+ | Always prefer [[https:// | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | For many common | ||
* Use the routines from '' | * Use the routines from '' | ||
* Use the routines from the full-matrix '' | * Use the routines from the full-matrix '' | ||
* Use the routines from '' | * Use the routines from '' | ||
+ | * Use the routines from '' | ||
* Use the routines from '' | * Use the routines from '' | ||
* Don't use '' | * Don't use '' |
dev/codingconventions.1481120988.txt.gz · Last modified: 2020/08/21 10:14 (external edit)