forked from google/XNNPACK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
34 lines (34 loc) · 1.14 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
AllowShortFunctionsOnASingleLine: Inline
PackConstructorInitializers: Never
ColumnLimit: 120
AlignAfterOpenBracket: AlwaysBreak
BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: true
BreakBeforeBraces: Stroustrup
SpaceAfterCStyleCast: true
PointerAlignment: Left
ForEachMacros: ['XNN_UNPREDICTABLE', 'XNN_LIKELY', 'XNN_UNLIKELY']
IfMacros: ['IF']
IndentCaseLabels: true
ContinuationIndentWidth: 2
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterIfMacros: true
AfterForeachMacros: false
SpacesBeforeTrailingComments: 2
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '<xnnpack[./][[:alnum:].-]+>' # match XNNPack includes first
Priority: 5
- Regex: 'benchmark.h' # includes used in benchmarks
Priority: 3
- Regex: 'bench/' # includes used in benchmarks
Priority: 3
- Regex: 'gtest.h' # includes used in tests
Priority: 3
- Regex: 'gmock.h' # includes used in tests
Priority: 3
- Regex: '<[[:alnum:].]+>' # system headers
Priority: 2 # lower priority to keep it sorted first before XNNPack includes
MaxEmptyLinesToKeep: 2 # used to separate includes from functions