---
BasedOnStyle: LLVM

# Common settings for both C and C++
PointerAlignment: Left
AllowShortLoopsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: AllIfsAndElse

# If parameters don't fit on one line format(
#   arg1, arg2
# );
AlignAfterOpenBracket: BlockIndent

# Align assignments not separated by non-assignment or empty line
AlignConsecutiveAssignments:
  Enabled: true
  AcrossComments: true
  AcrossEmptyLines: false

# Function calls and init lists try to fit args on same line
PackConstructorInitializers: BinPack
BinPackArguments: true
BinPackParameters: true
AllowAllArgumentsOnNextLine: true

# Don't reflow doxygen comment lines
CommentPragmas: '^\*? ?@'

# Class access modifiers ('public:') are indented 1 less than class members
AccessModifierOffset: -1

# Don't try to sort includes, just leave them be
SortIncludes: false

# Don't bother about namespace end comments if the namespace is short
ShortNamespaceLines: 15

# Don't worry about comments being prefixed with spaces
SpacesInLineCommentPrefix:
  Minimum: 0
  Maximum: -1

# Strongly prefer not putting return type on its own line
PenaltyReturnTypeOnItsOwnLine: 200

UseTab: Never

ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2

BreakTemplateDeclarations: Leave

# Ignore whitespace "issues" in sendrecvs
WhitespaceSensitiveMacros: [MPI_Sendrecv, MPI_Isendrecv, sendrecv]

# Multiline operands (+, -, &&, etc.) are not indented to align with the equal
# sign
AlignOperands: DontAlign
