From HCL
Revision as of 16:57, 14 January 2011 by Root (talk | contribs) (General)

Jump to: navigation, search


  • C++ programming style is preferrable. For example, in variable declarations, pointers and references should have their reference symbol next to the type rather than to the name. Variables should be initialized where they are declared, and should be declared where they are used. For more details, see Google C++ Style Guide
  • One-true-brace ident style
  • Coding header files
  • Learn from examples and use coding approaches from third-party software


  • Place Doxygen comments in header files (before declarations of namespaces/classes/structs/typedefs/macros) and main source files (for documenting tools and tests)
  • Use double forward slash for short comments in the code



int size;
MPI_Comm_size(MPI_COMM_WORLD, &size);
char names[size][MPI_MAX_PROCESSOR_NAME];