forked from NVIDIA/cccl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
186 lines (186 loc) · 5.98 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Note that we don't specify the language in this file because some files are
# detected as Cpp, but others are detected as ObjC and we want this formatting
# to apply to all types of files.
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AllowAllArgumentsOnNextLine: true
AlignTrailingComments:
Kind: Never
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros: [
'_CCCL_ALIGNAS_TYPE',
'_CCCL_ALIGNAS',
'_CCCL_CONSTEXPR_CXX14',
'_CCCL_CONSTEXPR_CXX17',
'_CCCL_CONSTEXPR_CXX20',
'_CCCL_CONSTEXPR_CXX23',
'_CCCL_DEVICE',
'_CCCL_FALLTHROUGH',
'_CCCL_FORCEINLINE',
'_CCCL_HIDE_FROM_ABI',
'_CCCL_HOST_DEVICE',
'_CCCL_HOST',
'_CCCL_NO_UNIQUE_ADDRESS',
'_CCCL_NODISCARD_FRIEND',
'_CCCL_NODISCARD',
'_CCCL_NORETURN',
'_CCCL_TYPE_VISIBILITY_DEFAULT',
'_CCCL_VISIBILITY_HIDDEN',
'CUB_RUNTIME_FUNCTION',
'CUB_DETAIL_KERNEL_ATTRIBUTES',
'THRUST_RUNTIME_FUNCTION',
'THRUST_DETAIL_KERNEL_ATTRIBUTES',
'_LIBCUDACXX_ALIGNOF',
'_LIBCUDACXX_DEPRECATED_IN_CXX11',
'_LIBCUDACXX_DEPRECATED_IN_CXX14',
'_LIBCUDACXX_DEPRECATED_IN_CXX17',
'_LIBCUDACXX_DEPRECATED_IN_CXX20',
'_LIBCUDACXX_DEPRECATED',
'_LIBCUDACXX_HIDE_FROM_ABI',
'_CUDAX_API',
'_CUDAX_HOST_API',
'_CUDAX_DEVICE_API',
'_CUDAX_TRIVIAL_API',
'_CUDAX_TRIVIAL_HOST_API',
'_CUDAX_TRIVIAL_DEVICE_API',
]
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
BreakBeforeConceptDeclarations: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: 120
CompactNamespaces: false
ContinuationIndentWidth: 2
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
IfMacros: [
'_CCCL_IF_CONSTEXPR',
'_CCCL_ELSE_IF_CONSTEXPR',
]
IndentWrappedFunctionNames: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<cuda/experimental/__async/prologue.cuh>'
Priority: 0x7FFFFFFF
SortPriority: 0x7FFFFFFF
- Regex: '^<(cuda/std/detail/__config|cub/config.cuh|thrust/detail/config.h|thrust/system/cuda/config.h)'
Priority: 0
SortPriority: 0
- Regex: '^<cub/'
Priority: 2
SortPriority: 1
- Regex: '^<thrust/'
Priority: 3
SortPriority: 2
- Regex: '^<cuda/experimental'
Priority: 5
SortPriority: 4
- Regex: '^<cuda/'
Priority: 4
SortPriority: 3
- Regex: '^<[a-z_]*>$'
Priority: 6
SortPriority: 5
- Regex: '^<cuda'
Priority: 0
SortPriority: 0
InsertBraces: true
IndentCaseLabels: true
InsertNewlineAtEOF: true
InsertTrailingCommas: Wrapped
IndentRequires: true
IndentPPDirectives: AfterHash
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
Macros:
- _LIBCUDACXX_TEMPLATE(...)=template<...>
- _LIBCUDACXX_REQUIRES(...)=requires (...)
WhitespaceSensitiveMacros:
- _CCCL_HAS_INCLUDE
NamespaceIndentation: None
PackConstructorInitializers: Never
PenaltyBreakAssignment: 30
PenaltyBreakBeforeFirstCallParameter: 50
PenaltyBreakComment: 0
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 70
PenaltyBreakTemplateDeclaration: 0
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 90
PenaltyIndentedWhitespace: 2
PointerAlignment: Left
ReflowComments: true
RemoveSemicolon: false
SortIncludes: CaseInsensitive
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++20
StatementMacros: [
'_CCCL_EXEC_CHECK_DISABLE',
'CUB_NAMESPACE_BEGIN',
'CUB_NAMESPACE_END',
'THRUST_NAMESPACE_BEGIN',
'THRUST_NAMESPACE_END',
'_LIBCUDACXX_BEGIN_NAMESPACE_STD',
'_LIBCUDACXX_END_NAMESPACE_STD',
'_LIBCUDACXX_BEGIN_NAMESPACE_STD_NOVERSION',
'_LIBCUDACXX_END_NAMESPACE_STD_NOVERSION',
'_LIBCUDACXX_BEGIN_NAMESPACE_RANGES',
'_LIBCUDACXX_END_NAMESPACE_RANGES',
'_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI',
'_LIBCUDACXX_END_NAMESPACE_RANGES_ABI',
'_LIBCUDACXX_BEGIN_NAMESPACE_CPO',
'_LIBCUDACXX_END_NAMESPACE_CPO',
'_LIBCUDACXX_BEGIN_NAMESPACE_VIEWS',
'_LIBCUDACXX_END_NAMESPACE_VIEWS',
]
TabWidth: 2
UseTab: Never