| 1 |
# Style file for MLSE Libraries based on the modified rocBLAS style |
| 2 |
|
| 3 |
# Common settings |
| 4 |
BasedOnStyle: WebKit |
| 5 |
TabWidth: 4 |
| 6 |
IndentWidth: 4 |
| 7 |
UseTab: Never |
| 8 |
ColumnLimit: 100 |
| 9 |
UseCRLF: false |
| 10 |
|
| 11 |
# Other languages JavaScript, Proto |
| 12 |
|
| 13 |
--- |
| 14 |
Language: Cpp |
| 15 |
|
| 16 |
# http://releases.llvm.org/6.0.1/tools/clang/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code |
| 17 |
# int formatted_code; |
| 18 |
# // clang-format off |
| 19 |
# void unformatted_code ; |
| 20 |
# // clang-format on |
| 21 |
# void formatted_code_again; |
| 22 |
|
| 23 |
DisableFormat: false |
| 24 |
Standard: Cpp11 |
| 25 |
|
| 26 |
AccessModifierOffset: -4 |
| 27 |
AlignAfterOpenBracket: true |
| 28 |
AlignArrayOfStructures: Right |
| 29 |
AlignConsecutiveAssignments: true |
| 30 |
AlignConsecutiveDeclarations: true |
| 31 |
AlignEscapedNewlines: Left |
| 32 |
AlignOperands: true |
| 33 |
AlignTrailingComments: false |
| 34 |
AllowAllArgumentsOnNextLine: false |
| 35 |
AllowAllParametersOfDeclarationOnNextLine: true |
| 36 |
AllowShortBlocksOnASingleLine: Never |
| 37 |
AllowShortCaseLabelsOnASingleLine: true |
| 38 |
AllowShortFunctionsOnASingleLine: Empty |
| 39 |
AllowShortIfStatementsOnASingleLine: false |
| 40 |
AllowShortLoopsOnASingleLine: false |
| 41 |
AlwaysBreakAfterReturnType: None |
| 42 |
AlwaysBreakBeforeMultilineStrings: false |
| 43 |
AlwaysBreakTemplateDeclarations: Yes |
| 44 |
AttributeMacros: ['HIPRANDAPI', 'QUALIFIERS'] |
| 45 |
BinPackArguments: false |
| 46 |
BinPackParameters: false |
| 47 |
BitFieldColonSpacing: Both |
| 48 |
|
| 49 |
# Configure each individual brace in BraceWrapping |
| 50 |
BreakBeforeBraces: Custom |
| 51 |
# Control of individual brace wrapping cases |
| 52 |
BraceWrapping: |
| 53 |
AfterCaseLabel: true |
| 54 |
AfterClass: true |
| 55 |
AfterControlStatement: Always |
| 56 |
AfterEnum: true |
| 57 |
AfterFunction: true |
| 58 |
AfterNamespace: true |
| 59 |
AfterStruct: true |
| 60 |
AfterUnion: true |
| 61 |
BeforeCatch: true |
| 62 |
BeforeElse: true |
| 63 |
AfterExternBlock: false |
| 64 |
BeforeLambdaBody: true |
| 65 |
BeforeWhile: true |
| 66 |
IndentBraces: false |
| 67 |
SplitEmptyFunction: false |
| 68 |
SplitEmptyRecord: false |
| 69 |
SplitEmptyNamespace: false |
| 70 |
|
| 71 |
BreakBeforeBinaryOperators: All |
| 72 |
BreakBeforeTernaryOperators: true |
| 73 |
BreakConstructorInitializers: BeforeComma |
| 74 |
BreakInheritanceList: BeforeComma |
| 75 |
BreakStringLiterals: true |
| 76 |
CommentPragmas: '^ IWYU pragma:' |
| 77 |
CompactNamespaces: false |
| 78 |
ConstructorInitializerIndentWidth: 4 |
| 79 |
ContinuationIndentWidth: 4 |
| 80 |
Cpp11BracedListStyle: true |
| 81 |
DeriveLineEnding: false |
| 82 |
DerivePointerAlignment: false |
| 83 |
EmptyLineAfterAccessModifier: Never |
| 84 |
EmptyLineBeforeAccessModifier: Always |
| 85 |
ExperimentalAutoDetectBinPacking: false |
| 86 |
FixNamespaceComments: true |
| 87 |
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] |
| 88 |
IfMacros: [] |
| 89 |
IncludeBlocks: Preserve |
| 90 |
IndentAccessModifiers: false |
| 91 |
IndentCaseBlocks: true |
| 92 |
IndentCaseLabels: true |
| 93 |
IndentExternBlock: NoIndent |
| 94 |
IndentPPDirectives: BeforeHash |
| 95 |
IndentWrappedFunctionNames: true |
| 96 |
KeepEmptyLinesAtTheStartOfBlocks: true |
| 97 |
LambdaBodyIndentation: Signature |
| 98 |
MacroBlockBegin: '' |
| 99 |
MacroBlockEnd: '' |
| 100 |
MaxEmptyLinesToKeep: 1 |
| 101 |
NamespaceIndentation: None |
| 102 |
PPIndentWidth: -1 |
| 103 |
PackConstructorInitializers: NextLine |
| 104 |
PenaltyBreakBeforeFirstCallParameter: 19 |
| 105 |
PenaltyBreakComment: 300 |
| 106 |
PenaltyBreakFirstLessLess: 120 |
| 107 |
PenaltyBreakString: 1000 |
| 108 |
PenaltyExcessCharacter: 1000000 |
| 109 |
PenaltyReturnTypeOnItsOwnLine: 60 |
| 110 |
PointerAlignment: Left |
| 111 |
QualifierAlignment: Leave |
| 112 |
ReferenceAlignment: Pointer |
| 113 |
ReflowComments: false |
| 114 |
ShortNamespaceLines: 0 |
| 115 |
SortIncludes: CaseSensitive |
| 116 |
SortUsingDeclarations: true |
| 117 |
SpaceAfterCStyleCast: false |
| 118 |
SpaceAfterLogicalNot: false |
| 119 |
SpaceAfterTemplateKeyword: false |
| 120 |
SpaceAroundPointerQualifiers: Default |
| 121 |
SpaceBeforeAssignmentOperators: true |
| 122 |
SpaceBeforeCaseColon: false |
| 123 |
SpaceBeforeCpp11BracedList: false |
| 124 |
SpaceBeforeCtorInitializerColon: true |
| 125 |
SpaceBeforeInheritanceColon: true |
| 126 |
SpaceBeforeParens: Never |
| 127 |
SpaceBeforeRangeBasedForLoopColon: true |
| 128 |
SpaceBeforeSquareBrackets: false |
| 129 |
SpaceInEmptyBlock: false |
| 130 |
SpaceInEmptyParentheses: false |
| 131 |
SpacesBeforeTrailingComments: 1 |
| 132 |
SpacesInAngles: Never |
| 133 |
SpacesInCStyleCastParentheses: false |
| 134 |
SpacesInConditionalStatement: false |
| 135 |
SpacesInContainerLiterals: true |
| 136 |
SpacesInParentheses: false |
| 137 |
SpacesInSquareBrackets: false |
| 138 |
--- |