|
| 1 | +--- |
| 2 | +Language: Cpp |
| 3 | +Standard: c++20 |
| 4 | + |
| 5 | +# Indentation |
| 6 | +TabWidth: 4 |
| 7 | +IndentWidth: 4 |
| 8 | +UseTab: Never |
| 9 | +IndentPPDirectives: None |
| 10 | +IndentWrappedFunctionNames: false |
| 11 | +NamespaceIndentation: None |
| 12 | + |
| 13 | +# Empty lines |
| 14 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 15 | +MaxEmptyLinesToKeep: 1 |
| 16 | + |
| 17 | +# Line length |
| 18 | +ColumnLimit: 100 |
| 19 | + |
| 20 | +# Line endings |
| 21 | +DeriveLineEnding: false |
| 22 | +LineEnding: LF |
| 23 | + |
| 24 | +# Breaking and Penalties |
| 25 | +BreakBeforeBinaryOperators: None |
| 26 | +BreakBeforeBraces: Attach |
| 27 | +BreakBeforeTernaryOperators: true |
| 28 | +BreakConstructorInitializersBeforeComma: false |
| 29 | +BreakInheritanceList: BeforeColon |
| 30 | +BreakStringLiterals: false |
| 31 | + |
| 32 | +PenaltyBreakAssignment: 2 |
| 33 | +PenaltyBreakBeforeFirstCallParameter: 19 |
| 34 | +PenaltyBreakComment: 300 |
| 35 | +PenaltyBreakFirstLessLess: 120 |
| 36 | +PenaltyBreakString: 1000 |
| 37 | +PenaltyExcessCharacter: 1000000 |
| 38 | +PenaltyReturnTypeOnItsOwnLine: 60 |
| 39 | + |
| 40 | +# Spacing and padding |
| 41 | +SpaceAfterCStyleCast: false |
| 42 | +SpaceAfterTemplateKeyword: true |
| 43 | +SpaceAfterLogicalNot: false |
| 44 | +SpaceAfterControlStatementKeyword: true |
| 45 | +SpaceBeforeAssignmentOperators: true |
| 46 | +SpaceBeforeParens: ControlStatements |
| 47 | +SpaceBeforeRangeBasedForLoopColon: false |
| 48 | +SpaceInEmptyParentheses: false |
| 49 | +SpacesInAngles: false |
| 50 | +SpacesInContainerLiterals: false |
| 51 | +SpacesInCStyleCastParentheses: false |
| 52 | +SpacesInParentheses: false |
| 53 | +SpacesBeforeTrailingComments: 1 |
| 54 | +SpaceBeforeCpp11BracedList: false |
| 55 | +SpaceBeforeCtorInitializerColon: true |
| 56 | +SpaceBeforeInheritanceColon: true |
| 57 | +SpaceBeforeSquareBrackets: false |
| 58 | +SpacesInSquareBrackets: false |
| 59 | +SpaceBeforeCaseColon: false |
| 60 | + |
| 61 | +# Brace placement |
| 62 | +BraceWrapping: |
| 63 | + AfterClass: false |
| 64 | + AfterControlStatement: false |
| 65 | + AfterEnum: false |
| 66 | + AfterFunction: false |
| 67 | + AfterNamespace: false |
| 68 | + AfterStruct: false |
| 69 | + AfterUnion: false |
| 70 | + BeforeCatch: false |
| 71 | + BeforeElse: false |
| 72 | + IndentBraces: false |
| 73 | + SplitEmptyFunction: false |
| 74 | + SplitEmptyRecord: false |
| 75 | + SplitEmptyNamespace: false |
| 76 | +Cpp11BracedListStyle: true |
| 77 | + |
| 78 | +# Function definitions |
| 79 | +# BreakAfterReturnType: AllDefinitions |
| 80 | +AlwaysBreakAfterDefinitionReturnType: All |
| 81 | + |
| 82 | +AttributeMacros: |
| 83 | + - __host__ |
| 84 | + - __device__ |
| 85 | + - __hostdev__ |
| 86 | + - __global__ |
| 87 | + - __forceinline__ |
| 88 | + - __shared__ |
| 89 | + - __launch_bounds__ |
| 90 | + |
| 91 | +# Alignment |
| 92 | +AlignConsecutiveAssignments: true |
| 93 | +AlignConsecutiveBitFields: true |
| 94 | +AlignConsecutiveDeclarations: false |
| 95 | +AlignConsecutiveMacros: true |
| 96 | +AlignEscapedNewlines: Left |
| 97 | +AlignOperands: true |
| 98 | +AlignTrailingComments: |
| 99 | + Kind: Always |
| 100 | + OverEmptyLines: 2 |
| 101 | + |
| 102 | +# Single line allowances |
| 103 | +BinPackParameters: false |
| 104 | +BinPackArguments: false |
| 105 | +AllowAllArgumentsOnNextLine: true |
| 106 | +AllowAllConstructorInitializersOnNextLine: true |
| 107 | +AllowAllParametersOfDeclarationOnNextLine: true |
| 108 | +AllowShortBlocksOnASingleLine: true |
| 109 | +AllowShortCaseLabelsOnASingleLine: true |
| 110 | +AllowShortEnumsOnASingleLine: true |
| 111 | +AllowShortFunctionsOnASingleLine: Inline |
| 112 | +AllowShortIfStatementsOnASingleLine: false |
| 113 | +AllowShortLambdasOnASingleLine: true |
| 114 | +AllowShortLoopsOnASingleLine: false |
| 115 | + |
| 116 | +# Sorting |
| 117 | +IncludeBlocks: Regroup |
| 118 | +IncludeIsMainRegex: "$" |
| 119 | +IncludeCategories: |
| 120 | + - Regex: '^<pybind11/' # pybind11 includes |
| 121 | + Priority: 0 |
| 122 | + - Regex: '^"' # quoted includes |
| 123 | + Priority: 1 |
| 124 | + - Regex: '^<fvdb/' # fvdb includes |
| 125 | + Priority: 2 |
| 126 | + - Regex: '^<nanovdb/' # nanovdb includes |
| 127 | + Priority: 3 |
| 128 | + - Regex: '^<(torch|c10|THC|ATen)/' # torch includes |
| 129 | + Priority: 4 |
| 130 | + - Regex: '^<(thrust|cub|cuda)/' # CCCL includes |
| 131 | + Priority: 5 |
| 132 | + - Regex: '^<(cooperative_groups|cuco|cuda.h|cuda_|device_types|math_constants|nvtx3|cute)' # CUDA includes |
| 133 | + Priority: 6 |
| 134 | + - Regex: '^<.*\..*' # other system includes (e.g. with a '.') |
| 135 | + Priority: 7 |
| 136 | + - Regex: '^<[^.]+' # STL includes (no '.') |
| 137 | + Priority: 8 |
| 138 | +IncludeIsMainSourceRegex: "$" |
| 139 | +SortIncludes: true |
| 140 | +SortUsingDeclarations: true |
| 141 | + |
0 commit comments