22# Override root .clang-format
33AlignConsecutiveAssignments : false
44AlignConsecutiveDeclarations : false
5- ReferenceAlignment : Left
6- PointerAlignment : Left
75Cpp11BracedListStyle : true
8- AccessModifierOffset : -4
9- BinPackArguments : false
6+ SpacesInContainerLiterals : false
107BreakBeforeBraces : Attach
8+ AccessModifierOffset : -4
119IndentCaseBlocks : false
1210IndentCaseLabels : false
1311
@@ -32,7 +30,15 @@ AllowShortIfStatementsOnASingleLine: Never
3230AllowShortLambdasOnASingleLine : Inline
3331AllowShortLoopsOnASingleLine : false
3432AlwaysBreakBeforeMultilineStrings : true
35- BinPackParameters : true
33+ # Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside them
34+ AttributeMacros :
35+ - __host__
36+ - __device__
37+ - __global__
38+ - __forceinline__
39+ - __launch_bounds__
40+ BinPackArguments : true
41+ BinPackParameters : false # OnePerLine
3642BitFieldColonSpacing : Both
3743# BreakAdjacentStringLiterals: true
3844BreakAfterAttributes : Never
@@ -58,15 +64,18 @@ ExperimentalAutoDetectBinPacking: false
5864FixNamespaceComments : true
5965IncludeBlocks : Regroup
6066IncludeCategories :
61- - Regex : ' ^<.*\.h> '
67+ - Regex : ' ".*" '
6268 Priority : 1
6369 SortPriority : 0
64- - Regex : ' ^<.*'
70+ - Regex : ' ^<.*\.h> '
6571 Priority : 2
6672 SortPriority : 0
67- - Regex : ' .*'
73+ - Regex : ' ^< .*'
6874 Priority : 3
6975 SortPriority : 0
76+ - Regex : ' .*'
77+ Priority : 4
78+ SortPriority : 0
7079IncludeIsMainRegex : ' ([-_](test|unittest))?$'
7180IncludeIsMainSourceRegex : ' '
7281IndentAccessModifiers : false
@@ -100,6 +109,7 @@ PenaltyBreakString: 1000
100109PenaltyBreakTemplateDeclaration : 10
101110PenaltyExcessCharacter : 1000000
102111PenaltyReturnTypeOnItsOwnLine : 200
112+ PointerAlignment : Middle
103113QualifierAlignment : Left
104114# QualifierOrder: ['static', 'inline', 'friend', 'constexpr', 'const', 'volatile', 'type', 'restrict']
105115RawStringFormats :
@@ -113,6 +123,7 @@ RawStringFormats:
113123 - ' c++'
114124 - ' C++'
115125 CanonicalDelimiter : ' '
126+ ReferenceAlignment : Middle
116127ReflowComments : false # IndentOnly
117128SeparateDefinitionBlocks : Always
118129SortIncludes : CaseInsensitive
0 commit comments