| 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 |
BinPackArguments: false |
| 45 |
BinPackParameters: false |
| 46 |
BitFieldColonSpacing: Both |
| 47 |
|
| 48 |
# Configure each individual brace in BraceWrapping |
| 49 |
BreakBeforeBraces: Custom |
| 50 |
# Control of individual brace wrapping cases |
| 51 |
BraceWrapping: |
| 52 |
AfterCaseLabel: true |
| 53 |
AfterClass: true |
| 54 |
AfterControlStatement: Always |
| 55 |
AfterEnum: true |
| 56 |
AfterFunction: true |
| 57 |
AfterNamespace: true |
| 58 |
AfterStruct: true |
| 59 |
AfterUnion: true |
| 60 |
AfterExternBlock: false |
| 61 |
BeforeCatch: true |
| 62 |
BeforeElse: true |
| 63 |
BeforeLambdaBody: true |
| 64 |
BeforeWhile: true |
| 65 |
IndentBraces: false |
| 66 |
SplitEmptyFunction: false |
| 67 |
SplitEmptyRecord: false |
| 68 |
SplitEmptyNamespace: false |
| 69 |
|
| 70 |
BreakBeforeBinaryOperators: All |
| 71 |
BreakBeforeTernaryOperators: true |
| 72 |
BreakConstructorInitializers: BeforeComma |
| 73 |
BreakInheritanceList: BeforeComma |
| 74 |
BreakStringLiterals: true |
| 75 |
CommentPragmas: '^ IWYU pragma:' |
| 76 |
CompactNamespaces: false |
| 77 |
ConstructorInitializerIndentWidth: 4 |
| 78 |
ContinuationIndentWidth: 4 |
| 79 |
Cpp11BracedListStyle: true |
| 80 |
DeriveLineEnding: false |
| 81 |
DerivePointerAlignment: false |
| 82 |
EmptyLineAfterAccessModifier: Never |
| 83 |
EmptyLineBeforeAccessModifier: Always |
| 84 |
ExperimentalAutoDetectBinPacking: false |
| 85 |
FixNamespaceComments: true |
| 86 |
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] |
| 87 |
IfMacros: [] |
| 88 |
IncludeBlocks: Preserve |
| 89 |
IndentAccessModifiers: false |
| 90 |
IndentCaseBlocks: true |
| 91 |
IndentCaseLabels: true |
| 92 |
IndentExternBlock: NoIndent |
| 93 |
IndentPPDirectives: BeforeHash |
| 94 |
IndentWrappedFunctionNames: true |
| 95 |
KeepEmptyLinesAtTheStartOfBlocks: true |
| 96 |
LambdaBodyIndentation: Signature |
| 97 |
MacroBlockBegin: '' |
| 98 |
MacroBlockEnd: '' |
| 99 |
MaxEmptyLinesToKeep: 1 |
| 100 |
NamespaceIndentation: None |
| 101 |
PPIndentWidth: -1 |
| 102 |
PackConstructorInitializers: NextLine |
| 103 |
PenaltyBreakBeforeFirstCallParameter: 19 |
| 104 |
PenaltyBreakComment: 300 |
| 105 |
PenaltyBreakFirstLessLess: 120 |
| 106 |
PenaltyBreakString: 1000 |
| 107 |
PenaltyExcessCharacter: 1000000 |
| 108 |
PenaltyReturnTypeOnItsOwnLine: 60 |
| 109 |
PointerAlignment: Left |
| 110 |
QualifierAlignment: Leave |
| 111 |
ReferenceAlignment: Pointer |
| 112 |
ReflowComments: false |
| 113 |
ShortNamespaceLines: 0 |
| 114 |
SortIncludes: CaseSensitive |
| 115 |
SortUsingDeclarations: true |
| 116 |
SpaceAfterCStyleCast: false |
| 117 |
SpaceAfterLogicalNot: false |
| 118 |
SpaceAfterTemplateKeyword: false |
| 119 |
SpaceAroundPointerQualifiers: Default |
| 120 |
SpaceBeforeAssignmentOperators: true |
| 121 |
SpaceBeforeCaseColon: false |
| 122 |
SpaceBeforeCpp11BracedList: false |
| 123 |
SpaceBeforeCtorInitializerColon: true |
| 124 |
SpaceBeforeInheritanceColon: true |
| 125 |
SpaceBeforeParens: Never |
| 126 |
SpaceBeforeRangeBasedForLoopColon: true |
| 127 |
SpaceBeforeSquareBrackets: false |
| 128 |
SpaceInEmptyBlock: false |
| 129 |
SpaceInEmptyParentheses: false |
| 130 |
SpacesBeforeTrailingComments: 1 |
| 131 |
SpacesInAngles: Never |
| 132 |
SpacesInCStyleCastParentheses: false |
| 133 |
SpacesInConditionalStatement: false |
| 134 |
SpacesInContainerLiterals: true |
| 135 |
SpacesInParentheses: false |
| 136 |
SpacesInSquareBrackets: false |
| 137 |
|
| 138 |
AttributeMacros: |
| 139 |
- __host__ |
| 140 |
- __device__ |
| 141 |
- __global__ |
| 142 |
- __forceinline__ |
| 143 |
- __shared__ |
| 144 |
- __launch_bounds__ |
| 145 |
- HIPCUB_DEVICE |
| 146 |
- HIPCUB_HOST |
| 147 |
- HIPCUB_HOST_DEVICE |
| 148 |
- HIPCUB_SHARED_MEMORY |
| 149 |
- HIPCUB_RUNTIME_FUNCTION |
| 150 |
- HIPCUB_DETAIL_DEPRECATED_DEBUG_SYNCHRONOUS |
| 151 |
|
| 152 |
# Trick clang into thinking that our C-style attributes are C++-style attributes |
| 153 |
# Make sure that the sizes line up for linebreaks etc |
| 154 |
Macros: |
| 155 |
- __host__=[[host]] |
| 156 |
- __device__=[[device]] |
| 157 |
- __global__=[[global]] |
| 158 |
- __forceinline__=[[forceinline]] |
| 159 |
- __shared__=[[shared]] |
| 160 |
- __launch_bounds__(x)=[[launch_bounds(x)]] |
| 161 |
- __attribute__(x)=[[attribute(x)]] |
| 162 |
- HIPCUB_DEVICE=[[DEVICE___]] |
| 163 |
- HIPCUB_HOST=[[HOST___]] |
| 164 |
- HIPCUB_HOST_DEVICE=[[HOST_DEVICE___]] |
| 165 |
- HIPCUB_SHARED_MEMORY=[[SHARED_MEMORY___]] |
| 166 |
- HIPCUB_RUNTIME_FUNCTION=[[RUNTIME_FUNCTION___]] |
| 167 |
- HIPCUB_DETAIL_DEPRECATED_DEBUG_SYNCHRONOUS=[[DETAIL_DEPRECATED_DEBUG_SYNCHRONOUS___]] |
| 168 |
BreakAfterAttributes: Always |
| 169 |
|
| 170 |
--- |