-
Notifications
You must be signed in to change notification settings - Fork 9
/
CodingStyle.txt
32 lines (20 loc) · 948 Bytes
/
CodingStyle.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Coding Style for miluphCUDA
---------------------------
last updated: Feb 2016
author: Christoph Schaefer
I personally think, that the most advanced CodingStyle for C is the Linux Kernel Coding Style written by Linus Torvalds
(see e.g. [1]) and is based on the old Kernighan and Ritchie Coding Style from the Bible of C. Linus' suggestion has
just one major flaw that makes it useless for scientific computing: He proposes an indentation level of 8 spaces.
That's too much. Really. Don't argue! That's why we use an indentation level of 4 in the miluphCUDA code. If you use
the vim editor, please use following settings in your .vimrc file:
set textwidth=120
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
If you do not need vim settings because your default editor is not vim, I'd strongly suggest to
change your default editor :^)
Thanks!
Christoph
Refs:
[1]: https://www.kernel.org/doc/Documentation/CodingStyle